gen.classname = "onslaught_generator";
gen.solid = SOLID_BBOX;
gen.team_saved = teamnumber;
+ IL_PUSH(g_saved_team, gen);
set_movetype(gen, MOVETYPE_NONE);
gen.lasthealth = gen.max_health = gen.health = autocvar_g_onslaught_gen_health;
gen.takedamage = DAMAGE_AIM;
precache_sound(this.noise1);
this.team_saved = this.team;
+ IL_PUSH(g_saved_team, this);
this.dropped_origin = this.origin;
this.reset = func_breakable_reset;
EXACTTRIGGER_INIT;
this.team_saved = this.team;
+ IL_PUSH(g_saved_team, this);
if (this.health)
{
spawnfunc(trigger_relay_teamcheck)
{
this.team_saved = this.team;
+ IL_PUSH(g_saved_team, this);
this.use = trigger_relay_teamcheck_use;
this.reset = trigger_relay_teamcheck_reset;
}
MUTATOR_CALLHOOK(reset_map_global);
- FOREACH_ENTITY_ORDERED(IS_NOT_A_CLIENT(it), {
+ FOREACH_ENTITY_FLOAT(pure_data, false,
+ {
+ if(IS_CLIENT(it))
+ continue;
if (it.reset)
{
it.reset(it);
IntrusiveList g_locations;
STATIC_INIT(g_locations) { g_locations = IL_NEW(); }
+
+IntrusiveList g_saved_team;
+STATIC_INIT(g_saved_team) { g_saved_team = IL_NEW(); }
else
assault_attacker_team = NUM_TEAM_1;
- FOREACH_ENTITY_FLOAT(pure_data, false,
+ IL_EACH(g_saved_team, !IS_CLIENT(it),
{
- if(IS_CLIENT(it))
- continue;
-
- if (it.team_saved == NUM_TEAM_1) it.team_saved = NUM_TEAM_2;
- else if (it.team_saved == NUM_TEAM_2) it.team_saved = NUM_TEAM_1;
+ if(it.team_saved == NUM_TEAM_1)
+ it.team_saved = NUM_TEAM_2;
+ else if(it.team_saved == NUM_TEAM_2)
+ it.team_saved = NUM_TEAM_1;
});
// reset the level with a countdown
setthink(this, spawnpoint_think);
this.nextthink = time + 0.5 + random() * 2; // shouldn't need it for a little second
this.team_saved = this.team;
+ IL_PUSH(g_saved_team, this);
if (!this.cnt)
this.cnt = 1;