mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- Blood: Promote pPlayer->angold
to binangle class.
This commit is contained in:
parent
232dd5e07a
commit
f429871cc6
2 changed files with 9 additions and 8 deletions
|
@ -707,8 +707,8 @@ void playerStart(int nPlayer, int bNewLevel)
|
||||||
GetSpriteExtents(pSprite, &top, &bottom);
|
GetSpriteExtents(pSprite, &top, &bottom);
|
||||||
pSprite->z -= bottom - pSprite->z;
|
pSprite->z -= bottom - pSprite->z;
|
||||||
pSprite->pal = 11+(pPlayer->teamId&3);
|
pSprite->pal = 11+(pPlayer->teamId&3);
|
||||||
pPlayer->angold = pSprite->ang = pStartZone->ang;
|
pSprite->ang = pStartZone->ang;
|
||||||
pPlayer->angle.ang = buildang(pSprite->ang);
|
pPlayer->angold = pPlayer->angle.ang = buildang(pSprite->ang);
|
||||||
pSprite->type = kDudePlayer1+nPlayer;
|
pSprite->type = kDudePlayer1+nPlayer;
|
||||||
pSprite->clipdist = pDudeInfo->clipdist;
|
pSprite->clipdist = pDudeInfo->clipdist;
|
||||||
pSprite->flags = 15;
|
pSprite->flags = 15;
|
||||||
|
@ -1312,8 +1312,9 @@ void UpdatePlayerSpriteAngle(PLAYER *pPlayer)
|
||||||
{
|
{
|
||||||
spritetype *pSprite = pPlayer->pSprite;
|
spritetype *pSprite = pPlayer->pSprite;
|
||||||
|
|
||||||
pPlayer->angle.ang += buildang(pSprite->ang - pPlayer->angold);
|
pPlayer->angle.ang += buildang(pSprite->ang) - pPlayer->angold;
|
||||||
pPlayer->angold = pSprite->ang = pPlayer->angle.ang.asbuild();
|
pPlayer->angold = pPlayer->angle.ang;
|
||||||
|
pSprite->ang = pPlayer->angle.ang.asbuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessInput(PLAYER *pPlayer)
|
void ProcessInput(PLAYER *pPlayer)
|
||||||
|
@ -1346,9 +1347,9 @@ void ProcessInput(PLAYER *pPlayer)
|
||||||
char bSeqStat = playerSeqPlaying(pPlayer, 16);
|
char bSeqStat = playerSeqPlaying(pPlayer, 16);
|
||||||
if (pPlayer->fraggerId != -1)
|
if (pPlayer->fraggerId != -1)
|
||||||
{
|
{
|
||||||
auto fraggerAng = bvectangbam(sprite[pPlayer->fraggerId].x - pSprite->x, sprite[pPlayer->fraggerId].y - pSprite->y);
|
pPlayer->angold = bvectangbam(sprite[pPlayer->fraggerId].x - pSprite->x, sprite[pPlayer->fraggerId].y - pSprite->y);
|
||||||
pPlayer->angold = pSprite->ang = fraggerAng.asbuild();
|
pSprite->ang = pPlayer->angold.asbuild();
|
||||||
pPlayer->angle.addadjustment(getincanglebam(pPlayer->angle.ang, fraggerAng));
|
pPlayer->angle.addadjustment(getincanglebam(pPlayer->angle.ang, pPlayer->angold));
|
||||||
}
|
}
|
||||||
pPlayer->deathTime += 4;
|
pPlayer->deathTime += 4;
|
||||||
if (!bSeqStat)
|
if (!bSeqStat)
|
||||||
|
|
|
@ -175,7 +175,7 @@ struct PLAYER
|
||||||
int pickupEffect;
|
int pickupEffect;
|
||||||
bool flashEffect; // if true, reduce pPlayer->visibility counter
|
bool flashEffect; // if true, reduce pPlayer->visibility counter
|
||||||
int quakeEffect;
|
int quakeEffect;
|
||||||
int angold;
|
binangle angold;
|
||||||
int player_par;
|
int player_par;
|
||||||
int nWaterPal;
|
int nWaterPal;
|
||||||
POSTURE pPosture[kModeMax][kPostureMax];
|
POSTURE pPosture[kModeMax][kPostureMax];
|
||||||
|
|
Loading…
Reference in a new issue