From 29d0f867268570e0ae3ec0d7afb9553530cad857 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers <coelckers@users.noreply.github.com> Date: Sun, 30 Jan 2022 15:38:30 +0100 Subject: [PATCH] - utilities for wrapping actor coordinates. --- source/core/coreactor.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/core/coreactor.h b/source/core/coreactor.h index 7fe3e4cac..2a9c11070 100644 --- a/source/core/coreactor.h +++ b/source/core/coreactor.h @@ -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 };