]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/csqcmodellib/cl_player.qc
Declare more ints as ints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / csqcmodellib / cl_player.qc
index 4f7381a4af83fa73047368e1b9bccd5492e1cc09..4a40df30f0f9ffbbc43151517116ab3ebbcbaeca 100644 (file)
@@ -23,8 +23,8 @@
 var float autocvar_cl_movement_errorcompensation = 0;
 
 // engine stuff
-#define REFDEFFLAG_TELEPORTED 1
-#define REFDEFFLAG_JUMPING 2
+const int REFDEFFLAG_TELEPORTED = 1;
+const int REFDEFFLAG_JUMPING = 2;
 float pmove_onground; // weird engine flag we shouldn't really use but have to for now
 
 vector csqcplayer_origin, csqcplayer_velocity;
@@ -182,11 +182,7 @@ void CSQCPlayer_SetCamera()
                oldself = self;
                self = csqcplayer;
 
-#ifdef COMPAT_XON050_ENGINE
-               if(servercommandframe == 0 || clientcommandframe == 0 || !(checkextension("DP_CSQC_V_CALCREFDEF") || checkextension("DP_CSQC_V_CALCREFDEF_WIP1")))
-#else
                if(servercommandframe == 0 || clientcommandframe == 0)
-#endif
                {
                        InterpolateOrigin_Do();
                        self.view_ofs = '0 0 1' * getstati(STAT_VIEWHEIGHT);
@@ -265,11 +261,7 @@ void CSQCPlayer_SetCamera()
        }
 
        entity view;
-#ifdef COMPAT_XON050_ENGINE
-       view = CSQCModel_server2csqc((spectatee_status > 0) ? spectatee_status : player_localentnum);
-#else
        view = CSQCModel_server2csqc(player_localentnum);
-#endif
 
        if(view && view != csqcplayer)
        {
@@ -280,18 +272,9 @@ void CSQCPlayer_SetCamera()
                self = oldself;
        }
 
-#ifdef COMPAT_XON050_ENGINE
-       if(view && !(checkextension("DP_CSQC_V_CALCREFDEF") || checkextension("DP_CSQC_V_CALCREFDEF_WIP1")))
-       {
-               // legacy code, not totally correct, but good enough for not having V_CalcRefdef
-               setproperty(VF_ORIGIN, view.origin + '0 0 1' * getstati(STAT_VIEWHEIGHT));
-               setproperty(VF_ANGLES, view_angles);
-       }
-       else
-#endif
        if(view)
        {
-               var float refdefflags = 0;
+               int refdefflags = 0;
 
                if(view.csqcmodel_teleported)
                        refdefflags |= REFDEFFLAG_TELEPORTED;