- floatify nPlayerD

This commit is contained in:
Christoph Oelckers 2022-09-11 00:12:43 +02:00
parent 3709b61fd1
commit e3e11300ac
3 changed files with 4 additions and 6 deletions

View file

@ -702,8 +702,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, double fZOffset, DA
int nPlayer = GetPlayerFromActor(pTarget);
if (nPlayer > -1)
{
xy.X += PlayerList[nPlayer].nPlayerD.X * (15. / 16.);
xy.Y += PlayerList[nPlayer].nPlayerD.Y * (15. / 16.);
xy += PlayerList[nPlayer].nPlayerD * (15. / 16.);
}
}

View file

@ -1060,7 +1060,7 @@ sectdone:
PlayerList[nPlayer].ototalvel = PlayerList[nPlayer].totalvel;
PlayerList[nPlayer].totalvel = playerPos.Length() * worldtoint;
PlayerList[nPlayer].totalvel = playerPos.Length() * 16;
auto pViewSect = pPlayerActor->sector();
@ -1112,8 +1112,7 @@ sectdone:
// loc_1ADAF
PlayerList[nPlayer].pPlayerViewSect = pViewSect;
PlayerList[nPlayer].nPlayerD.X = int((pPlayerActor->spr.pos.X - spr_pos.X) * worldtoint);
PlayerList[nPlayer].nPlayerD.Y = int((pPlayerActor->spr.pos.Y - spr_pos.Y) * worldtoint);
PlayerList[nPlayer].nPlayerD = (pPlayerActor->spr.pos - spr_pos);
int var_5C = pViewSect->Flag & kSectUnderwater;

View file

@ -92,7 +92,7 @@ struct Player
int16_t nPlayerScore;
int16_t nPlayerColor;
int16_t nPistolClip;
vec2_t nPlayerD;
DVector2 nPlayerD;
DVector2 nThrust;
int16_t nPlayerOldWeapon;
int16_t nPlayerClip;