- the last remaining set_int_z calls in SW.

This commit is contained in:
Christoph Oelckers 2022-08-31 22:21:35 +02:00
parent 6b06d37d14
commit c7c9ab52ce
4 changed files with 9 additions and 9 deletions

View file

@ -634,9 +634,9 @@ void analyzesprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, int
// workaround for mines and floor decals beneath the floor // workaround for mines and floor decals beneath the floor
if (tsp->picnum == BETTY_R0 || tsp->picnum == FLOORBLOOD1) if (tsp->picnum == BETTY_R0 || tsp->picnum == FLOORBLOOD1)
{ {
int32_t const florz = getflorzofslopeptr(tActor->sector(), tActor->int_pos().X, tActor->int_pos().Y); double const florz = getflorzofslopeptrf(tActor->sector(), tActor->spr.pos);
if (tActor->int_pos().Z > florz) if (tActor->spr.pos.Z > florz)
tsp->set_int_z(florz); tsp->pos.Z = florz;
} }
if (r_shadows && (tActor->user.Flags & SPR_SHADOW)) if (r_shadows && (tActor->user.Flags & SPR_SHADOW))

View file

@ -334,7 +334,7 @@ void SpawnFloorSplash(DSWActor* actor)
int DoBloodSpray(DSWActor* actor) int DoBloodSpray(DSWActor* actor)
{ {
int cz,fz; double cz,fz;
if (actor->user.Flags & (SPR_UNDERWATER)) if (actor->user.Flags & (SPR_UNDERWATER))
{ {
@ -356,9 +356,9 @@ int DoBloodSpray(DSWActor* actor)
getzsofslopeptr(actor->sector(), actor->spr.pos, &cz, &fz); getzsofslopeptr(actor->sector(), actor->spr.pos, &cz, &fz);
// pretend like we hit a sector // pretend like we hit a sector
if (actor->int_pos().Z >= fz) if (actor->spr.pos.Z >= fz)
{ {
actor->set_int_z(fz); actor->spr.pos.Z = fz;
SpawnFloorSplash(actor); SpawnFloorSplash(actor);
KillActor(actor); KillActor(actor);
return true; return true;

View file

@ -247,7 +247,7 @@ void SpikeAlign(DSWActor* actor)
void MoveSpritesWithSpike(sectortype* sect) void MoveSpritesWithSpike(sectortype* sect)
{ {
int cz,fz; double cz,fz;
SWSectIterator it(sect); SWSectIterator it(sect);
while (auto actor = it.Next()) while (auto actor = it.Next())
@ -259,7 +259,7 @@ void MoveSpritesWithSpike(sectortype* sect)
continue; continue;
getzsofslopeptr(sect, actor->spr.pos, &cz, &fz); getzsofslopeptr(sect, actor->spr.pos, &cz, &fz);
actor->set_int_z(fz); actor->spr.pos.Z = fz;
} }
} }

View file

@ -9731,7 +9731,7 @@ void SpawnBreakStaticFlames(DSWActor* actor)
actorNew->user.Radius = 200; actorNew->user.Radius = 200;
actorNew->user.floor_dist = actorNew->user.ceiling_dist = 0; actorNew->user.floor_dist = actorNew->user.ceiling_dist = 0;
actorNew->set_int_z(getflorzofslopeptr(actorNew->sector(), actorNew->int_pos().X, actorNew->int_pos().Y)); actorNew->spr.pos.Z = getflorzofslopeptrf(actorNew->sector(), actorNew->spr.pos);
PlaySound(DIGI_FIRE1,actorNew,v3df_dontpan|v3df_doppler); PlaySound(DIGI_FIRE1,actorNew,v3df_dontpan|v3df_doppler);
} }