Clean up DynamicEntity

FossilOrigin-Name: b787ad5a04fc238a69b9e48b3bdfccde416f636a021eef0d955445b5ab92252b
This commit is contained in:
Jonathan Schleifer 2025-03-22 23:10:13 +00:00
parent fd2b1dddf0
commit a7db00c740
24 changed files with 561 additions and 540 deletions

View file

@ -281,32 +281,10 @@ extern bool demoplayback;
// simplistic vector ops
#define dotprod(u, v) ((u).x * (v).x + (u).y * (v).y + (u).z * (v).z)
#define vmul(u, f) \
{ \
OFVector3D tmp_ = u; \
float tmp2_ = f; \
u = OFMakeVector3D( \
tmp_.x * tmp2_, tmp_.y * tmp2_, tmp_.z * tmp2_); \
}
#define vdiv(u, f) \
{ \
OFVector3D tmp_ = u; \
float tmp2_ = f; \
u = OFMakeVector3D( \
tmp_.x / tmp2_, tmp_.y / tmp2_, tmp_.z / tmp2_); \
}
#define vadd(u, v) \
{ \
OFVector3D tmp_ = u; \
u = OFMakeVector3D( \
tmp_.x + (v).x, tmp_.y + (v).y, tmp_.z + (v).z); \
}
#define vsub(u, v) \
{ \
OFVector3D tmp_ = u; \
u = OFMakeVector3D( \
tmp_.x - (v).x, tmp_.y - (v).y, tmp_.z - (v).z); \
}
#define vmul(u, f) u = OFMultiplyVector3D(u, OFMakeVector3D(f, f, f))
#define vdiv(u, f) u = OFDivideVector3D(u, OFMakeVector3D(f, f, f))
#define vadd(u, v) u = OFAddVector3D(u, v)
#define vsub(u, v) u = OFSubtractVector3D(u, v)
#define vdist(d, v, e, s) \
OFVector3D v = s; \
vsub(v, e); \