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");
}
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()
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)
{
// 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);
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
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;
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)
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")
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;
#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
#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
#ifndef NOCOMPAT
-//# define WORKAROUND_XON010
-//# define COMPAT_XON050_ENGINE
# define COMPAT_NO_MOD_IS_XONOTIC
-# define COMPAT_XON060_DONTCRASH_CHECKPVS
#endif
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;
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);
}
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)
{
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;
{
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);
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
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);