mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-20 19:02:37 +00:00
Infinite wall bump fix(?)
Couldn't replicate it at all after this change, but I also have trouble replicating it before it :v
This commit is contained in:
parent
31aa96ecdc
commit
14d178ed4b
1 changed files with 17 additions and 9 deletions
26
src/p_map.c
26
src/p_map.c
|
@ -3844,7 +3844,7 @@ void P_BouncePlayerMove(mobj_t *mo)
|
|||
if (!mo->player)
|
||||
return;
|
||||
|
||||
if ((mo->eflags & MFE_JUSTBOUNCEDWALL) || (mo->player->spectator))
|
||||
if (mo->player->spectator)
|
||||
{
|
||||
P_SlideMove(mo, true);
|
||||
return;
|
||||
|
@ -3898,8 +3898,16 @@ void P_BouncePlayerMove(mobj_t *mo)
|
|||
if (bestslidefrac <= 0)
|
||||
return;
|
||||
|
||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL) // Stronger push-out
|
||||
{
|
||||
tmxmove = mmomx;
|
||||
tmymove = mmomy;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
}
|
||||
|
||||
{
|
||||
mobj_t *fx = P_SpawnMobj(mo->x, mo->y, mo->z, MT_BUMP);
|
||||
|
@ -3936,18 +3944,18 @@ void P_BounceMove(mobj_t *mo)
|
|||
INT32 hitcount;
|
||||
fixed_t mmomx = 0, mmomy = 0;
|
||||
|
||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
||||
{
|
||||
P_SlideMove(mo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mo->player)
|
||||
{
|
||||
P_BouncePlayerMove(mo);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
||||
{
|
||||
P_SlideMove(mo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
slidemo = mo;
|
||||
hitcount = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue