Removed unused RealFrameTime; Removed FPS-dependent Homing-tracking code

This commit is contained in:
zicodxx 2007-07-16 00:28:22 +00:00
parent 88f986afe5
commit 3b7cac5e35
6 changed files with 6 additions and 19 deletions

View file

@ -4,6 +4,7 @@ D2X-Rebirth Changelog
--------
d2x.ini, arch/ogl/gr.c, arch/ogl/ogl.c, arch/ogl/include/internal.h, arch/sdl/gr.c, include/args.h, include/gr.h, include/ogl_init.h, main/automap.c, main/game.c, main/game.h, main/gamecntl.c, main/gamefont.c, main/gauges.c, main/inferno.c, main/menu.c, main/movie.c, main/newmenu.c, main/titles.c, misc/args.c: Cleaned up more FindArg's - (most important) OpenGL Options
main/game.c: Fixing duplicated gr_toggle_fullscreen()
main/cntrlcen.c, main/game.c, main/game.h, main/gamerend.c, main/laser.c: Removed unused RealFrameTime; Removed FPS-dependent Homing-tracking code
20070715
--------

View file

@ -191,7 +191,7 @@ void do_countdown_frame()
// Hook in the rumble sound effect here.
old_time = Countdown_timer;
Countdown_timer -= RealFrameTime;
Countdown_timer -= FrameTime;
Countdown_seconds_left = f2i(Countdown_timer + F1_0*7/8);
if ( (old_time > COUNTDOWN_VOICE_TIME ) && (Countdown_timer <= COUNTDOWN_VOICE_TIME) ) {

View file

@ -215,7 +215,6 @@ int checktime = 0;
int Game_suspended=0; //if non-zero, nothing moves but player
fix RealFrameTime;
fix Auto_fire_fusion_cannon_time = 0;
fix Fusion_charge = 0;
fix Fusion_next_sound_time = 0;
@ -730,18 +729,6 @@ void calc_frame_time()
#if defined(TIMER_TEST) && !defined(NDEBUG)
stop_count = start_count = 0;
#endif
// Set value to determine whether homing missile can see target.
// The lower frametime is, the more likely that it can see its target.
if (FrameTime <= F1_0/64)
Min_trackable_dot = MIN_TRACKABLE_DOT; // -- 3*(F1_0 - MIN_TRACKABLE_DOT)/4 + MIN_TRACKABLE_DOT;
else if (FrameTime < F1_0/32)
Min_trackable_dot = MIN_TRACKABLE_DOT + F1_0/64 - 2*FrameTime; // -- fixmul(F1_0 - MIN_TRACKABLE_DOT, F1_0-4*FrameTime) + MIN_TRACKABLE_DOT;
else if (FrameTime < F1_0/4)
Min_trackable_dot = MIN_TRACKABLE_DOT + F1_0/64 - F1_0/16 - FrameTime; // -- fixmul(F1_0 - MIN_TRACKABLE_DOT, F1_0-4*FrameTime) + MIN_TRACKABLE_DOT;
else
Min_trackable_dot = MIN_TRACKABLE_DOT + F1_0/64 - F1_0/8;
}
//--unused-- int Auto_flythrough=0; //if set, start flythough automatically

View file

@ -30,7 +30,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
// from mglobal.c
extern fix FrameTime; // time in seconds since last frame
extern fix RealFrameTime; // time in seconds since last frame
extern fix GameTime; // time in game (sum of FrameTime)
extern int FrameCount; // how many frames rendered
extern fix Next_laser_fire_time; // Time at which player can next fire his selected laser.

View file

@ -181,14 +181,14 @@ void ftoa(char *string, fix f)
sprintf( string, "%d.%02d", decimal, fractional );
}
void show_framerate() // ZICO - function modified
void show_framerate()
{
char temp[50];
fix rate;
int x = 8, y = 5;
frame_time_total += RealFrameTime - frame_time_list[frame_time_cntr];
frame_time_list[frame_time_cntr] = RealFrameTime;
frame_time_total += FrameTime - frame_time_list[frame_time_cntr];
frame_time_list[frame_time_cntr] = FrameTime;
frame_time_cntr = (frame_time_cntr+1)%8;
if (frame_time_total) {

View file

@ -875,7 +875,7 @@ int object_to_object_visibility(object *obj1, object *obj2, int trans_type)
return 0;
}
fix Min_trackable_dot = MIN_TRACKABLE_DOT;
fix Min_trackable_dot = 3*(F1_0 - MIN_TRACKABLE_DOT)/4 + MIN_TRACKABLE_DOT; //MIN_TRACKABLE_DOT;
// -----------------------------------------------------------------------------------------------------------
// Return true if weapon *tracker is able to track object Objects[track_goal], else return false.