]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use QC movetypes on everything (for testing purposes) Mario/qcphysics_testing
authorMario <zacjardine@y7mail.com>
Mon, 17 Sep 2018 23:00:16 +0000 (09:00 +1000)
committerMario <zacjardine@y7mail.com>
Mon, 17 Sep 2018 23:00:16 +0000 (09:00 +1000)
qcsrc/lib/oo.qh
qcsrc/server/client.qc
qcsrc/server/sv_main.qc

index e482d7d9ac9b1afab49ae9279ced927e0aa5ce4e..3440d512b2f27cfedda353b83e4d7f4e699a141c 100644 (file)
@@ -32,6 +32,11 @@ entity spawn_pure() = #600;
 #define spawn_pure() _spawn()
 #endif
 
+#ifdef SVQC
+// TODO
+.bool move_qcphysics;
+#endif
+
 entity __spawn(string _classname, string _sourceLoc, bool pure)
 {
        entity this = pure ? spawn_pure() : _spawn();
@@ -46,6 +51,11 @@ entity __spawn(string _classname, string _sourceLoc, bool pure)
         setorigin(this, (world.mins + world.maxs) * 0.5);
         #endif
        }
+       #ifdef SVQC
+       else {
+               this.move_qcphysics = true;
+       }
+       #endif
        return this;
 }
 
index da0d84979f5e139531a89f86f410184b51ea7759..3e3449d6ae759306183cca58f90886db88a6f1ba 100644 (file)
@@ -1143,6 +1143,8 @@ void ClientConnect(entity this)
        if (IS_REAL_CLIENT(this))
                sv_notice_join(this);
 
+       this.move_qcphysics = true;
+
        // update physics stats (players can spawn before physics runs)
        Physics_UpdateStats(this);
 
index 539b30d294ce0c68e43e80d81f9b0d7732353199..f9aef6f5587de1cf92b763debf1ff1dbef3f0ab1 100644 (file)
@@ -335,6 +335,7 @@ void SV_OnEntityPreSpawnFunction(entity this)
                goto cleanup;
        }
 
+       this.move_qcphysics = true;
        set_movetype(this, this.movetype);
 
        if (this.monster_attack) {