]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Begin moving physics to ecs
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 23 Jun 2016 09:43:17 +0000 (19:43 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 23 Jun 2016 09:43:17 +0000 (19:43 +1000)
qcsrc/common/physics/player.qc
qcsrc/server/sv_main.qc

index c0960125597e93d76cf17a8e60e05cf2a5cc52f8..b8c2b375d69da108bd156c35e0c2d6b491a2428d 100644 (file)
@@ -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);
 }
index 5eaf6618fa865f291018f3a68aa63a62fafbffdb..8b4d2c22cf4ecea7cc8300e5c55f7371d40e6713 100644 (file)
@@ -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();