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
|
@ -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 (slope->flags & SL_NOPHYSICS) { // No physics, no need to make anything complicated.
|
||||||
if (P_MobjFlip(thing)*(thing->momz) < 0) { // falling, land on slope
|
if (P_MobjFlip(thing)*(thing->momz) < 0) { // falling, land on slope
|
||||||
thing->momz = -P_MobjFlip(thing);
|
//thing->momz = -P_MobjFlip(thing);
|
||||||
thing->standingslope = slope;
|
thing->standingslope = slope;
|
||||||
}
|
}
|
||||||
return;
|
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
|
if (P_MobjFlip(thing)*mom.z < 0) { // falling, land on slope
|
||||||
thing->momx = mom.x;
|
thing->momx = mom.x;
|
||||||
thing->momy = mom.y;
|
thing->momy = mom.y;
|
||||||
thing->momz = -P_MobjFlip(thing);
|
//thing->momz = -P_MobjFlip(thing);
|
||||||
|
|
||||||
thing->standingslope = slope;
|
thing->standingslope = slope;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4730,6 +4730,7 @@ void P_DoAbilityBounce(player_t *player, boolean changemomz)
|
||||||
return;
|
return;
|
||||||
if (changemomz)
|
if (changemomz)
|
||||||
{
|
{
|
||||||
|
fixed_t minmomz;
|
||||||
prevmomz = player->mo->momz;
|
prevmomz = player->mo->momz;
|
||||||
if (P_MobjFlip(player->mo)*prevmomz < 0)
|
if (P_MobjFlip(player->mo)*prevmomz < 0)
|
||||||
prevmomz = 0;
|
prevmomz = 0;
|
||||||
|
@ -4737,7 +4738,8 @@ void P_DoAbilityBounce(player_t *player, boolean changemomz)
|
||||||
prevmomz /= 2;
|
prevmomz /= 2;
|
||||||
P_DoJump(player, false);
|
P_DoJump(player, false);
|
||||||
player->pflags &= ~(PF_STARTJUMP|PF_JUMPED);
|
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);
|
S_StartSound(player->mo, sfx_boingf);
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_BOUNCE_LANDING);
|
P_SetPlayerMobjState(player->mo, S_PLAY_BOUNCE_LANDING);
|
||||||
|
|
Loading…
Reference in New Issue