From a182459443fafedff6516522277b03103a476fd7 Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 23 Jun 2016 19:43:17 +1000 Subject: [PATCH] Begin moving physics to ecs --- qcsrc/common/physics/player.qc | 3 ++- qcsrc/server/sv_main.qc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index c09601255..b8c2b375d 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -1548,11 +1548,12 @@ LABEL(end) this.lastclassname = this.classname; } +void sys_phys_update(entity this, float dt); #if defined(SVQC) void SV_PlayerPhysics(entity this) #elif defined(CSQC) void CSQC_ClientMovement_PlayerMove_Frame(entity this) #endif { - PM_Main(this); + sys_phys_update(this, PHYS_INPUT_TIMELENGTH); } diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 5eaf6618f..8b4d2c22c 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -154,11 +154,11 @@ float game_delay_last; bool autocvar_sv_autopause = true; float RedirectionThink(); -void PM_Main(Client this); +void sys_phys_update(entity this, float dt); void StartFrame() { // TODO: if move is more than 50ms, split it into two moves (this matches QWSV behavior and the client prediction) - FOREACH_ENTITY_CLASS(STR_PLAYER, IS_FAKE_CLIENT(it), PM_Main(it)); + FOREACH_ENTITY_CLASS(STR_PLAYER, IS_FAKE_CLIENT(it), sys_phys_update(it, frametime)); FOREACH_ENTITY_CLASS(STR_PLAYER, IS_FAKE_CLIENT(it), PlayerPreThink(it)); execute_next_frame(); -- 2.39.2