]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove dead code
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 26 Dec 2014 06:15:34 +0000 (17:15 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 26 Dec 2014 06:15:34 +0000 (17:15 +1100)
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/damage.qc
qcsrc/client/hud.qc
qcsrc/client/shownames.qc
qcsrc/client/sys-post.qh
qcsrc/client/sys-pre.qh
qcsrc/common/util-pre.qh
qcsrc/csqcmodellib/cl_model.qc
qcsrc/csqcmodellib/cl_player.qc
qcsrc/warpzonelib/client.qc

index 58bd4f497478544bb9527df0388a9f68454c7658..d6b00ec9f55182fdee763ce20adb3a7a0639d275 100644 (file)
@@ -41,11 +41,6 @@ void CSQC_Init(void)
 
        float i;
 
-#ifdef COMPAT_XON050_ENGINE
-       // old engine lacks implementation of player_localnum
-       player_localnum = player_localentnum - 1;
-#endif
-
        binddb = db_create();
        tempdb = db_create();
        ClientProgsDB = db_load("client.db");
@@ -523,7 +518,7 @@ void Ent_ClientData()
        }
        spectatee_status = newspectatee_status;
 
-       // non-COMPAT_XON050_ENGINE: we could get rid of spectatee_status, and derive it from player_localentnum and player_localnum
+       // we could get rid of spectatee_status, and derive it from player_localentnum and player_localnum
 }
 
 void Ent_Nagger()
index 0eacfb7f334ef0da239a915b8854deb7b3a56659..220e44260dcaae33f913f695a7fbda6ccbea7ac6 100644 (file)
@@ -1017,12 +1017,7 @@ void CSQC_UpdateView(float w, float h)
 
        CSQCPlayer_SetCamera();
 
-#ifdef COMPAT_XON050_ENGINE
-       if(spectatee_status)
-               myteam = GetPlayerColor(spectatee_status - 1);
-       else
-#endif
-               myteam = GetPlayerColor(player_localentnum - 1);
+       myteam = GetPlayerColor(player_localentnum - 1);
 
        if(myteam != prev_myteam)
        {
@@ -1299,15 +1294,9 @@ void CSQC_UpdateView(float w, float h)
 
        // ALWAYS Clear Current Scene First
        clearscene();
-#ifdef WORKAROUND_XON010
-       if(checkextension("DP_CSQC_ROTATEMOVES"))
-       {
-#endif
+
        setproperty(VF_ORIGIN, view_origin);
        setproperty(VF_ANGLES, view_angles);
-#ifdef WORKAROUND_XON010
-       }
-#endif
 
        // FIXME engine bug? VF_SIZE and VF_MIN are not restored to sensible values by this
        setproperty(VF_SIZE, vf_size);
index 64e12620dae961523bbafae3674579a9561e3744..162ef6a07eb17560ebf4ffeb4d7a6c745affdaae 100644 (file)
@@ -22,11 +22,7 @@ void DamageEffect_Think()
                return;
        }
        self.state = self.owner.csqcmodel_isdead;
-#ifdef COMPAT_XON050_ENGINE
-       if(self.owner.isplayermodel && (self.owner.entnum == player_localentnum || self.owner.entnum == spectatee_status) && !autocvar_chase_active)
-#else
        if(self.owner.isplayermodel && (self.owner.entnum == player_localentnum) && !autocvar_chase_active)
-#endif
                return; // if we aren't using a third person camera, hide our own effects
 
        // now generate the particles
index 7359468e0969d236738b619a367e8fa8c8553d7f..51c5c6489cbdef0a887097a4c9cf87a439443965 100644 (file)
@@ -2203,11 +2203,7 @@ void HUD_Score(void)
        vector distribution_color;
        entity tm, pl, me;
 
-#ifdef COMPAT_XON050_ENGINE
-       me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1];
-#else
        me = playerslots[player_localentnum - 1];
-#endif
 
        if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD
                string timer, distrtimer;
@@ -3708,11 +3704,7 @@ void HUD_InfoMessages(void)
                        if(spectatee_status == -1)
                                s = _("^1Observing");
                        else
-#ifdef COMPAT_XON050_ENGINE
-                               s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(spectatee_status - 1));
-#else
                                s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(player_localentnum - 1));
-#endif
                        drawInfoMessage(s)
 
                        if(spectatee_status == -1)
@@ -4533,11 +4525,7 @@ void HUD_Main (void)
                hud_skin_prev = strzone(autocvar_hud_skin);
        }
 
-#ifdef COMPAT_XON050_ENGINE
-    current_player = (spectatee_status > 0) ? spectatee_status : player_localentnum;
-#else
     current_player = player_localentnum;
-#endif
 
        // draw the dock
        if(autocvar_hud_dock != "" && autocvar_hud_dock != "0")
index 3c89f312b0eb4c3dd4c1634edefa97ad4a89739f..4a948ca2e845b804d586f44d997bb5e8b419e308 100644 (file)
@@ -14,11 +14,7 @@ void Draw_ShowNames(entity ent)
        if(!autocvar_hud_shownames)
                return;
 
-#ifdef COMPAT_XON050_ENGINE
-       if((ent.sv_entnum == player_localentnum) || (ent.sv_entnum == spectatee_status)) // ent is me or person i'm spectating
-#else
        if(ent.sv_entnum == player_localentnum) // ent is me or person i'm spectating
-#endif
                if(!(autocvar_hud_shownames_self && autocvar_chase_active))
                        return;
 
index a883039fed0366b574c9acfe4e4bb7df093c95d2..ec4e31ac33cb9adddb4b72d56165cf64439ec149 100644 (file)
@@ -1,12 +1,3 @@
 #pragma noref 0
 
 #undef ATTEN_NORM
-
-#ifdef COMPAT_050_ENGINE
-// WORKAROUND for 0.5.0 engine
-// FIXME remove this after 0.6 release
-#undef getproperty
-#undef getpropertyvec
-float (float property) getproperty = #303;
-vector (float property) getpropertyvec = #303;
-#endif
index 2f59e713d35385f039b08c3cf10e7a6186fb498c..3b4fc14b59937301e04b5f69b8e8c3bc71a971ee 100644 (file)
@@ -2,11 +2,4 @@
 
 #define ATTEN_NORM builtin_ATTEN_NORM
 
-#ifdef COMPAT_050_ENGINE
-// WORKAROUND for 0.5.0 engine
-// FIXME remove this after 0.6 release
-#define getproperty builtin_getproperty
-#define getpropertyvec builtin_getpropertyvec
-#endif
-
 #pragma noref 1
index 3f4c3e57f4f8f2095eafb3fa41f31415572d1d20..634b0fdf1d6b06c82ec8080c26d535da25986670 100644 (file)
@@ -1,6 +1,3 @@
 #ifndef NOCOMPAT
-//# define WORKAROUND_XON010
-//# define COMPAT_XON050_ENGINE
 # define COMPAT_NO_MOD_IS_XONOTIC
-# define COMPAT_XON060_DONTCRASH_CHECKPVS
 #endif
index e04b92ecc8d81f1a587a9959e3e135d97303ba67..7c723c44c2117995385e579e9bc47cb6bcbb53d4 100644 (file)
@@ -263,11 +263,7 @@ void CSQCModel_Read(float isnew)
        setorigin(self, self.origin);
 
        // set obvious render flags
-#ifdef COMPAT_XON050_ENGINE
-       if(self.entnum == player_localentnum || self.entnum == spectatee_status)
-#else
        if(self.entnum == player_localentnum)
-#endif
                self.renderflags |= RF_EXTERNALMODEL;
        else
                self.renderflags &= ~RF_EXTERNALMODEL;
index 4f7381a4af83fa73047368e1b9bccd5492e1cc09..63db0ac14b6ea777aef4e349f39e0d360682c9f5 100644 (file)
@@ -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,15 +272,6 @@ 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;
index c2a110b4a14dd829fdc06618e6c669653e29074f..9f540bc50a9a59ce73a8ef7d04da683af9a6d4a8 100644 (file)
@@ -2,12 +2,7 @@ void WarpZone_Fade_PreDraw()
 {
        vector org;
        org = getpropertyvec(VF_ORIGIN);
-       if(
-#ifdef COMPAT_XON060_DONTCRASH_CHECKPVS
-               cvar_string("g_xonoticversion") != "0.5.0" &&
-               cvar_string("g_xonoticversion") != "0.6.0" &&
-#endif
-               !checkpvs(org, self)) // this makes sense as long as we don't support recursive warpzones
+       if(!checkpvs(org, self)) // this makes sense as long as we don't support recursive warpzones
                self.alpha = 0;
        else if(self.warpzone_fadestart)
                self.alpha = bound(0, (self.warpzone_fadeend - vlen(org - self.origin - 0.5 * (self.mins + self.maxs))) / (self.warpzone_fadeend - self.warpzone_fadestart), 1);
@@ -241,19 +236,12 @@ void WarpZone_FixView()
 
        warpzone_save_view_origin = org = getpropertyvec(VF_ORIGIN);
        warpzone_save_view_angles = ang = getpropertyvec(VF_ANGLES);
-#ifdef WORKAROUND_XON010
-       float dirty;
-       dirty = checkextension("DP_CSQC_ROTATEMOVES");
-#endif
 
        e = WarpZone_Find(org, org);
        if(e)
        {
                org = WarpZone_TransformOrigin(e, org);
                ang = WarpZone_TransformVAngles(e, ang);
-#ifdef WORKAROUND_XON010
-               dirty = 1;
-#endif
                WarpZone_View_Inside();
        }
        else
@@ -269,23 +257,11 @@ void WarpZone_FixView()
        rick = getproperty(VF_CL_VIEWANGLES_Z);
        rick *= f;
        setproperty(VF_CL_VIEWANGLES_Z, rick);
-
-#ifdef WORKAROUND_XON010
-       if(ang_z > 1 || ang_z < -1)
-               dirty = 1;
-#endif
        ang_z *= f;
 #endif
 
-#ifdef WORKAROUND_XON010
-       if(dirty)
-       {
-#endif
        setproperty(VF_ORIGIN, org);
        setproperty(VF_ANGLES, ang);
-#ifdef WORKAROUND_XON010
-       }
-#endif
 
        nearclip = '0 0 1' * (cvar("r_nearclip") * 1.125);
        corner0 = cs_unproject('0 0 0' + nearclip);