- utilities for wrapping actor coordinates.

This commit is contained in:
Christoph Oelckers 2022-01-30 15:38:30 +01:00
parent 111dbd7a7d
commit 29d0f86726

View file

@ -70,6 +70,31 @@ public:
return time;
}
vec3_t int_pos() const
{
return spr.pos;
}
void set_int_z(int z)
{
spr.pos.Z = z;
}
void add_int_z(int z)
{
spr.pos.Z += z;
}
void add_int_pos(const vec3_t& add)
{
spr.pos += add;
}
void set_int_pos(const vec3_t& add)
{
spr.pos = add;
}
DVector3 float_pos() const
{
return { spr.pos.X * inttoworld, spr.pos.Y * inttoworld, spr.pos.Z * zinttoworld };