Remove P_PreTicker
This commit is contained in:
parent
50ee4edd02
commit
611009a545
3 changed files with 1 additions and 80 deletions
|
|
@ -4527,14 +4527,13 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
}
|
||||
|
||||
if (!fromnetsave) // uglier hack
|
||||
{ // to make a newly loaded level start on the second frame.
|
||||
{
|
||||
INT32 buf = gametic % BACKUPTICS;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i])
|
||||
G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1);
|
||||
}
|
||||
P_PreTicker(2);
|
||||
P_MapStart(); // just in case MapLoad modifies tmthing
|
||||
LUAh_MapLoad();
|
||||
P_MapEnd(); // just in case MapLoad modifies tmthing
|
||||
|
|
|
|||
77
src/p_tick.c
77
src/p_tick.c
|
|
@ -759,80 +759,3 @@ void P_Ticker(boolean run)
|
|||
|
||||
// Z_CheckMemCleanup();
|
||||
}
|
||||
|
||||
// Abbreviated ticker for pre-loading, calls thinkers and assorted things
|
||||
void P_PreTicker(INT32 frames)
|
||||
{
|
||||
INT32 i;
|
||||
ticcmd_t temptic;
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
postimgtype[i] = postimg_none;
|
||||
|
||||
if (marathonmode & MA_INGAME)
|
||||
marathonmode |= MA_INIT;
|
||||
|
||||
hook_defrosting = frames;
|
||||
|
||||
while (hook_defrosting)
|
||||
{
|
||||
P_MapStart();
|
||||
|
||||
R_UpdateMobjInterpolators();
|
||||
|
||||
// First loop: Ensure all players' distance to the finish line are all accurate
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
|
||||
K_UpdateDistanceFromFinishLine(&players[i]);
|
||||
|
||||
// Second loop: Ensure all player positions reflect everyone's distances
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
|
||||
K_KartUpdatePosition(&players[i]);
|
||||
|
||||
// OK! Now that we got all of that sorted, players can think!
|
||||
LUAh_PreThinkFrame();
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
|
||||
{
|
||||
// stupid fucking cmd hack
|
||||
// if it isn't for this, players can move in preticker time
|
||||
// (and disrupt demo recording and other things !!)
|
||||
memcpy(&temptic, &players[i].cmd, sizeof(ticcmd_t));
|
||||
memset(&players[i].cmd, 0, sizeof(ticcmd_t));
|
||||
|
||||
P_PlayerThink(&players[i]);
|
||||
|
||||
memcpy(&players[i].cmd, &temptic, sizeof(ticcmd_t));
|
||||
}
|
||||
|
||||
P_RunThinkers();
|
||||
|
||||
// Run any "after all the other thinkers" stuff
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
|
||||
P_PlayerAfterThink(&players[i]);
|
||||
|
||||
LUAh_ThinkFrame();
|
||||
|
||||
// Run shield positioning
|
||||
P_RunOverlays();
|
||||
|
||||
P_UpdateSpecials();
|
||||
P_RespawnSpecials();
|
||||
|
||||
LUAh_PostThinkFrame();
|
||||
|
||||
R_UpdateLevelInterpolators();
|
||||
R_UpdateViewInterpolation();
|
||||
R_ResetViewInterpolation(0);
|
||||
|
||||
P_MapEnd();
|
||||
|
||||
hook_defrosting--;
|
||||
}
|
||||
|
||||
if (marathonmode & MA_INGAME)
|
||||
marathonmode &= ~MA_INIT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ void Command_CountMobjs_f(void);
|
|||
|
||||
void P_RunChaseCameras(void);
|
||||
void P_Ticker(boolean run);
|
||||
void P_PreTicker(INT32 frames);
|
||||
void P_DoTeamscrambling(void);
|
||||
void P_RemoveThinkerDelayed(thinker_t *thinker); //killed
|
||||
mobj_t *P_SetTarget(mobj_t **mo, mobj_t *target); // killough 11/98
|
||||
|
|
|
|||
Loading…
Reference in a new issue