]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a global to enable engine physics for testing purposes
authorMario <mario.mario@y7mail.com>
Tue, 7 Feb 2023 05:07:17 +0000 (15:07 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 7 Feb 2023 05:07:17 +0000 (15:07 +1000)
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/movetypes.qh

index a2feb35dd8f98894f4cdc9a5ab4c01b694e59f56..519a526dbc71f5d85c33d3aa061f4489bdff8a26 100644 (file)
@@ -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;
index e8cdc059beb3bed5f54da4d7b7ebcbff0e2ce780..db4c80d6001e5af82f1b26b19107c3e16a901518 100644 (file)
@@ -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