mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- Blood: Avoid integer truncation when updating player's sprite angle with actual angle of player.
* Fixes #256.
This commit is contained in:
parent
98ee5178aa
commit
41ad44bf40
2 changed files with 3 additions and 11 deletions
|
@ -683,7 +683,7 @@ void playerStart(int nPlayer, int bNewLevel)
|
|||
pSprite->z -= bottom - pSprite->z;
|
||||
pSprite->pal = 11+(pPlayer->teamId&3);
|
||||
pSprite->ang = pStartZone->ang;
|
||||
pPlayer->angold = pPlayer->angle.ang = buildang(pSprite->ang);
|
||||
pPlayer->angle.ang = buildang(pSprite->ang);
|
||||
pSprite->type = kDudePlayer1+nPlayer;
|
||||
pSprite->clipdist = pDudeInfo->clipdist;
|
||||
pSprite->flags = 15;
|
||||
|
@ -1285,11 +1285,7 @@ int ActionScan(PLAYER *pPlayer, int *a2, int *a3)
|
|||
|
||||
void UpdatePlayerSpriteAngle(PLAYER *pPlayer)
|
||||
{
|
||||
spritetype *pSprite = pPlayer->pSprite;
|
||||
|
||||
pPlayer->angle.ang += buildang(pSprite->ang) - pPlayer->angold;
|
||||
pPlayer->angold = pPlayer->angle.ang;
|
||||
pSprite->ang = pPlayer->angle.ang.asbuild();
|
||||
pPlayer->pSprite->ang = pPlayer->angle.ang.asbuild();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1339,9 +1335,7 @@ void ProcessInput(PLAYER *pPlayer)
|
|||
char bSeqStat = playerSeqPlaying(pPlayer, 16);
|
||||
if (pPlayer->fraggerId != -1)
|
||||
{
|
||||
pPlayer->angold = bvectangbam(sprite[pPlayer->fraggerId].x - pSprite->x, sprite[pPlayer->fraggerId].y - pSprite->y);
|
||||
pSprite->ang = pPlayer->angold.asbuild();
|
||||
pPlayer->angle.addadjustment(getincanglebam(pPlayer->angle.ang, pPlayer->angold));
|
||||
pPlayer->angle.addadjustment(getincanglebam(pPlayer->angle.ang, bvectangbam(sprite[pPlayer->fraggerId].x - pSprite->x, sprite[pPlayer->fraggerId].y - pSprite->y)));
|
||||
}
|
||||
pPlayer->deathTime += 4;
|
||||
if (!bSeqStat)
|
||||
|
@ -2271,7 +2265,6 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
|
|||
("pickupeffect", w.pickupEffect)
|
||||
("flasheffect", w.flashEffect)
|
||||
("quakeeffect", w.quakeEffect)
|
||||
("angold", w.angold)
|
||||
("player_par", w.player_par)
|
||||
("waterpal", w.nWaterPal)
|
||||
.Array("posturedata", &w.pPosture[0][0], &gPostureDefaults[0][0], kModeMax * kPostureMax) // only save actual changes in this.
|
||||
|
|
|
@ -174,7 +174,6 @@ struct PLAYER
|
|||
int pickupEffect;
|
||||
bool flashEffect; // if true, reduce pPlayer->visibility counter
|
||||
int quakeEffect;
|
||||
binangle angold;
|
||||
int player_par;
|
||||
int nWaterPal;
|
||||
POSTURE pPosture[kModeMax][kPostureMax];
|
||||
|
|
Loading…
Reference in a new issue