mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
parent
0b115ac9c7
commit
73df144f65
2 changed files with 8 additions and 5 deletions
|
@ -884,7 +884,8 @@ struct PLAYERstruct
|
||||||
|
|
||||||
short pnum; // carry along the player number
|
short pnum; // carry along the player number
|
||||||
|
|
||||||
short LadderSector,LadderAngle;
|
short LadderSector;
|
||||||
|
binangle LadderAngle;
|
||||||
int lx,ly; // ladder x and y
|
int lx,ly; // ladder x and y
|
||||||
short JumpDuration;
|
short JumpDuration;
|
||||||
short WadeDepth;
|
short WadeDepth;
|
||||||
|
|
|
@ -3652,7 +3652,7 @@ DoPlayerClimb(PLAYERp pp)
|
||||||
ny = MOVEy(100, lsp->ang);
|
ny = MOVEy(100, lsp->ang);
|
||||||
|
|
||||||
// set angle player is supposed to face.
|
// set angle player is supposed to face.
|
||||||
pp->LadderAngle = NORM_ANGLE(lsp->ang + 1024);
|
pp->LadderAngle = buildang(lsp->ang + 1024);
|
||||||
pp->LadderSector = wall[wal].nextsector;
|
pp->LadderSector = wall[wal].nextsector;
|
||||||
|
|
||||||
// set players "view" distance from the ladder - needs to be farther than
|
// set players "view" distance from the ladder - needs to be farther than
|
||||||
|
@ -3661,7 +3661,8 @@ DoPlayerClimb(PLAYERp pp)
|
||||||
pp->lx = lsp->x + nx * 5;
|
pp->lx = lsp->x + nx * 5;
|
||||||
pp->ly = lsp->y + ny * 5;
|
pp->ly = lsp->y + ny * 5;
|
||||||
|
|
||||||
pp->angle.settarget(pp->LadderAngle);
|
auto& PlayerAngle = pp->angle.ang;
|
||||||
|
pp->angle.settarget(PlayerAngle + getincanglebam(PlayerAngle, pp->LadderAngle));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4058,7 +4059,7 @@ PlayerOnLadder(PLAYERp pp)
|
||||||
ny = MOVEy(100, lsp->ang);
|
ny = MOVEy(100, lsp->ang);
|
||||||
|
|
||||||
// set angle player is supposed to face.
|
// set angle player is supposed to face.
|
||||||
pp->LadderAngle = NORM_ANGLE(lsp->ang + 1024);
|
pp->LadderAngle = buildang(lsp->ang + 1024);
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (wall[wal].nextsector < 0)
|
if (wall[wal].nextsector < 0)
|
||||||
|
@ -4077,7 +4078,8 @@ PlayerOnLadder(PLAYERp pp)
|
||||||
pp->lx = lsp->x + nx * 5;
|
pp->lx = lsp->x + nx * 5;
|
||||||
pp->ly = lsp->y + ny * 5;
|
pp->ly = lsp->y + ny * 5;
|
||||||
|
|
||||||
pp->angle.settarget(pp->LadderAngle);
|
auto& PlayerAngle = pp->angle.ang;
|
||||||
|
pp->angle.settarget(PlayerAngle + getincanglebam(PlayerAngle, pp->LadderAngle));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue