mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- trivial replacements in SW.
This commit is contained in:
parent
7152868077
commit
6111b11359
8 changed files with 30 additions and 30 deletions
|
@ -720,7 +720,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case TOUCHPLATE:
|
||||
act->temp_data[2] = sectp->int_floorz();
|
||||
if (sectp->lotag != 1 && sectp->lotag != 2)
|
||||
sectp->floorz = act->spr.pos.Z;
|
||||
sectp->setfloorz(act->spr.pos.Z);
|
||||
if (!isWorldTour())
|
||||
{
|
||||
if (act->spr.pal && ud.multimode > 1)
|
||||
|
|
|
@ -751,15 +751,15 @@ int WallBreakPosition(walltype* wp, sectortype** sectp, int *x, int *y, int *z,
|
|||
ASSERT(wp->twoSided());
|
||||
|
||||
// floor and ceiling meet
|
||||
if (next_sect->int_floorz() == next_sect->int_ceilingz())
|
||||
if (next_sect->floorz == next_sect->ceilingz)
|
||||
*z = ((*sectp)->int_floorz() + (*sectp)->int_ceilingz()) >> 1;
|
||||
else
|
||||
// floor is above other sector
|
||||
if (next_sect->int_floorz() < (*sectp)->int_floorz())
|
||||
if (next_sect->floorz < (*sectp)->floorz)
|
||||
*z = (next_sect->int_floorz() + (*sectp)->int_floorz()) >> 1;
|
||||
else
|
||||
// ceiling is below other sector
|
||||
if (next_sect->int_ceilingz() > (*sectp)->int_ceilingz())
|
||||
if (next_sect->ceilingz > (*sectp)->ceilingz)
|
||||
*z = (next_sect->int_ceilingz() + (*sectp)->int_ceilingz()) >> 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1420,7 +1420,7 @@ void DoPlayerSetWadeDepth(PLAYER* pp)
|
|||
if ((sectp->extra & SECTFX_SINK))
|
||||
{
|
||||
// make sure your even in the water
|
||||
if (pp->int_ppos().Z + PLAYER_HEIGHT > pp->lo_sectp->int_floorz() - Z(FixedToInt(pp->lo_sectp->depth_fixed)))
|
||||
if (pp->pos.Z + PLAYER_HEIGHTF > pp->lo_sectp->floorz - FixedToInt(pp->lo_sectp->depth_fixed))
|
||||
pp->WadeDepth = FixedToInt(pp->lo_sectp->depth_fixed);
|
||||
}
|
||||
}
|
||||
|
@ -1758,7 +1758,7 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
|
||||
if (pp->sop_control)
|
||||
{
|
||||
actor->set_int_z(pp->cursector->int_floorz());
|
||||
actor->spr.pos.Z = pp->cursector->floorz;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerCrawl)
|
||||
|
@ -3246,7 +3246,7 @@ void DoPlayerClimb(PLAYER* pp)
|
|||
// if floor is ABOVE you && your head goes above it, do a jump up to
|
||||
// terrace
|
||||
|
||||
if (pp->int_ppos().Z < pp->LadderSector->int_floorz() - Z(6))
|
||||
if (pp->pos.Z < pp->LadderSector->floorz - 6)
|
||||
{
|
||||
pp->jump_speed = PLAYER_CLIMB_JUMP_AMT;
|
||||
pp->Flags &= ~(PF_CLIMBING|PF_WEAPON_DOWN);
|
||||
|
@ -3865,7 +3865,7 @@ int GetOverlapSector(int x, int y, sectortype** over, sectortype** under)
|
|||
// the are overlaping - check the z coord
|
||||
if (found == 2)
|
||||
{
|
||||
if (sf[0]->int_floorz() > sf[1]->int_floorz())
|
||||
if (sf[0]->floorz > sf[1]->floorz)
|
||||
{
|
||||
*under = sf[0];
|
||||
*over = sf[1];
|
||||
|
@ -3955,7 +3955,7 @@ int GetOverlapSector2(int x, int y, sectortype** over, sectortype** under)
|
|||
// the are overlaping - check the z coord
|
||||
if (found == 2)
|
||||
{
|
||||
if (sf[0]->int_floorz() > sf[1]->int_floorz())
|
||||
if (sf[0]->floorz > sf[1]->floorz)
|
||||
{
|
||||
*under = sf[0];
|
||||
*over = sf[1];
|
||||
|
@ -4100,7 +4100,7 @@ void DoPlayerWarpToSurface(PLAYER* pp)
|
|||
pp->setcursector(over);
|
||||
}
|
||||
|
||||
pp->set_int_ppos_Z(over_act->sector()->int_floorz() - Z(2));
|
||||
pp->pos.Z = over_act->sector()->floorz - 2;
|
||||
|
||||
// set z range and wade depth so we know how high to set view
|
||||
DoPlayerZrange(pp);
|
||||
|
|
|
@ -643,7 +643,7 @@ void GetUpperLowerSector(short match, int x, int y, sectortype** upper, sectorty
|
|||
|
||||
if (sln == 2)
|
||||
{
|
||||
if (sectorlist[0]->int_floorz() < sectorlist[1]->int_floorz())
|
||||
if (sectorlist[0]->floorz < sectorlist[1]->floorz)
|
||||
{
|
||||
// swap
|
||||
// make sectorlist[0] the LOW sector
|
||||
|
|
|
@ -1269,7 +1269,7 @@ void DoChangorMatch(short match)
|
|||
else
|
||||
{
|
||||
sectp->floorpicnum = SP_TAG4(actor);
|
||||
sectp->add_int_floorz(Z(SP_TAG5(actor)));
|
||||
sectp->addfloorz(SP_TAG5(actor));
|
||||
sectp->floorheinum += SP_TAG6(actor);
|
||||
|
||||
if (sectp->floorheinum)
|
||||
|
|
|
@ -4687,7 +4687,7 @@ int move_actor(DSWActor* actor, int xchange, int ychange, int zchange)
|
|||
|
||||
int DoStayOnFloor(DSWActor* actor)
|
||||
{
|
||||
actor->set_int_z(actor->sector()->int_floorz());
|
||||
actor->spr.pos.Z = actor->sector()->floorz;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -6515,7 +6515,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
|
|||
|
||||
if (retval.type != kHitNone && (actor->sector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (actor->int_pos().Z < actor->sector()->int_ceilingz())
|
||||
if (actor->spr.pos.Z < actor->sector()->ceilingz)
|
||||
{
|
||||
retval.setVoid();
|
||||
}
|
||||
|
@ -6523,7 +6523,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
|
|||
|
||||
if (retval.type != kHitNone && (actor->sector()->floorstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (actor->int_pos().Z > actor->sector()->int_floorz())
|
||||
if (actor->spr.pos.Z > actor->sector()->floorz)
|
||||
{
|
||||
retval.setVoid();
|
||||
}
|
||||
|
|
|
@ -3275,7 +3275,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
if (actor->user.Flags & (SPR_ZDIFF_MODE))
|
||||
{
|
||||
actor->user.Flags &= ~(SPR_ZDIFF_MODE);
|
||||
actor->set_int_z(actor->sector()->int_floorz());
|
||||
actor->spr.pos.Z = actor->sector()->floorz;
|
||||
actor->spr.zvel = 0;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -4514,7 +4514,7 @@ int DoFireballFlames(DSWActor* actor)
|
|||
{
|
||||
if (actor->sector()->hasU() && FixedToInt(actor->sector()->depth_fixed) > 0)
|
||||
{
|
||||
if (labs(actor->sector()->int_floorz() - actor->int_pos().Z) <= Z(4))
|
||||
if (abs(actor->sector()->floorz - actor->spr.pos.Z) <= 4)
|
||||
{
|
||||
KillActor(actor);
|
||||
return 0;
|
||||
|
@ -4587,7 +4587,7 @@ int DoBreakFlames(DSWActor* actor)
|
|||
{
|
||||
if (actor->sector()->hasU() && FixedToInt(actor->sector()->depth_fixed) > 0)
|
||||
{
|
||||
if (labs(actor->sector()->int_floorz() - actor->int_pos().Z) <= Z(4))
|
||||
if (abs(actor->sector()->floorz - actor->spr.pos.Z) <= 4)
|
||||
{
|
||||
KillActor(actor);
|
||||
return 0;
|
||||
|
@ -12751,13 +12751,13 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.int_hitpos().Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (abs(hit.hitpos.Z - hit.hitSector->ceilingz) <= 1)
|
||||
{
|
||||
hit.hitpos.Z += 16;
|
||||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
}
|
||||
else if (labs(hit.int_hitpos().Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (abs(hit.hitpos.Z - hit.hitSector->floorz) <= 1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -12768,7 +12768,7 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang
|
|||
{
|
||||
if ((hit.hitWall->nextSector()->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.int_hitpos().Z < hit.hitWall->nextSector()->int_ceilingz())
|
||||
if (hit.hitpos.Z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -12884,7 +12884,7 @@ int InitShotgun(PLAYER* pp)
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.int_hitpos().Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (abs(hit.hitpos.Z - hit.hitSector->ceilingz) <= 1)
|
||||
{
|
||||
hit.hitpos.Z += 16;
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
@ -12899,7 +12899,7 @@ int InitShotgun(PLAYER* pp)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
else if (labs(hit.int_hitpos().Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (abs(hit.hitpos.Z - hit.hitSector->floorz) <= 1)
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
|
@ -15161,7 +15161,7 @@ int InitUzi(PLAYER* pp)
|
|||
// check to see what you hit
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.int_hitpos().Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (abs(hit.hitpos.Z - hit.hitSector->ceilingz) <= 1)
|
||||
{
|
||||
hit.hitpos.Z += 16;
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
@ -15176,7 +15176,7 @@ int InitUzi(PLAYER* pp)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
else if (labs(hit.int_hitpos().Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (abs(hit.hitpos.Z - hit.hitSector->floorz) <= 1)
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
|
@ -15650,7 +15650,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.int_hitpos().Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (abs(hit.hitpos.Z - hit.hitSector->ceilingz) <= 1)
|
||||
{
|
||||
hit.hitpos.Z += 16;
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
@ -15658,7 +15658,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
|
|||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
}
|
||||
else if (labs(hit.int_hitpos().Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (abs(hit.hitpos.Z - hit.hitSector->floorz) <= 1)
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
|
@ -16031,7 +16031,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
|
||||
if (hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
if (labs(hit.int_hitpos().Z - hit.hitSector->int_ceilingz()) <= Z(1))
|
||||
if (abs(hit.hitpos.Z - hit.hitSector->ceilingz) <= 1)
|
||||
{
|
||||
hit.hitpos.Z += 16;
|
||||
cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
|
@ -16039,7 +16039,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
if ((hit.hitSector->ceilingstat & CSTAT_SECTOR_SKY))
|
||||
continue;
|
||||
}
|
||||
else if (labs(hit.int_hitpos().Z - hit.hitSector->int_floorz()) <= Z(1))
|
||||
else if (abs(hit.hitpos.Z - hit.hitSector->floorz) <= 1)
|
||||
{
|
||||
if ((hit.hitSector->extra & SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
|
@ -17047,7 +17047,7 @@ bool MissileHitDiveArea(DSWActor* actor)
|
|||
return false;
|
||||
|
||||
// Check added by Jim because of sprite bridge over water
|
||||
if (actor->int_pos().Z < (hit_sect->int_floorz()-Z(20)))
|
||||
if (actor->spr.pos.Z < hit_sect->floorz - 20)
|
||||
return false;
|
||||
|
||||
actor->user.Flags |= (SPR_UNDERWATER);
|
||||
|
|
Loading…
Reference in a new issue