// TryRunTics
//
-int TryRunTics (void)
+void TryRunTics (void)
{
int i;
int lowtic;
int realtics;
int availabletics;
int counts;
- int ticsRan;
// get real tics
entertic = I_GetTime() / ticdup;
realtics = entertic - oldentertics;
oldentertics = entertic;
- ticsRan = 0;
// in singletics mode, run a single tic every time this function
// is called.
if (I_GetTime() / ticdup - entertic > 0)
{
- return ticsRan;
+ return;
}
I_Sleep(1);
if (!PlayersInGame())
{
- return ticsRan;
+ return;
}
set = &ticdata[(gametic / ticdup) % BACKUPTICS];
loop_interface->RunTic(set->cmds, set->ingame);
gametic++;
- ticsRan++;
// modify command for duplicated tics
NetUpdate (); // check for new console commands
}
- return ticsRan;
}
void D_RegisterLoopCallbacks(loop_interface_t *i)
void D_QuitNetGame (void);
//? how many ticks to run?
-int TryRunTics (void);
+void TryRunTics (void);
// Called at start of game loop to initialize timers
void D_StartGameLoop(void);
void doomgeneric_Tick()
{
- int ret;
// frame syncronous IO operations
I_StartFrame ();
- ret = TryRunTics (); // may run 0 tics if we're ahead of schedule
- // (and we are, on anything modern)
+ TryRunTics (); // will run at least one tic
S_UpdateSounds (players[consoleplayer].mo);// move positional sounds
// Update display, next frame, with current state.
- //
- // Don't bother displaying if we haven't ran any tics,
- // since we'd just be painting the exact same image from
- // last tic (waste of processing power)
- if (screenvisible && ret > 0)
+ if (screenvisible)
{
D_Display ();
}