]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
use DP_CSQC_V_CALCREFDEF_WIP2
authorRudolf Polzer <divverent@alientrap.org>
Mon, 9 Jan 2012 12:09:31 +0000 (13:09 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 9 Jan 2012 12:09:31 +0000 (13:09 +0100)
qcsrc/csqcmodellib/cl_player.qc
qcsrc/dpdefs/csprogsdefs.qc

index ec7fe0ddf171d2700138aa327a029de89596a511..b581a5baaf31179fe67295a4bc822d58bc78960e 100644 (file)
@@ -219,7 +219,7 @@ void CSQCPlayer_SetCamera()
        }
 
 #ifdef COMPAT_XON050_ENGINE
-       if(view && !(checkextension("DP_CSQC_V_CALCREFDEF") || checkextension("DP_CSQC_V_CALCREFDEF_WIP1")))
+       if(view && !(checkextension("DP_CSQC_V_CALCREFDEF") || checkextension("DP_CSQC_V_CALCREFDEF_WIP2")))
        {
                // legacy code, not totally correct, but good enough for not having V_CalcRefdef
                setproperty(VF_ORIGIN, view.origin + '0 0 1' * getstati(STAT_VIEWHEIGHT));
@@ -237,6 +237,12 @@ void CSQCPlayer_SetCamera()
                if(input_buttons & 4)
                        refdefflags |= REFDEFFLAG_JUMPING;
 
+               if(getstati(STAT_HEALTH) <= 0)
+                       refdefflags |= REFDEFFLAG_DEAD;
+
+               if(intermission)
+                       refdefflags |= REFDEFFLAG_INTERMISSION;
+
                V_CalcRefdef(view, refdefflags);
        }
        else
index 0d3088f9cfc3acb83e10eae556dea6acd0d748aa..182568fa24c0a6540b865e121dd0b46d2dc1cef8 100644 (file)
@@ -910,6 +910,7 @@ const float VF_MINFPS_QUALITY   = 401;
 //1 should lead to an unmodified view
 
 //DP_CSQC_V_CALCREFDEF_WIP1
+//DP_CSQC_V_CALCREFDEF_WIP2
 //idea: divVerent
 //darkplaces implementation: divVerent
 //builtin definitions:
@@ -919,9 +920,13 @@ float PMF_DUCKED = 4;
 float PMF_ONGROUND = 8;
 float REFDEFFLAG_TELEPORTED = 1;
 float REFDEFFLAG_JUMPING = 2;
+float REFDEFFLAG_DEAD = 4;
+float REFDEFFLAG_INTERMISSION = 8;
 //- use this on the player entity after performing prediction
 //- pass REFDEFFLAG_TELEPORTED if the player teleported since last frame
 //- pass REFDEFFLAG_JUMPING if jump button is pressed
+//- pass REFDEFFLAG_DEAD if dead
+//- pass REFDEFFLAG_INTERMISSION if in intermission
 //- the player entity needs to have origin, velocity, pmove_flags set according
 //  to prediction (the above two PMF_ flags are used in the player's pmove_flags)
 //- NOTE: to check for this, ALSO OR a check with DP_CSQC_V_CALCREFDEF to also support