- got rid of the int version of playerFireMissile

This commit is contained in:
Christoph Oelckers 2022-09-29 12:42:18 +02:00
parent 8673d692f0
commit cab00d05dc
3 changed files with 4 additions and 16 deletions

View file

@ -54,15 +54,9 @@ void GetZRange(DBloodActor* pSprite, double* ceilZ, Collision* ceilHit, double*
void GetZRangeAtXYZ(const DVector3& pos, sectortype* pSector, double* ceilZ, Collision* ceilHit, double* floorZ, Collision* floorHit, int nDist, unsigned int nMask, unsigned int nClipParallax = 0);
[[deprecated]] // take care of this together with the engines clipmove.
void ClipMove(vec3_t& pos, sectortype** pSector, int xv, int yv, int wd, int cd, int fd, unsigned int nMask, CollisionBase& hit, int tracecount = 3);
inline void ClipMove(DVector3& pos, sectortype** pSector, int xv, int yv, int wd, int cd, int fd, unsigned int nMask, CollisionBase& hit, int tracecount = 3)
{
// this uses floats only partially.
vec3_t ipos = { int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint)};
ClipMove(ipos, pSector, xv, yv, wd, cd, fd, nMask, hit, tracecount);
pos = { ipos.X * inttoworld, ipos.Y * inttoworld, ipos.Z * zinttoworld };
}
inline void ClipMove(DVector3& pos, sectortype** pSector, const DVector2& vect, int wd, double cd, double fd, unsigned int nMask, CollisionBase& hit, int tracecount = 3)
void ClipMove(DVector3& pos, sectortype** pSector, const DVector2& vect, int wd, double cd, double fd, unsigned int nMask, CollisionBase& hit, int tracecount = 3)
{
// this uses floats only partially.
vec3_t ipos = { int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint)};

View file

@ -1912,10 +1912,8 @@ void playerProcess(PLAYER* pPlayer)
//
//---------------------------------------------------------------------------
DBloodActor* playerFireMissile(PLAYER* pPlayer, int xyoff_, int dx, int dy, int dz, int nType)
DBloodActor* playerFireMissile(PLAYER* pPlayer, double xyoff, const DVector3& dv, int nType)
{
double xyoff = xyoff_ * inttoworld;
DVector3 dv(FixedToFloat<14>(dx), FixedToFloat<14>(dy), FixedToFloat<14>(dz));
return actFireMissile(pPlayer->actor, xyoff, pPlayer->zWeapon - pPlayer->actor->spr.pos.Z, dv, nType);
}

View file

@ -235,11 +235,7 @@ void playerInit(int nPlayer, unsigned int a2);
void CheckPickUp(PLAYER* pPlayer);
void ProcessInput(PLAYER* pPlayer);
void playerProcess(PLAYER* pPlayer);
DBloodActor* playerFireMissile(PLAYER* pPlayer, int xyoff, int dx, int dy, int dz, int nType);
inline DBloodActor* playerFireMissile(PLAYER* pPlayer, double xyoff, const DVector3& vec, int nType)
{
return playerFireMissile(pPlayer, int(xyoff * worldtoint), vec.X * 16384, vec.Y * 16384, vec.Z * 16384, nType);
}
DBloodActor* playerFireMissile(PLAYER* pPlayer, double xyoff, const DVector3& vec, int nType);
DBloodActor* playerFireThing(PLAYER* pPlayer, int xyoff, int zvel, int thingType, int nSpeed);
void playerFrag(PLAYER* pKiller, PLAYER* pVictim);