From dd6b63f9da95a0c4f0e1a55c37aee63638ff30c2 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 21 Sep 2018 19:44:14 -0400 Subject: [PATCH] Different timings --- src/p_inter.c | 2 +- src/p_mobj.c | 12 +++++++++--- src/p_spec.c | 12 +++--------- src/p_tick.c | 4 ++-- src/p_user.c | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 68124671..74612949 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -694,7 +694,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!playeringame[i] || players[i].spectator) continue; - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; } S_StartSound(NULL, sfx_lvpass); } diff --git a/src/p_mobj.c b/src/p_mobj.c index 4787cf3d..c4f29486 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1410,7 +1410,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) gravityadd = FixedMul(gravityadd, 5*FRACUNIT); // Double gravity break; case MT_SIGN: - gravityadd /= 4; + gravityadd /= 8; break; default: break; @@ -8291,8 +8291,8 @@ void P_MobjThinker(mobj_t *mobj) if (mobj->z <= mobj->movefactor) { P_SetMobjState(mobj, S_SIGN_END); - if (thing->info->attacksound) - S_StartSound(thing, thing->info->attacksound); + if (mobj->info->attacksound) + S_StartSound(mobj, mobj->info->attacksound); mobj->z = mobj->movefactor; //mobj->flags |= MF_NOGRAVITY; // ? mobj->flags &= ~MF_NOCLIPHEIGHT; @@ -8305,6 +8305,12 @@ void P_MobjThinker(mobj_t *mobj) mobj->z + (24<flags &= ~MF_NOGRAVITY; + if (abs(mobj->z - mobj->movefactor) <= 512<cvmem) + { + if (mobj->info->seesound) + S_StartSound(mobj, mobj->info->seesound); + mobj->cvmem = 1; + } } } break; diff --git a/src/p_spec.c b/src/p_spec.c index b429f65a..68334c33 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3227,12 +3227,10 @@ void P_SetupSignExit(player_t *player) P_SetTarget(&thing->target, player->mo); P_SetMobjState(thing, S_SIGN1); - if (thing->info->seesound) - S_StartSound(thing, thing->info->seesound); // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (640<z += (768<movecount = 1; ++numfound; @@ -3257,12 +3255,10 @@ void P_SetupSignExit(player_t *player) P_SetTarget(&thing->target, player->mo); P_SetMobjState(thing, S_SIGN1); - if (thing->info->seesound) - S_StartSound(thing, thing->info->seesound); // SRB2Kart: Set sign spinning variables thing->movefactor = thing->z; - thing->z += (640<z += (768<movecount = 1; ++numfound; @@ -3274,12 +3270,10 @@ void P_SetupSignExit(player_t *player) // SRB2Kart: FINALLY, add in an alternative if no place is found if (player->mo) { - mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (640<mo->x, player->mo->y, player->mo->z + (768<target, player->mo); P_SetMobjState(sign, S_SIGN1); - if (sign->info->seesound) - S_StartSound(sign, sign->info->seesound); sign->movefactor = player->mo->floorz; sign->movecount = 1; } diff --git a/src/p_tick.c b/src/p_tick.c index 4cfba90f..357a4b1e 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -448,7 +448,7 @@ static inline void P_DoSpecialStageStuff(void) { if (playeringame[i]) { - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; players[i].pflags &= ~PF_GLIDING; } @@ -485,7 +485,7 @@ static inline void P_DoSpecialStageStuff(void) if (playeringame[i]) { players[i].mo->momx = players[i].mo->momy = 0; - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; } sstimer = 0; diff --git a/src/p_user.c b/src/p_user.c index 3120351c..0476777e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1751,7 +1751,7 @@ void P_DoPlayerExit(player_t *player) //countdown2 = countdown + 8*TICRATE; if (P_CheckRacers()) - player->exiting = (21*TICRATE)/5 + 1; + player->exiting = (28*TICRATE)/5 + 1; } else if (G_BattleGametype()) // Battle Mode exiting { @@ -1759,7 +1759,7 @@ void P_DoPlayerExit(player_t *player) P_EndingMusic(player); } else - player->exiting = (21*TICRATE)/5 + 2; // Accidental death safeguard??? + player->exiting = (28*TICRATE)/5 + 2; // Accidental death safeguard??? //player->pflags &= ~PF_GLIDING; /* // SRB2kart - don't need @@ -6569,7 +6569,7 @@ static void P_MovePlayer(player_t *player) S_StartSound(NULL, sfx_s3k6a); for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i]) - players[i].exiting = (21*TICRATE)/5 + 1; + players[i].exiting = (28*TICRATE)/5 + 1; } else if (player->health > 1) P_DamageMobj(player->mo, NULL, NULL, 1); @@ -9038,7 +9038,7 @@ void P_PlayerThink(player_t *player) } if (i == MAXPLAYERS && player->exiting == 6*TICRATE) // finished - player->exiting = (21*TICRATE)/5 + 1; + player->exiting = (28*TICRATE)/5 + 1; // If 10 seconds are left on the timer, // begin the drown music for countdown!