mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- global search&replace of ZatPoint calls with commonly named actor variables.
This commit is contained in:
parent
4ec1459ac0
commit
87689d3ba6
6 changed files with 36 additions and 36 deletions
|
@ -1099,7 +1099,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_HideInCeiling)
|
|||
F3DFloor * rover = self->Sector->e->XFloor.ffloors[i];
|
||||
if(!(rover->flags & FF_SOLID) || !(rover->flags & FF_EXISTS)) continue;
|
||||
|
||||
if ((foo = rover->bottom.plane->ZatPoint(self->x, self->y)) >= (self->z + self->height))
|
||||
if ((foo = rover->bottom.plane->ZatPoint(self)) >= (self->z + self->height))
|
||||
{
|
||||
self->z = foo + 4*FRACUNIT;
|
||||
self->bouncecount = i;
|
||||
|
|
|
@ -628,7 +628,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckTerrain)
|
|||
{
|
||||
sector_t *sec = self->Sector;
|
||||
|
||||
if (self->z == sec->floorplane.ZatPoint (self->x, self->y))
|
||||
if (self->z == sec->floorplane.ZatPoint(self))
|
||||
{
|
||||
if (sec->special == Damage_InstantDeath)
|
||||
{
|
||||
|
|
|
@ -593,8 +593,8 @@ int P_GetFriction(const AActor *mo, int *frictionfactor)
|
|||
if (!(rover->flags & FF_EXISTS)) continue;
|
||||
if (!(rover->flags & FF_SWIMMABLE)) continue;
|
||||
|
||||
if (mo->z > rover->top.plane->ZatPoint(mo->x, mo->y) ||
|
||||
mo->z < rover->bottom.plane->ZatPoint(mo->x, mo->y))
|
||||
if (mo->z > rover->top.plane->ZatPoint(mo) ||
|
||||
mo->z < rover->bottom.plane->ZatPoint(mo))
|
||||
continue;
|
||||
|
||||
newfriction = secfriction(rover->model, rover->top.isceiling);
|
||||
|
@ -623,13 +623,13 @@ int P_GetFriction(const AActor *mo, int *frictionfactor)
|
|||
if (rover->flags & FF_SOLID)
|
||||
{
|
||||
// Must be standing on a solid floor
|
||||
if (mo->z != rover->top.plane->ZatPoint(mo->x, mo->y)) continue;
|
||||
if (mo->z != rover->top.plane->ZatPoint(mo)) continue;
|
||||
}
|
||||
else if (rover->flags & FF_SWIMMABLE)
|
||||
{
|
||||
// Or on or inside a swimmable floor (e.g. in shallow water)
|
||||
if (mo->z > rover->top.plane->ZatPoint(mo->x, mo->y) ||
|
||||
(mo->z + mo->height) < rover->bottom.plane->ZatPoint(mo->x, mo->y))
|
||||
if (mo->z > rover->top.plane->ZatPoint(mo) ||
|
||||
(mo->z + mo->height) < rover->bottom.plane->ZatPoint(mo))
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
@ -650,9 +650,9 @@ int P_GetFriction(const AActor *mo, int *frictionfactor)
|
|||
}
|
||||
newfriction = secfriction(sec);
|
||||
if ((newfriction < friction || friction == ORIG_FRICTION) &&
|
||||
(mo->z <= sec->floorplane.ZatPoint(mo->x, mo->y) ||
|
||||
(mo->z <= sec->floorplane.ZatPoint(mo) ||
|
||||
(sec->GetHeightSec() != NULL &&
|
||||
mo->z <= sec->heightsec->floorplane.ZatPoint(mo->x, mo->y))))
|
||||
mo->z <= sec->heightsec->floorplane.ZatPoint(mo))))
|
||||
{
|
||||
friction = newfriction;
|
||||
movefactor = secmovefac(sec);
|
||||
|
@ -1798,10 +1798,10 @@ static void CheckForPushSpecial(line_t *line, int side, AActor *mobj, bool windo
|
|||
if (windowcheck && !(ib_compatflags & BCOMPATF_NOWINDOWCHECK) && line->backsector != NULL)
|
||||
{ // Make sure this line actually blocks us and is not a window
|
||||
// or similar construct we are standing inside of.
|
||||
fixed_t fzt = line->frontsector->ceilingplane.ZatPoint(mobj->x, mobj->y);
|
||||
fixed_t fzb = line->frontsector->floorplane.ZatPoint(mobj->x, mobj->y);
|
||||
fixed_t bzt = line->backsector->ceilingplane.ZatPoint(mobj->x, mobj->y);
|
||||
fixed_t bzb = line->backsector->floorplane.ZatPoint(mobj->x, mobj->y);
|
||||
fixed_t fzt = line->frontsector->ceilingplane.ZatPoint(mobj);
|
||||
fixed_t fzb = line->frontsector->floorplane.ZatPoint(mobj);
|
||||
fixed_t bzt = line->backsector->ceilingplane.ZatPoint(mobj);
|
||||
fixed_t bzb = line->backsector->floorplane.ZatPoint(mobj);
|
||||
if (fzt >= mobj->z + mobj->height && bzt >= mobj->z + mobj->height &&
|
||||
fzb <= mobj->z && bzb <= mobj->z)
|
||||
{
|
||||
|
@ -1812,8 +1812,8 @@ static void CheckForPushSpecial(line_t *line, int side, AActor *mobj, bool windo
|
|||
|
||||
if (!(rover->flags & FF_SOLID) || !(rover->flags & FF_EXISTS)) continue;
|
||||
|
||||
fixed_t ff_bottom = rover->bottom.plane->ZatPoint(mobj->x, mobj->y);
|
||||
fixed_t ff_top = rover->top.plane->ZatPoint(mobj->x, mobj->y);
|
||||
fixed_t ff_bottom = rover->bottom.plane->ZatPoint(mobj);
|
||||
fixed_t ff_top = rover->top.plane->ZatPoint(mobj);
|
||||
|
||||
if (ff_bottom < mobj->z + mobj->height && ff_top > mobj->z)
|
||||
{
|
||||
|
@ -2083,8 +2083,8 @@ bool P_TryMove(AActor *thing, fixed_t x, fixed_t y,
|
|||
{
|
||||
fixed_t eyez = oldz + viewheight;
|
||||
|
||||
oldAboveFakeFloor = eyez > oldsec->heightsec->floorplane.ZatPoint(thing->x, thing->y);
|
||||
oldAboveFakeCeiling = eyez > oldsec->heightsec->ceilingplane.ZatPoint(thing->x, thing->y);
|
||||
oldAboveFakeFloor = eyez > oldsec->heightsec->floorplane.ZatPoint(thing);
|
||||
oldAboveFakeCeiling = eyez > oldsec->heightsec->ceilingplane.ZatPoint(thing);
|
||||
}
|
||||
|
||||
// Borrowed from MBF:
|
||||
|
@ -2743,14 +2743,14 @@ const secplane_t * P_CheckSlopeWalk(AActor *actor, fixed_t &xmove, fixed_t &ymov
|
|||
}
|
||||
|
||||
const secplane_t *plane = &actor->floorsector->floorplane;
|
||||
fixed_t planezhere = plane->ZatPoint(actor->x, actor->y);
|
||||
fixed_t planezhere = plane->ZatPoint(actor);
|
||||
|
||||
for (unsigned int i = 0; i<actor->floorsector->e->XFloor.ffloors.Size(); i++)
|
||||
{
|
||||
F3DFloor * rover = actor->floorsector->e->XFloor.ffloors[i];
|
||||
if (!(rover->flags & FF_SOLID) || !(rover->flags & FF_EXISTS)) continue;
|
||||
|
||||
fixed_t thisplanez = rover->top.plane->ZatPoint(actor->x, actor->y);
|
||||
fixed_t thisplanez = rover->top.plane->ZatPoint(actor);
|
||||
|
||||
if (thisplanez>planezhere && thisplanez <= actor->z + actor->MaxStepHeight)
|
||||
{
|
||||
|
@ -2768,7 +2768,7 @@ const secplane_t * P_CheckSlopeWalk(AActor *actor, fixed_t &xmove, fixed_t &ymov
|
|||
F3DFloor * rover = actor->Sector->e->XFloor.ffloors[i];
|
||||
if (!(rover->flags & FF_SOLID) || !(rover->flags & FF_EXISTS)) continue;
|
||||
|
||||
fixed_t thisplanez = rover->top.plane->ZatPoint(actor->x, actor->y);
|
||||
fixed_t thisplanez = rover->top.plane->ZatPoint(actor);
|
||||
|
||||
if (thisplanez>planezhere && thisplanez <= actor->z + actor->MaxStepHeight)
|
||||
{
|
||||
|
|
|
@ -2077,7 +2077,7 @@ explode:
|
|||
if (tm.ceilingline &&
|
||||
tm.ceilingline->backsector &&
|
||||
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
|
||||
mo->z >= tm.ceilingline->backsector->ceilingplane.ZatPoint (mo->x, mo->y))
|
||||
mo->z >= tm.ceilingline->backsector->ceilingplane.ZatPoint(mo))
|
||||
{
|
||||
// Hack to prevent missiles exploding against the sky.
|
||||
// Does not handle sky floors.
|
||||
|
@ -2161,7 +2161,7 @@ explode:
|
|||
{ // Don't stop sliding if halfway off a step with some velocity
|
||||
if (mo->velx > FRACUNIT/4 || mo->velx < -FRACUNIT/4 || mo->vely > FRACUNIT/4 || mo->vely < -FRACUNIT/4)
|
||||
{
|
||||
if (mo->floorz > mo->Sector->floorplane.ZatPoint (mo->x, mo->y))
|
||||
if (mo->floorz > mo->Sector->floorplane.ZatPoint(mo))
|
||||
{
|
||||
if (mo->dropoffz != mo->floorz) // 3DMidtex or other special cases that must be excluded
|
||||
{
|
||||
|
@ -2407,7 +2407,7 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
|
|||
{ // Hit the floor
|
||||
if ((!mo->player || !(mo->player->cheats & CF_PREDICTING)) &&
|
||||
mo->Sector->SecActTarget != NULL &&
|
||||
mo->Sector->floorplane.ZatPoint (mo->x, mo->y) == mo->floorz)
|
||||
mo->Sector->floorplane.ZatPoint(mo) == mo->floorz)
|
||||
{ // [RH] Let the sector do something to the actor
|
||||
mo->Sector->SecActTarget->TriggerAction (mo, SECSPAC_HitFloor);
|
||||
}
|
||||
|
@ -2509,7 +2509,7 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
|
|||
{ // hit the ceiling
|
||||
if ((!mo->player || !(mo->player->cheats & CF_PREDICTING)) &&
|
||||
mo->Sector->SecActTarget != NULL &&
|
||||
mo->Sector->ceilingplane.ZatPoint (mo->x, mo->y) == mo->ceilingz)
|
||||
mo->Sector->ceilingplane.ZatPoint(mo) == mo->ceilingz)
|
||||
{ // [RH] Let the sector do something to the actor
|
||||
mo->Sector->SecActTarget->TriggerAction (mo, SECSPAC_HitCeiling);
|
||||
}
|
||||
|
@ -2564,7 +2564,7 @@ void P_CheckFakeFloorTriggers (AActor *mo, fixed_t oldz, bool oldz_has_viewheigh
|
|||
if (sec->heightsec != NULL && sec->SecActTarget != NULL)
|
||||
{
|
||||
sector_t *hs = sec->heightsec;
|
||||
fixed_t waterz = hs->floorplane.ZatPoint (mo->x, mo->y);
|
||||
fixed_t waterz = hs->floorplane.ZatPoint(mo);
|
||||
fixed_t newz;
|
||||
fixed_t viewheight;
|
||||
|
||||
|
@ -2599,7 +2599,7 @@ void P_CheckFakeFloorTriggers (AActor *mo, fixed_t oldz, bool oldz_has_viewheigh
|
|||
|
||||
if (!(hs->MoreFlags & SECF_FAKEFLOORONLY))
|
||||
{
|
||||
waterz = hs->ceilingplane.ZatPoint (mo->x, mo->y);
|
||||
waterz = hs->ceilingplane.ZatPoint(mo);
|
||||
if (oldz <= waterz && newz > waterz)
|
||||
{ // View went above fake ceiling
|
||||
sec->SecActTarget->TriggerAction (mo, SECSPAC_EyesAboveC);
|
||||
|
@ -5493,7 +5493,7 @@ bool P_HitFloor (AActor *thing)
|
|||
// don't splash if landing on the edge above water/lava/etc....
|
||||
for (m = thing->touching_sectorlist; m; m = m->m_tnext)
|
||||
{
|
||||
if (thing->z == m->m_sector->floorplane.ZatPoint (thing->x, thing->y))
|
||||
if (thing->z == m->m_sector->floorplane.ZatPoint(thing))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -5505,7 +5505,7 @@ bool P_HitFloor (AActor *thing)
|
|||
if (!(rover->flags & FF_EXISTS)) continue;
|
||||
if (rover->flags & (FF_SOLID|FF_SWIMMABLE))
|
||||
{
|
||||
if (rover->top.plane->ZatPoint(thing->x, thing->y) == thing->z)
|
||||
if (rover->top.plane->ZatPoint(thing) == thing->z)
|
||||
{
|
||||
return P_HitWater (thing, m->m_sector);
|
||||
}
|
||||
|
|
|
@ -430,7 +430,7 @@ void P_PlayerInSpecialSector (player_t *player, sector_t * sector)
|
|||
{
|
||||
// Falling, not all the way down yet?
|
||||
sector = player->mo->Sector;
|
||||
if (player->mo->z != sector->floorplane.ZatPoint (player->mo->x, player->mo->y)
|
||||
if (player->mo->z != sector->floorplane.ZatPoint(player->mo)
|
||||
&& !player->mo->waterlevel)
|
||||
{
|
||||
return;
|
||||
|
@ -507,7 +507,7 @@ static void DoSectorDamage(AActor *actor, sector_t *sec, int amount, FName type,
|
|||
if (!(flags & DAMAGE_PLAYERS) && actor->player != NULL)
|
||||
return;
|
||||
|
||||
if (!(flags & DAMAGE_IN_AIR) && actor->z != sec->floorplane.ZatPoint(actor->x, actor->y) && !actor->waterlevel)
|
||||
if (!(flags & DAMAGE_IN_AIR) && actor->z != sec->floorplane.ZatPoint(actor) && !actor->waterlevel)
|
||||
return;
|
||||
|
||||
if (protectClass != NULL)
|
||||
|
@ -544,8 +544,8 @@ void P_SectorDamage(int tag, int amount, FName type, const PClass *protectClass,
|
|||
{
|
||||
next = actor->snext;
|
||||
// Only affect actors touching the 3D floor
|
||||
fixed_t z1 = sec->floorplane.ZatPoint(actor->x, actor->y);
|
||||
fixed_t z2 = sec->ceilingplane.ZatPoint(actor->x, actor->y);
|
||||
fixed_t z1 = sec->floorplane.ZatPoint(actor);
|
||||
fixed_t z2 = sec->ceilingplane.ZatPoint(actor);
|
||||
if (z2 < z1)
|
||||
{
|
||||
// Account for Vavoom-style 3D floors
|
||||
|
@ -2281,7 +2281,7 @@ void DPusher::Tick ()
|
|||
}
|
||||
else // special water sector
|
||||
{
|
||||
ht = hsec->floorplane.ZatPoint (thing->x, thing->y);
|
||||
ht = hsec->floorplane.ZatPoint(thing);
|
||||
if (thing->z > ht) // above ground
|
||||
{
|
||||
xspeed = m_Xmag; // full force
|
||||
|
@ -2310,7 +2310,7 @@ void DPusher::Tick ()
|
|||
{ // special water sector
|
||||
floor = &hsec->floorplane;
|
||||
}
|
||||
if (thing->z > floor->ZatPoint (thing->x, thing->y))
|
||||
if (thing->z > floor->ZatPoint(thing))
|
||||
{ // above ground
|
||||
xspeed = yspeed = 0; // no force
|
||||
}
|
||||
|
|
|
@ -1238,8 +1238,8 @@ bool FPolyObj::CheckMobjBlocking (side_t *sd)
|
|||
}
|
||||
// [BL] See if we hit below the floor/ceiling of the poly.
|
||||
else if(!performBlockingThrust && (
|
||||
mobj->z < ld->sidedef[!side]->sector->GetSecPlane(sector_t::floor).ZatPoint(mobj->x, mobj->y) ||
|
||||
mobj->z + mobj->height > ld->sidedef[!side]->sector->GetSecPlane(sector_t::ceiling).ZatPoint(mobj->x, mobj->y)
|
||||
mobj->z < ld->sidedef[!side]->sector->GetSecPlane(sector_t::floor).ZatPoint(mobj) ||
|
||||
mobj->z + mobj->height > ld->sidedef[!side]->sector->GetSecPlane(sector_t::ceiling).ZatPoint(mobj)
|
||||
))
|
||||
{
|
||||
performBlockingThrust = true;
|
||||
|
|
Loading…
Reference in a new issue