From 46f1de831dd3d6278b4066711ce2b4924ab18a78 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 18 Sep 2018 09:00:16 +1000 Subject: [PATCH] Use QC movetypes on everything (for testing purposes) --- qcsrc/lib/oo.qh | 10 ++++++++++ qcsrc/server/client.qc | 2 ++ qcsrc/server/sv_main.qc | 1 + 3 files changed, 13 insertions(+) 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) { -- 2.39.2