From: Mario Date: Mon, 17 Sep 2018 23:00:16 +0000 (+1000) Subject: Use QC movetypes on everything (for testing purposes) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FMario%2Fqcphysics_testing;p=xonotic%2Fxonotic-data.pk3dir.git Use QC movetypes on everything (for testing purposes) --- diff --git a/qcsrc/lib/oo.qh b/qcsrc/lib/oo.qh index e482d7d9a..3440d512b 100644 --- a/qcsrc/lib/oo.qh +++ b/qcsrc/lib/oo.qh @@ -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; } diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index da0d84979..3e3449d6a 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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); diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 539b30d29..f9aef6f55 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -335,6 +335,7 @@ void SV_OnEntityPreSpawnFunction(entity this) goto cleanup; } + this.move_qcphysics = true; set_movetype(this, this.movetype); if (this.monster_attack) {