t = (weaponinfo.spawnflags & WEP_FLAG_NORMAL);
else if(t < -1)
t = 0;
- else if (g_race || g_cts)
- t = (i == WEP_LASER);
+ else if (g_race)
+ t = (i == WEP_LASER || i == WEP_SHOTGUN);
+ else if (g_cts)
+ t = (i == WEP_SHOTGUN);
else if (g_nexball)
t = 0; // weapon is set a few lines later
else
sv_gentle = cvar("sv_gentle");
sv_foginterval = cvar("sv_foginterval");
g_cloaked = cvar("g_cloaked");
+ if(g_cts)
+ g_cloaked = 1; // always enable cloak in CTS
g_jump_grunt = cvar("g_jump_grunt");
g_footsteps = cvar("g_footsteps");
g_grappling_hook = cvar("g_grappling_hook");
g_pinata = cvar("g_pinata");
- g_weapon_stay = cvar("g_weapon_stay");
+ g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
+ if(!g_weapon_stay)
+ g_weapon_stay = cvar("g_weapon_stay");
if (!g_weapon_stay && (cvar("deathmatch") == 2))
g_weapon_stay = 1;
objerror_builtin(s);
}
+.float remove_except_protected_forbidden;
+void remove_except_protected(entity e)
+{
+ if(e.remove_except_protected_forbidden)
+ error("not allowed to remove this at this point");
+ remove_builtin(e);
+}
+
void remove_unsafely(entity e)
{
remove_builtin(e);
entity startoflist;
startoflist = initialize_entity_first;
initialize_entity_first = world;
+ remove = remove_except_protected;
+ for (self = startoflist; self; self = self.initialize_entity_next)
+ {
+ self.remove_except_protected_forbidden = 1;
+ }
for (self = startoflist; self; )
{
entity e;
self.initialize_entity_order = 0;
self.initialize_entity = func_null;
self.initialize_entity_next = world;
+ self.remove_except_protected_forbidden = 0;
if (self.classname == "initialize_entity")
{
entity e_old;
self = e_old;
}
//dprint("Delayed initialization: ", self.classname, "\n");
- func();
+ if(func != func_null)
+ func();
+ else
+ {
+ eprint(self);
+ backtrace(strcat("Null function in: ", self.classname, "\n"));
+ }
self = e;
}
+ remove = remove_unsafely;
}
.float uncustomizeentityforclient_set;