From d514a6bf7d35d953cb4e3a56973597ebf81ab4cf Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 7 Feb 2023 15:07:17 +1000 Subject: [PATCH 1/1] Add a global to enable engine physics for testing purposes --- qcsrc/common/physics/movetypes/movetypes.qc | 2 +- qcsrc/common/physics/movetypes/movetypes.qh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index a2feb35dd..519a526db 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -4,7 +4,7 @@ void set_movetype(entity this, int mt) { this.move_movetype = mt; - this.move_qcphysics = (mt != MOVETYPE_PHYSICS); + this.move_qcphysics = (mt != MOVETYPE_PHYSICS && !use_engine_physics); if(!IL_CONTAINS(g_moveables, this)) IL_PUSH(g_moveables, this); // add it to the moveable entities list (even if it doesn't move!) logic: if an object never sets its movetype, we assume it never does anything notable this.movetype = (this.move_qcphysics) ? MOVETYPE_QCENTITY : mt; diff --git a/qcsrc/common/physics/movetypes/movetypes.qh b/qcsrc/common/physics/movetypes/movetypes.qh index e8cdc059b..db4c80d60 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qh +++ b/qcsrc/common/physics/movetypes/movetypes.qh @@ -3,6 +3,8 @@ #ifdef SVQC // undefined on client, engine cvar bool autocvar_physics_ode; + +bool use_engine_physics; // debug option for testing legacy engine code #endif // water levels -- 2.39.2