]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Enable QC physics on players 593/head
authorMario <zacjardine@y7mail.com>
Tue, 18 Sep 2018 13:17:09 +0000 (23:17 +1000)
committerMario <zacjardine@y7mail.com>
Tue, 18 Sep 2018 13:17:09 +0000 (23:17 +1000)
qcsrc/common/physics/movetypes/movetypes.qh
qcsrc/server/client.qc

index 20f9adba1076a7b3499f60b0ed9096ec41f0d6d2..36cbd9f4636a3cba1729ecf8083658a67998c492 100644 (file)
@@ -126,6 +126,8 @@ const int MOVETYPE_ANGLENOCLIP      = 1;
 const int MOVETYPE_ANGLECLIP        = 2;
 #endif
 
+const int MOVETYPE_QCPLAYER = 150; // QC-driven player physics, no think functions!
+
 const int FL_ONSLICK = BIT(20);
 
 const int MOVETYPE_FAKEPUSH         = 13;
index da0d84979f5e139531a89f86f410184b51ea7759..26696f4c87e94bac39bbe2d7e4590c254e5c0c36 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);
 
@@ -2562,7 +2564,7 @@ void DrownPlayer(entity this)
 
 void Player_Physics(entity this)
 {
-       set_movetype(this, this.move_movetype);
+       this.movetype = (this.move_qcphysics) ? MOVETYPE_QCPLAYER : this.move_movetype;
 
        if(!this.move_qcphysics)
                return;