… | |
… | |
170 | draw_client_map (pl->ob); |
170 | draw_client_map (pl->ob); |
171 | |
171 | |
172 | if (update_look) |
172 | if (update_look) |
173 | esrv_draw_look (pl->ob); |
173 | esrv_draw_look (pl->ob); |
174 | |
174 | |
|
|
175 | if (partial_face_ofs) |
|
|
176 | { |
|
|
177 | } |
|
|
178 | |
|
|
179 | if (partial_face_ofs) |
|
|
180 | { |
|
|
181 | // one hell of a big thing that must be |
|
|
182 | } |
175 | if (askface.empty ()) |
183 | else if (askface.empty ()) |
176 | { |
184 | { |
177 | // regularly send a new face when queue is empty |
185 | // regularly send a new face when queue is empty |
178 | if (bg_scrub && !--bg_scrub && enable_bg_scrub) |
186 | if (bg_scrub && !--bg_scrub && enable_bg_scrub) |
179 | while (scrub_idx < faces.size () - 1) |
187 | while (scrub_idx < faces.size () - 1) |
180 | { |
188 | { |
181 | ++scrub_idx; |
189 | ++scrub_idx; |
182 | if (!faces_sent [scrub_idx]) |
190 | if (!faces_sent [scrub_idx]) |
183 | { |
191 | { |
184 | send_face (scrub_idx); |
192 | send_face (scrub_idx); |
|
|
193 | flush_fx (); |
|
|
194 | |
185 | bg_scrub = 1; // send up to one face per tick, unless an image was requested |
195 | bg_scrub = 1; // send up to one face per tick, unless an image was requested |
186 | break; |
196 | break; |
187 | } |
197 | } |
188 | } |
198 | } |
189 | |
199 | |
… | |
… | |
199 | int avail = rate_avail; |
209 | int avail = rate_avail; |
200 | |
210 | |
201 | // if we can split images, transfer up to mss packets if possible |
211 | // if we can split images, transfer up to mss packets if possible |
202 | if (fxix) avail += mss - (ol % mss); |
212 | if (fxix) avail += mss - (ol % mss); |
203 | |
213 | |
204 | fprintf (stderr, "ra %6d a %6d ", rate_avail, avail); |
|
|
205 | |
|
|
206 | while (!askface.empty () && avail > 0) |
214 | while (!askface.empty () && avail > 0) |
207 | { |
215 | { |
208 | // use a lifo to send most recently requested images |
216 | // use a lifo to send most recently requested images |
209 | faceidx face = askface.back (); |
217 | faceidx facenum = askface.back (); |
210 | askface.pop_back (); |
218 | askface.pop_back (); |
211 | |
219 | |
|
|
220 | if (fxix && 0) |
|
|
221 | { |
|
|
222 | } |
|
|
223 | else |
212 | send_image (face); |
224 | send_image (facenum); |
213 | |
|
|
214 | bg_scrub = BG_SCRUB_RATE; |
|
|
215 | |
225 | |
216 | int consumed = ol - outputbuffer_len (); |
226 | int consumed = ol - outputbuffer_len (); |
217 | avail -= consumed; |
227 | avail -= consumed; |
218 | rate_avail -= consumed; |
228 | rate_avail -= consumed; |
|
|
229 | |
|
|
230 | bg_scrub = BG_SCRUB_RATE; |
219 | } |
231 | } |
220 | |
|
|
221 | fprintf (stderr, "ra %6d a %6d\n", rate_avail, avail); |
|
|
222 | |
|
|
223 | } |
232 | } |
224 | } |
233 | } |
225 | |
234 | |