- fixed the last remaining z/inttoworld mismatches.

The one in clipmove was critical, the other ones not so much.
This commit is contained in:
Christoph Oelckers 2022-11-27 10:21:47 +01:00
parent dc60c643c9
commit ec48b91730
3 changed files with 4 additions and 4 deletions

View file

@ -603,7 +603,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
if (enginecompatibility_mode != ENGINECOMPATIBILITY_NONE)
{
DVector3 fpos(pos->X* inttoworld, pos->Y* inttoworld, pos->Z* inttoworld);
DVector3 fpos(pos->X* inttoworld, pos->Y* inttoworld, pos->Z* zinttoworld);
for (int j=0; j<clipsectnum; j++)
if (inside(fpos.X, fpos.Y, &sector[clipsectorlist[j]]) == 1)

View file

@ -6386,7 +6386,7 @@ Collision move_sprite(DSWActor* actor, const DVector3& change, double ceildist,
// I subtracted 8 from the clipdist because actors kept going up on
// ledges they were not supposed to go up on. Did the same for the
// player. Seems to work ok!
auto pos = actor->spr.pos.plusZ(-zH - maptoworld);
auto pos = actor->spr.pos.plusZ(-zH - zmaptoworld);
FAFgetzrange(pos, actor->sector(),
&globhiz, &globhihit, &globloz, &globlohit,
actor->clipdist - GETZRANGE_CLIP_ADJ, cliptype);
@ -6544,7 +6544,7 @@ int MissileZrange(DSWActor* actor)
auto tempshort = actor->spr.cstat;
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
FAFgetzrangepoint(actor->spr.pos.plusZ(-maptoworld), actor->sector(), &globhiz, &globhihit, &globloz, &globlohit);
FAFgetzrangepoint(actor->spr.pos.plusZ(-zmaptoworld), actor->sector(), &globhiz, &globhihit, &globloz, &globlohit);
actor->spr.cstat = tempshort;

View file

@ -14981,7 +14981,7 @@ int InitCoolgFire(DSWActor* actor)
int DoCoolgDrip(DSWActor* actor)
{
actor->user.Counter += 220;
actor->spr.pos.Z += actor->user.Counter * maptoworld;
actor->spr.pos.Z += actor->user.Counter * zmaptoworld;
if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist)
{