mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
- eliminated one UpdateActor pverload.
This commit is contained in:
parent
f750ea8a70
commit
00436bfdac
5 changed files with 10 additions and 16 deletions
|
@ -533,11 +533,6 @@ void InitSpriteLists();
|
||||||
void SetActorZ(DCoreActor* actor, const vec3_t* newpos);
|
void SetActorZ(DCoreActor* actor, const vec3_t* newpos);
|
||||||
void SetActor(DCoreActor* actor, const vec3_t* newpos);
|
void SetActor(DCoreActor* actor, const vec3_t* newpos);
|
||||||
|
|
||||||
inline void SetActor(DCoreActor* actor, const vec3_t& newpos)
|
|
||||||
{
|
|
||||||
SetActor(actor, &newpos);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void SetActorZ(DCoreActor* actor, const vec3_t& newpos)
|
inline void SetActorZ(DCoreActor* actor, const vec3_t& newpos)
|
||||||
{
|
{
|
||||||
SetActorZ(actor, &newpos);
|
SetActorZ(actor, &newpos);
|
||||||
|
|
|
@ -86,7 +86,9 @@ bool CheckProximityPoint(int nX1, int nY1, int nZ1, int nX2, int nY2, int nZ2, i
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
// Note: This function features some very bad math.
|
||||||
|
// It cannot be redone because some game functionality
|
||||||
|
// depends on the math being broken.
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ enum {
|
||||||
|
|
||||||
bool CheckProximity(DBloodActor* pSprite, const DVector3& pos, sectortype* pSector, int nDist);
|
bool CheckProximity(DBloodActor* pSprite, const DVector3& pos, sectortype* pSector, int nDist);
|
||||||
bool CheckProximityPoint(int nX1, int nY1, int nZ1, int nX2, int nY2, int nZ2, int nDist);
|
bool CheckProximityPoint(int nX1, int nY1, int nZ1, int nX2, int nY2, int nZ2, int nDist);
|
||||||
bool CheckProximityWall(walltype* pWall, int x, int y, int nDist);
|
|
||||||
int GetWallAngle(walltype* pWall);
|
int GetWallAngle(walltype* pWall);
|
||||||
void GetWallNormal(walltype* pWall, int* pX, int* pY);
|
void GetWallNormal(walltype* pWall, int* pX, int* pY);
|
||||||
bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int x2, int y2, int z2, int* ix, int* iy, int* iz);
|
bool IntersectRay(int wx, int wy, int wdx, int wdy, int x1, int y1, int z1, int x2, int y2, int z2, int* ix, int* iy, int* iz);
|
||||||
|
|
|
@ -1424,7 +1424,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t &oldpos)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetActor(proj, oldpos);
|
SetActor(proj, &oldpos);
|
||||||
fi.checkhitwall(proj, wal, proj->int_pos().X, proj->int_pos().Y, proj->int_pos().Z, proj->spr.picnum);
|
fi.checkhitwall(proj, wal, proj->int_pos().X, proj->int_pos().Y, proj->int_pos().Z, proj->spr.picnum);
|
||||||
|
|
||||||
if (proj->spr.picnum == FREEZEBLAST)
|
if (proj->spr.picnum == FREEZEBLAST)
|
||||||
|
@ -1451,7 +1451,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t &oldpos)
|
||||||
|
|
||||||
static bool weaponhitsector(DDukeActor* proj, const vec3_t& oldpos, bool fireball)
|
static bool weaponhitsector(DDukeActor* proj, const vec3_t& oldpos, bool fireball)
|
||||||
{
|
{
|
||||||
SetActor(proj, oldpos);
|
SetActor(proj, &oldpos);
|
||||||
|
|
||||||
if (proj->spr.zvel < 0)
|
if (proj->spr.zvel < 0)
|
||||||
{
|
{
|
||||||
|
@ -2458,9 +2458,7 @@ static void flamethrowerflame(DDukeActor *actor)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dax = actor->int_pos().X;
|
auto dapos = actor->spr.pos;
|
||||||
int day = actor->int_pos().Y;
|
|
||||||
int daz = actor->int_pos().Z;
|
|
||||||
int xvel = actor->spr.xvel;
|
int xvel = actor->spr.xvel;
|
||||||
|
|
||||||
getglobalz(actor);
|
getglobalz(actor);
|
||||||
|
@ -2514,12 +2512,12 @@ static void flamethrowerflame(DDukeActor *actor)
|
||||||
}
|
}
|
||||||
else if (coll.type == kHitWall)
|
else if (coll.type == kHitWall)
|
||||||
{
|
{
|
||||||
SetActor(actor, vec3_t( dax, day, daz ));
|
SetActor(actor, dapos);
|
||||||
fi.checkhitwall(actor, coll.hitWall, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.picnum);
|
fi.checkhitwall(actor, coll.hitWall, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.picnum);
|
||||||
}
|
}
|
||||||
else if (coll.type == kHitSector)
|
else if (coll.type == kHitSector)
|
||||||
{
|
{
|
||||||
SetActor(actor, vec3_t(dax, day, daz));
|
SetActor(actor, dapos);
|
||||||
if (actor->spr.zvel < 0)
|
if (actor->spr.zvel < 0)
|
||||||
fi.checkhitceiling(actor->sector());
|
fi.checkhitceiling(actor->sector());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1059,7 +1059,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t& oldpos)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetActor(proj, oldpos);
|
SetActor(proj, &oldpos);
|
||||||
fi.checkhitwall(proj, wal, proj->int_pos().X, proj->int_pos().Y, proj->int_pos().Z, proj->spr.picnum);
|
fi.checkhitwall(proj, wal, proj->int_pos().X, proj->int_pos().Y, proj->int_pos().Z, proj->spr.picnum);
|
||||||
|
|
||||||
if (!isRRRA() && proj->spr.picnum == FREEZEBLAST)
|
if (!isRRRA() && proj->spr.picnum == FREEZEBLAST)
|
||||||
|
@ -1126,7 +1126,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t& oldpos)
|
||||||
|
|
||||||
bool weaponhitsector(DDukeActor *proj, const vec3_t& oldpos)
|
bool weaponhitsector(DDukeActor *proj, const vec3_t& oldpos)
|
||||||
{
|
{
|
||||||
SetActor(proj, oldpos);
|
SetActor(proj, &oldpos);
|
||||||
|
|
||||||
if (isRRRA() && proj->GetOwner() && proj->GetOwner()->spr.picnum == MAMA)
|
if (isRRRA() && proj->GetOwner() && proj->GetOwner()->spr.picnum == MAMA)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue