Make nightsbumper more accurate to v1
This commit is contained in:
parent
0306fee5b9
commit
a8a4c1a8ef
2 changed files with 4 additions and 13 deletions
|
|
@ -883,13 +883,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (player->exiting)
|
||||
return;
|
||||
|
||||
if (player->bumpertime <= (TICRATE/2)-5)
|
||||
if (player->bumpertime < TICRATE/4)
|
||||
{
|
||||
S_StartSound(toucher, special->info->seesound);
|
||||
angle_t fa;
|
||||
fixed_t xspeed, yspeed;
|
||||
const fixed_t speed = FixedMul(FixedDiv(special->info->speed*FRACUNIT,75*FRACUNIT), FixedSqrt(FixedMul(toucher->scale,special->scale)));
|
||||
|
||||
S_StartSound(toucher, special->info->seesound);
|
||||
|
||||
player->bumpertime = TICRATE/2;
|
||||
|
||||
P_UnsetThingPosition(toucher);
|
||||
|
|
@ -915,7 +916,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
|
||||
P_ResetPlayer(player);
|
||||
|
||||
P_SetPlayerMobjState(toucher, S_KART_STILL);
|
||||
P_SetPlayerMobjState(toucher, S_KART_STILL); // SRB2kart - was S_PLAY_FALL1
|
||||
}
|
||||
return;
|
||||
|
||||
|
|
|
|||
10
src/p_user.c
10
src/p_user.c
|
|
@ -4069,16 +4069,6 @@ void P_PlayerThink(player_t *player)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (player->bumpertime == TICRATE/2 && player->mo->hnext)
|
||||
{
|
||||
// Center player to NiGHTS bumper here because if you try to set player's position in
|
||||
// P_TouchSpecialThing case MT_NIGHTSBUMPER, that position is fudged in the time
|
||||
// between that routine in the previous tic
|
||||
// and reaching here in the current tic
|
||||
P_MoveOrigin(player->mo, player->mo->hnext->x, player->mo->hnext->y
|
||||
, player->mo->hnext->z + FixedMul(player->mo->hnext->height/4, player->mo->hnext->scale));
|
||||
P_SetTarget(&player->mo->hnext, NULL);
|
||||
}
|
||||
// Move around.
|
||||
P_MovePlayer(player);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue