From: Mario Date: Tue, 7 Feb 2023 05:07:17 +0000 (+1000) Subject: Add a global to enable engine physics for testing purposes X-Git-Tag: xonotic-v0.8.6~175 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=d514a6bf7d35d953cb4e3a56973597ebf81ab4cf;hp=8b5de5f74e75c5736e50e7802fdc90eb9941007f;p=xonotic%2Fxonotic-data.pk3dir.git Add a global to enable engine physics for testing purposes --- 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