Reset homing_object_dist along with d_homer_tick_step instead of every frame to make sure lock indicator is visible in frames where homers wait for a new chance to turn; Also moved call of calc_d_tick() to calc_frame_time() - shouldn't be nested in calc_d_homer_tick()

This commit is contained in:
zico 2015-09-10 14:11:30 +02:00
parent cbaac96324
commit e0785251c4
2 changed files with 4 additions and 3 deletions

View file

@ -435,6 +435,8 @@ void calc_frame_time()
FrameTime = (last_frametime==0?1:last_frametime); //...then use time from last frame FrameTime = (last_frametime==0?1:last_frametime); //...then use time from last frame
GameTime64 += FrameTime; GameTime64 += FrameTime;
calc_d_tick();
calc_d_homer_tick(); calc_d_homer_tick();
} }
@ -1379,8 +1381,6 @@ void GameProcessFrame(void)
else else
{ // Note the link to above! { // Note the link to above!
get_local_player().homing_object_dist = -1; // Assume not being tracked. Laser_do_weapon_sequence modifies this.
object_move_all(); object_move_all();
powerup_grab_cheat_all(); powerup_grab_cheat_all();

View file

@ -1199,9 +1199,10 @@ void calc_d_homer_tick()
// Don't let slowdowns have a lasting impact; allow you to build up at most 3 frames worth // Don't let slowdowns have a lasting impact; allow you to build up at most 3 frames worth
if (t > HOMING_TURN_TIME*3) if (t > HOMING_TURN_TIME*3)
t = HOMING_TURN_TIME*3; t = HOMING_TURN_TIME*3;
get_local_player().homing_object_dist = -1; // Assume not being tracked. Laser_do_weapon_sequence modifies this. Let's do this here since the homers do not track every frame, we may not want to reset this ever frame.
} }
timer = t; timer = t;
calc_d_tick();
} }
// ------------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------------