mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 11:21:01 +00:00
Allow player.lastlinehit and player.lastsidehit to be used outside of Knuckles' climbing ability
This commit is contained in:
parent
50e15840fb
commit
5c71fe0710
3 changed files with 15 additions and 9 deletions
14
src/p_map.c
14
src/p_map.c
|
@ -3443,9 +3443,17 @@ static boolean PTR_SlideTraverse(intercept_t *in)
|
|||
P_ProcessSpecialSector(slidemo->player, slidemo->subsector->sector, li->polyobj->lines[0]->backsector);
|
||||
}
|
||||
|
||||
if (slidemo->player && slidemo->player->charability == CA_GLIDEANDCLIMB
|
||||
&& (slidemo->player->pflags & PF_GLIDING || slidemo->player->climbing))
|
||||
PTR_GlideClimbTraverse(li);
|
||||
if (slidemo->player)
|
||||
{
|
||||
if (slidemo->player->charability == CA_GLIDEANDCLIMB
|
||||
&& (slidemo->player->pflags & PF_GLIDING || slidemo->player->climbing))
|
||||
PTR_GlideClimbTraverse(li);
|
||||
else
|
||||
{
|
||||
slidemo->player->lastsidehit = li->sidenum[P_PointOnLineSide(slidemo->x, slidemo->y, li)];
|
||||
slidemo->player->lastlinehit = (INT16)(li - lines);
|
||||
}
|
||||
}
|
||||
|
||||
if (in->frac < bestslidefrac && (!slidemo->player || !slidemo->player->climbing))
|
||||
{
|
||||
|
|
|
@ -11404,6 +11404,10 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
p->normalspeed = skins[p->skin].normalspeed;
|
||||
p->jumpfactor = skins[p->skin].jumpfactor;
|
||||
}
|
||||
|
||||
// Clear lastlinehit and lastsidehit
|
||||
p->lastsidehit = -1;
|
||||
p->lastlinehit = -1;
|
||||
|
||||
//awayview stuff
|
||||
p->awayviewmobj = NULL;
|
||||
|
|
|
@ -8601,12 +8601,6 @@ void P_MovePlayer(player_t *player)
|
|||
player->climbing--;
|
||||
}
|
||||
|
||||
if (!player->climbing)
|
||||
{
|
||||
player->lastsidehit = -1;
|
||||
player->lastlinehit = -1;
|
||||
}
|
||||
|
||||
// Make sure you're not teetering when you shouldn't be.
|
||||
if (player->panim == PA_EDGE
|
||||
&& (player->mo->momx || player->mo->momy || player->mo->momz))
|
||||
|
|
Loading…
Reference in a new issue