]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/no_engine_physics
authorMario <mario.mario@y7mail.com>
Sun, 25 Sep 2022 05:30:59 +0000 (15:30 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 25 Sep 2022 05:30:59 +0000 (15:30 +1000)
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/movetypes.qh
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/server/client.qc
xonotic-client.cfg

index 48aa9dd106ca24f744de5e5f66d2307c6550e127..c311f6f149b8e42be5b1ba9a80d9bb261d87456a 100644 (file)
@@ -4,11 +4,7 @@
 void set_movetype(entity this, int mt)
 {
        this.move_movetype = mt;
-       if (mt == MOVETYPE_PHYSICS) {
-               this.move_qcphysics = false;
-       } else if (autocvar_sv_qcphysics == 2) {
-               this.move_qcphysics = true;
-       }
+       this.move_qcphysics = (mt != MOVETYPE_PHYSICS);
        if(!IL_CONTAINS(g_moveables, this))
                IL_PUSH(g_moveables, this); // add it to the moveable entities list (even if it doesn't move!) logic: if an object never sets its movetype, we assume it never does anything notable
        this.movetype = (this.move_qcphysics) ? MOVETYPE_QCENTITY : mt;
index 79b0ea7badd26ad287a1f427d99f2d363029e870..d3de0ba9cf3de35617c8604c8d9023fc92631926 100644 (file)
@@ -3,8 +3,6 @@
 #ifdef SVQC
 // undefined on client, engine cvar
 bool autocvar_physics_ode;
-
-int autocvar_sv_qcphysics = 1; // TODO this is for testing - remove when qcphysics work
 #endif
 
 // water levels
index 5521feae190c5a894a6bc5007ef36b362bb55cf6..4331f731045ecf21e3dc4fee94c3a9a86589a950 100644 (file)
@@ -554,8 +554,6 @@ void CSQCPlayer_CalcRefdef(entity this)
        setproperty(VF_ANGLES, view_angles);
 }
 
-bool autocvar_cl_useenginerefdef = false;
-
 /** Called once per CSQC_UpdateView() */
 void CSQCPlayer_SetCamera()
 {
@@ -637,20 +635,7 @@ void CSQCPlayer_SetCamera()
                        InterpolateOrigin_Do(view);
                        view.view_ofs = '0 0 1' * vh;
                }
-               if(autocvar_cl_useenginerefdef)
-               {
-                       int refdefflags = 0;
-                       if (view.csqcmodel_teleported) refdefflags |= REFDEFFLAG_TELEPORTED;
-                       if (input_buttons & BIT(1)) refdefflags |= REFDEFFLAG_JUMPING;
-                       // note: these two only work in WIP2, but are harmless in WIP1
-                       if (PHYS_HEALTH(NULL) <= 0 && PHYS_HEALTH(NULL) != -666 && PHYS_HEALTH(NULL) != -2342) refdefflags |= REFDEFFLAG_DEAD;
-                       if (intermission) refdefflags |= REFDEFFLAG_INTERMISSION;
-                       V_CalcRefdef(view, refdefflags); // TODO? uses .health stat in the engine when this isn't called here, may be broken!
-               }
-               else
-               {
-                       CSQCPlayer_CalcRefdef(view);
-               }
+               CSQCPlayer_CalcRefdef(view);
        }
        else
        {
index a1195d52cfb9ae579ec684b215e21aa3c6d60b21..3a2b6f01c34fb447c239a2f712a99bfea61790d1 100644 (file)
@@ -1161,7 +1161,7 @@ void ClientConnect(entity this)
        if (IS_REAL_CLIENT(this))
                sv_notice_join(this);
 
-       this.move_qcphysics = autocvar_sv_qcphysics;
+       this.move_qcphysics = true;
 
        // update physics stats (players can spawn before physics runs)
        Physics_UpdateStats(this);
index d427b0f5a7fe73edb0ebd0510fb003778243a469..23113c394829eda576bc37ac7ce7182da7e46c17 100644 (file)
@@ -909,8 +909,6 @@ seta cl_vaporizerbeam_colorboost 0.7 "saturation of the vaporizer beam's color b
 
 seta cl_showspectators 0 "Show who's spectating you if server has sv_showspectators enabled"
 
-set cl_useenginerefdef 0
-
 set cl_rollkillspeed 10
 
 // Facility for config.cfg use ONLY.