]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Mario/qcphysics'
authorMario <mario@smbclan.net>
Sat, 22 Sep 2018 21:50:12 +0000 (07:50 +1000)
committerMario <mario@smbclan.net>
Sat, 22 Sep 2018 21:50:12 +0000 (07:50 +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 9171444d8762ae3833a7fda6efc4e2dec07dcbe5..8f7c52f3263c96e8e150d3c4d7022e0b36743b99 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;