mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +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
1acbb77efb
commit
5767a25b14
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)
|
if (!mo->player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((mo->eflags & MFE_JUSTBOUNCEDWALL) || (mo->player->spectator))
|
if (mo->player->spectator)
|
||||||
{
|
{
|
||||||
P_SlideMove(mo, true);
|
P_SlideMove(mo, true);
|
||||||
return;
|
return;
|
||||||
|
|
@ -3898,8 +3898,16 @@ void P_BouncePlayerMove(mobj_t *mo)
|
||||||
if (bestslidefrac <= 0)
|
if (bestslidefrac <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
if (mo->eflags & MFE_JUSTBOUNCEDWALL) // Stronger push-out
|
||||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
{
|
||||||
|
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);
|
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;
|
INT32 hitcount;
|
||||||
fixed_t mmomx = 0, mmomy = 0;
|
fixed_t mmomx = 0, mmomy = 0;
|
||||||
|
|
||||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
|
||||||
{
|
|
||||||
P_SlideMove(mo, true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mo->player)
|
if (mo->player)
|
||||||
{
|
{
|
||||||
P_BouncePlayerMove(mo);
|
P_BouncePlayerMove(mo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
||||||
|
{
|
||||||
|
P_SlideMove(mo, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
slidemo = mo;
|
slidemo = mo;
|
||||||
hitcount = 0;
|
hitcount = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue