}
}
-vector PL_VIEW_OFS;
-vector PL_MIN;
-vector PL_MAX;
-vector PL_HEAD;
-vector PL_CROUCH_VIEW_OFS;
-vector PL_CROUCH_MIN;
-vector PL_CROUCH_MAX;
-
float spawnpoint_nag;
void relocate_spawnpoint()
{
- PL_VIEW_OFS = stov(autocvar_sv_player_viewoffset);
- PL_MIN = stov(autocvar_sv_player_mins);
- PL_MAX = stov(autocvar_sv_player_maxs);
- PL_HEAD = stov(autocvar_sv_player_headsize);
- PL_CROUCH_VIEW_OFS = stov(autocvar_sv_player_crouch_viewoffset);
- PL_CROUCH_MIN = stov(autocvar_sv_player_crouch_mins);
- PL_CROUCH_MAX = stov(autocvar_sv_player_crouch_maxs);
-
// nudge off the floor
setorigin(self, self.origin + '0 0 1');
self.classname = "target_location";
// location name in netname
// eventually support: count, teamgame selectors, line of sight?
-};
+}
void spawnfunc_info_location()
{
self.classname = "target_location";
self.message = self.netname;
-};
+}
string NearestLocation(vector p)
{
get_cvars_s = s;
MUTATOR_CALLHOOK(GetCvars);
GetCvars_handleFloat(s, f, autoswitch, "cl_autoswitch");
- GetCvars_handleFloat(s, f, cvar_cl_playerdetailreduction, "cl_playerdetailreduction");
+ GetCvars_handleFloat(s, f, cvar_cl_autoscreenshot, "cl_autoscreenshot");
GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion");
GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap");
GetCvars_handleFloat(s, f, cvar_cl_clippedspectating, "cl_clippedspectating");
vector randompos(vector m1, vector m2)
{
- local vector v;
+ vector v;
m2 = m2 - m1;
v_x = m2_x * random() + m1_x;
v_y = m2_y * random() + m1_y;
v_z = m2_z * random() + m1_z;
return v;
-};
+}
//#NO AUTOCVARS START
void readlevelcvars(void)
{
// first load all the mutators
+ if(cvar("g_invincible_projectiles"))
+ MUTATOR_ADD(mutator_invincibleprojectiles);
if(cvar("g_nix"))
MUTATOR_ADD(mutator_nix);
if(cvar("g_dodging"))
#ifdef ALLOW_FORCEMODELS
sv_clforceplayermodels = cvar("sv_clforceplayermodels");
#endif
- sv_loddistance1 = cvar("sv_loddistance1");
- sv_loddistance2 = cvar("sv_loddistance2");
-
- if(sv_loddistance2 <= sv_loddistance1)
- sv_loddistance2 = 1073741824; // enough to turn off LOD 2 reliably
sv_clones = cvar("sv_clones");
sv_gentle = cvar("sv_gentle");
{
if (e.classname == "body")
e = e.enemy;
- if (e.owner && e.owner != e)
+ else if (e.realowner && e.realowner != e)
+ e = e.realowner;
+ else if (e.owner && e.owner != e)
e = e.owner;
else
break;
void play2team(float t, string filename)
{
- local entity head;
+ entity head;
if (autocvar_bot_sound_monopoly)
return;
if(substring(m, -9,5) == "_lod2")
return;
precache_model(m);
- if(sv_loddistance1)
- {
- f = strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1));
- if(fexists(f))
- precache_model(f);
- f = strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1));
- if(fexists(f))
- precache_model(f);
- }
+ f = strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1));
+ if(fexists(f))
+ precache_model(f);
+ f = strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1));
+ if(fexists(f))
+ precache_model(f);
globhandle = search_begin(strcat(m, "_*.sounds"), TRUE, FALSE);
if (globhandle < 0)
if(autocvar_sv_precacheweapons)
{
//precache weapon models/sounds
- local float wep;
+ float wep;
wep = WEP_FIRST;
while (wep <= WEP_LAST)
{
string uid2name(string myuid) {
string s;
- s = db_get(ServerProgsDB, strcat("uid2name", myuid));
+ s = db_get(ServerProgsDB, strcat("/uid2name/", myuid));
+
+ // FIXME remove this later after 0.6 release
+ // convert old style broken records to correct style
+ if(s == "")
+ {
+ s = db_get(ServerProgsDB, strcat("uid2name", myuid));
+ if(s != "")
+ {
+ db_put(ServerProgsDB, strcat("/uid2name/", myuid), s);
+ db_put(ServerProgsDB, strcat("uid2name", myuid), "");
+ }
+ }
if(s == "")
s = "^1Unregistered Player";