mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Merge branch 'fang-fixes' into 'master'
Fang fixes Closes #154 and #140 See merge request STJr/SRB2Internal!285
This commit is contained in:
commit
506093acbb
2 changed files with 5 additions and 3 deletions
|
@ -717,7 +717,7 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope)
|
|||
|
||||
if (slope->flags & SL_NOPHYSICS) { // No physics, no need to make anything complicated.
|
||||
if (P_MobjFlip(thing)*(thing->momz) < 0) { // falling, land on slope
|
||||
thing->momz = -P_MobjFlip(thing);
|
||||
//thing->momz = -P_MobjFlip(thing);
|
||||
thing->standingslope = slope;
|
||||
}
|
||||
return;
|
||||
|
@ -732,7 +732,7 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope)
|
|||
if (P_MobjFlip(thing)*mom.z < 0) { // falling, land on slope
|
||||
thing->momx = mom.x;
|
||||
thing->momy = mom.y;
|
||||
thing->momz = -P_MobjFlip(thing);
|
||||
//thing->momz = -P_MobjFlip(thing);
|
||||
|
||||
thing->standingslope = slope;
|
||||
}
|
||||
|
|
|
@ -4730,6 +4730,7 @@ void P_DoAbilityBounce(player_t *player, boolean changemomz)
|
|||
return;
|
||||
if (changemomz)
|
||||
{
|
||||
fixed_t minmomz;
|
||||
prevmomz = player->mo->momz;
|
||||
if (P_MobjFlip(player->mo)*prevmomz < 0)
|
||||
prevmomz = 0;
|
||||
|
@ -4737,7 +4738,8 @@ void P_DoAbilityBounce(player_t *player, boolean changemomz)
|
|||
prevmomz /= 2;
|
||||
P_DoJump(player, false);
|
||||
player->pflags &= ~(PF_STARTJUMP|PF_JUMPED);
|
||||
player->mo->momz = (FixedMul(player->mo->momz, 3*FRACUNIT/2) + prevmomz)/2;
|
||||
minmomz = FixedMul(player->mo->momz, 3*FRACUNIT/2);
|
||||
player->mo->momz = max(minmomz, (minmomz + prevmomz)/2);
|
||||
}
|
||||
S_StartSound(player->mo, sfx_boingf);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_BOUNCE_LANDING);
|
||||
|
|
Loading…
Reference in a new issue