From: TimePath Date: Fri, 26 Dec 2014 06:15:34 +0000 (+1100) Subject: Remove dead code X-Git-Tag: xonotic-v0.8.0~45^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d0c9f09e15aac75e277d69de13bd23b719d3d52b;p=xonotic%2Fxonotic-data.pk3dir.git Remove dead code --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 58bd4f497..d6b00ec9f 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -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() diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 0eacfb7f3..220e44260 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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); diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index 64e12620d..162ef6a07 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -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 diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 7359468e0..51c5c6489 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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") diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 3c89f312b..4a948ca2e 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -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; diff --git a/qcsrc/client/sys-post.qh b/qcsrc/client/sys-post.qh index a883039fe..ec4e31ac3 100644 --- a/qcsrc/client/sys-post.qh +++ b/qcsrc/client/sys-post.qh @@ -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 diff --git a/qcsrc/client/sys-pre.qh b/qcsrc/client/sys-pre.qh index 2f59e713d..3b4fc14b5 100644 --- a/qcsrc/client/sys-pre.qh +++ b/qcsrc/client/sys-pre.qh @@ -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 diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index 3f4c3e57f..634b0fdf1 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -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 diff --git a/qcsrc/csqcmodellib/cl_model.qc b/qcsrc/csqcmodellib/cl_model.qc index e04b92ecc..7c723c44c 100644 --- a/qcsrc/csqcmodellib/cl_model.qc +++ b/qcsrc/csqcmodellib/cl_model.qc @@ -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; diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 4f7381a4a..63db0ac14 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -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; diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index c2a110b4a..9f540bc50 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -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);