- preparations for more floatification.

This commit is contained in:
Christoph Oelckers 2022-01-30 14:42:28 +01:00
parent 4e2a9f6e59
commit 8cc8ebf30c
2 changed files with 9 additions and 4 deletions

View file

@ -53,6 +53,11 @@ public:
return time;
}
DVector3 float_pos() const
{
return { spr.pos.X * inttoworld, spr.pos.Y * inttoworld, spr.pos.Z * zinttoworld };
}
int32_t interpolatedx(double const smoothratio, int const scale = 16)
{
return interpolatedvalue(opos.X, spr.pos.X, smoothratio, scale);

View file

@ -605,15 +605,15 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
if (actor2->spr.hitag == 1)
{
geosectorwarp[geocnt] = actor2->sector();
geox[geocnt] = (actor->spr.pos.X - actor2->spr.pos.X) * inttoworld;
geoy[geocnt] = (actor->spr.pos.Y - actor2->spr.pos.Y) * inttoworld;
geox[geocnt] = actor->float_pos().X - actor2->float_pos().X;
geoy[geocnt] = actor->float_pos().Y - actor2->float_pos().Y;
//geoz[geocnt] = actor->spr.z - actor2->spr.z;
}
if (actor2->spr.hitag == 2)
{
geosectorwarp2[geocnt] = actor2->sector();
geox2[geocnt] = (actor->spr.pos.X - actor2->spr.pos.X) * inttoworld;
geoy2[geocnt] = (actor->spr.pos.Y - actor2->spr.pos.Y) * inttoworld;
geox2[geocnt] = actor->float_pos().X - actor2->float_pos().X;
geoy2[geocnt] = actor->float_pos().Y - actor2->float_pos().Y;
//geoz2[geocnt] = actor->spr.z - actor2->spr.z;
}
}