… | |
… | |
288 | { |
288 | { |
289 | /* Then check if any players should use weapon-speed instead of speed */ |
289 | /* Then check if any players should use weapon-speed instead of speed */ |
290 | for_all_players (pl) |
290 | for_all_players (pl) |
291 | { |
291 | { |
292 | /* The code that did weapon_sp handling here was out of place - |
292 | /* The code that did weapon_sp handling here was out of place - |
293 | * this isn't called until after the player has finished there |
293 | * this isn't called until after the player has finished her |
294 | * actions, and is thus out of place. All we do here is bounds |
294 | * actions, and is thus out of place. All we do here is bounds |
295 | * checking. |
295 | * checking. |
296 | */ |
296 | */ |
297 | if (pl->has_hit) |
297 | if (pl->has_hit) |
298 | { |
298 | { |
299 | if (pl->ob->speed_left > pl->weapon_sp) |
299 | if (pl->ob->speed_left > pl->weapon_sp) |
… | |
… | |
353 | else |
353 | else |
354 | op->last_anim++; |
354 | op->last_anim++; |
355 | |
355 | |
356 | if (op->speed_left > 0) |
356 | if (op->speed_left > 0) |
357 | { |
357 | { |
358 | #if 0 |
|
|
359 | /* I've seen occasional crashes in move_symptom() with it |
|
|
360 | * crashing because op is removed - add some debugging to |
|
|
361 | * track if it is removed at this point. |
|
|
362 | * This unfortunately is a bit too verbose it seems - not sure |
|
|
363 | * why - I think what happens is a map is freed or something and |
|
|
364 | * some objects get 'lost' - removed never to be reclaimed. |
|
|
365 | * removed objects generally shouldn't exist. |
|
|
366 | */ |
|
|
367 | if (QUERY_FLAG (op, FLAG_REMOVED)) |
|
|
368 | { |
|
|
369 | LOG (llevDebug, "process_events: calling process_object with removed object %s\n", op->name ? op->name : "null"); |
|
|
370 | } |
|
|
371 | #endif |
|
|
372 | --op->speed_left; |
358 | --op->speed_left; |
373 | process_object (op); |
359 | process_object (op); |
374 | |
360 | |
375 | if (op->destroyed ()) |
361 | if (op->destroyed ()) |
376 | continue; |
362 | continue; |