}
if(l.goalentity.classname == "onslaught_generator")
{
- if(l.goalentity.team == FL_TEAM_1)
+ if(l.goalentity.team == NUM_TEAM_1)
l.enemy.isgenneighbor_red = TRUE;
- else if(l.goalentity.team == FL_TEAM_2)
+ else if(l.goalentity.team == NUM_TEAM_2)
l.enemy.isgenneighbor_blue = TRUE;
}
else
{
- if(l.goalentity.team == FL_TEAM_1)
+ if(l.goalentity.team == NUM_TEAM_1)
l.enemy.iscpneighbor_red = TRUE;
- else if(l.goalentity.team == FL_TEAM_2)
+ else if(l.goalentity.team == NUM_TEAM_2)
l.enemy.iscpneighbor_blue = TRUE;
}
}
}
if(l.enemy.classname == "onslaught_generator")
{
- if(l.enemy.team == FL_TEAM_1)
+ if(l.enemy.team == NUM_TEAM_1)
l.goalentity.isgenneighbor_red = TRUE;
- else if(l.enemy.team == FL_TEAM_2)
+ else if(l.enemy.team == NUM_TEAM_2)
l.goalentity.isgenneighbor_blue = TRUE;
}
else
{
- if(l.enemy.team == FL_TEAM_1)
+ if(l.enemy.team == NUM_TEAM_1)
l.goalentity.iscpneighbor_red = TRUE;
- else if(l.enemy.team == FL_TEAM_2)
+ else if(l.enemy.team == NUM_TEAM_2)
l.goalentity.iscpneighbor_blue = TRUE;
}
}
{
if (l.iscaptured)
{
- if (l.team == FL_TEAM_1) t1 = 1;
- if (l.team == FL_TEAM_2) t2 = 1;
- if (l.team == FL_TEAM_3) t3 = 1;
- if (l.team == FL_TEAM_4) t4 = 1;
+ if (l.team == NUM_TEAM_1) t1 = 1;
+ if (l.team == NUM_TEAM_2) t2 = 1;
+ if (l.team == NUM_TEAM_3) t3 = 1;
+ if (l.team == NUM_TEAM_4) t4 = 1;
}
onslaught_generator_updatesprite(l);
l = l.chain;
float onslaught_controlpoint_can_be_linked(entity cp, float t)
{
- if(t == FL_TEAM_1)
+ if(t == NUM_TEAM_1)
{
if(cp.isgenneighbor_red)
return 2;
if(cp.iscpneighbor_red)
return 1;
}
- else if(t == FL_TEAM_2)
+ else if(t == NUM_TEAM_2)
{
if(cp.isgenneighbor_blue)
return 2;
// if there's already an icon built, nothing happens
if(cp.team == t)
{
- a = onslaught_controlpoint_can_be_linked(cp, FL_TEAM_1 + FL_TEAM_2 - t);
+ a = onslaught_controlpoint_can_be_linked(cp, NUM_TEAM_1 + NUM_TEAM_2 - t);
if(a) // attackable by enemy?
return -2; // EMERGENCY!
return -1;
// free point
if(onslaught_controlpoint_can_be_linked(cp, t))
{
- a = onslaught_controlpoint_can_be_linked(cp, FL_TEAM_1 + FL_TEAM_2 - t);
+ a = onslaught_controlpoint_can_be_linked(cp, NUM_TEAM_1 + NUM_TEAM_2 - t);
if(a == 2)
return 4; // GET THIS ONE NOW!
else
{
if(t == e.team)
{
- if(e.team == FL_TEAM_1)
+ if(e.team == NUM_TEAM_1)
return "ons-gen-red";
- else if(e.team == FL_TEAM_2)
+ else if(e.team == NUM_TEAM_2)
return "ons-gen-blue";
}
if(e.isshielded)
return "ons-gen-shielded";
- if(e.team == FL_TEAM_1)
+ if(e.team == NUM_TEAM_1)
return "ons-gen-red";
- else if(e.team == FL_TEAM_2)
+ else if(e.team == NUM_TEAM_2)
return "ons-gen-blue";
return "";
}
void onslaught_generator_updatesprite(entity e)
{
string s1, s2, s3;
- s1 = onslaught_generator_waypointsprite_for_team(e, FL_TEAM_1);
- s2 = onslaught_generator_waypointsprite_for_team(e, FL_TEAM_2);
+ s1 = onslaught_generator_waypointsprite_for_team(e, NUM_TEAM_1);
+ s2 = onslaught_generator_waypointsprite_for_team(e, NUM_TEAM_2);
s3 = onslaught_generator_waypointsprite_for_team(e, -1);
WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3);
e.lastshielded = e.isshielded;
if(e.lastshielded)
{
- if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
+ if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2)
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, 0.5 * colormapPaletteColor(e.team - 1, FALSE));
else
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.5 0.5 0.5');
}
else
{
- if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
+ if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2)
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, colormapPaletteColor(e.team - 1, FALSE));
else
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.75 0.75 0.75');
a = onslaught_controlpoint_attackable(e, t);
if(a == 3 || a == 4) // ATTACK/TOUCH THIS ONE NOW
{
- if(e.team == FL_TEAM_1)
+ if(e.team == NUM_TEAM_1)
return "ons-cp-atck-red";
- else if(e.team == FL_TEAM_2)
+ else if(e.team == NUM_TEAM_2)
return "ons-cp-atck-blue";
else
return "ons-cp-atck-neut";
}
else if(a == -2) // DEFEND THIS ONE NOW
{
- if(e.team == FL_TEAM_1)
+ if(e.team == NUM_TEAM_1)
return "ons-cp-dfnd-red";
- else if(e.team == FL_TEAM_2)
+ else if(e.team == NUM_TEAM_2)
return "ons-cp-dfnd-blue";
}
else if(e.team == t || a == -1 || a == 1) // own point, or fire at it
{
- if(e.team == FL_TEAM_1)
+ if(e.team == NUM_TEAM_1)
return "ons-cp-red";
- else if(e.team == FL_TEAM_2)
+ else if(e.team == NUM_TEAM_2)
return "ons-cp-blue";
}
else if(a == 2) // touch it
}
else
{
- if(e.team == FL_TEAM_1)
+ if(e.team == NUM_TEAM_1)
return "ons-cp-red";
- else if(e.team == FL_TEAM_2)
+ else if(e.team == NUM_TEAM_2)
return "ons-cp-blue";
else
return "ons-cp-neut";
void onslaught_controlpoint_updatesprite(entity e)
{
string s1, s2, s3;
- s1 = onslaught_controlpoint_waypointsprite_for_team(e, FL_TEAM_1);
- s2 = onslaught_controlpoint_waypointsprite_for_team(e, FL_TEAM_2);
+ s1 = onslaught_controlpoint_waypointsprite_for_team(e, NUM_TEAM_1);
+ s2 = onslaught_controlpoint_waypointsprite_for_team(e, NUM_TEAM_2);
s3 = onslaught_controlpoint_waypointsprite_for_team(e, -1);
WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3);
float sh;
- sh = !(onslaught_controlpoint_can_be_linked(e, FL_TEAM_1) || onslaught_controlpoint_can_be_linked(e, FL_TEAM_2));
+ sh = !(onslaught_controlpoint_can_be_linked(e, NUM_TEAM_1) || onslaught_controlpoint_can_be_linked(e, NUM_TEAM_2));
if(e.lastteam != e.team + 2 || e.lastshielded != sh || e.iscaptured != e.lastcaptured)
{
}
if(e.lastshielded)
{
- if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
+ if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2)
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, 0.5 * colormapPaletteColor(e.team - 1, FALSE));
else
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.5 0.5 0.5');
}
else
{
- if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2)
+ if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2)
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, colormapPaletteColor(e.team - 1, FALSE));
else
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.75 0.75 0.75');
if (!self.team)
objerror("team must be set");
- if(self.team == FL_TEAM_1)
+ if(self.team == NUM_TEAM_1)
ons_red_generator = self;
- if(self.team == FL_TEAM_2)
+ if(self.team == NUM_TEAM_2)
ons_blue_generator = self;
self.team_saved = self.team;
InitializeEntity(self, onslaught_generator_delayed, INITPRIO_LAST);
WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
- WaypointSprite_UpdateRule(self.sprite, FL_TEAM_2, SPRITERULE_TEAMPLAY);
+ WaypointSprite_UpdateRule(self.sprite, NUM_TEAM_2, SPRITERULE_TEAMPLAY);
WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
WaypointSprite_UpdateHealth(self.sprite, self.health);
if (attacker.classname == "player")
{
nag = FALSE;
- if(self.team == FL_TEAM_1)
+ if(self.team == NUM_TEAM_1)
{
if(time - ons_notification_time_team1 > 10)
{
ons_notification_time_team1 = time;
}
}
- else if(self.team == FL_TEAM_2)
+ else if(self.team == NUM_TEAM_2)
{
if(time - ons_notification_time_team2 > 10)
{
waypoint_spawnforitem(self);
WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
- WaypointSprite_UpdateRule(self.sprite, FL_TEAM_2, SPRITERULE_TEAMPLAY);
+ WaypointSprite_UpdateRule(self.sprite, NUM_TEAM_2, SPRITERULE_TEAMPLAY);
onslaught_updatelinks();
redpower = bluepower = 0;
if(self.goalentity.islinked)
{
- if(self.goalentity.team == FL_TEAM_1)
+ if(self.goalentity.team == NUM_TEAM_1)
redpower = 1;
- else if(self.goalentity.team == FL_TEAM_2)
+ else if(self.goalentity.team == NUM_TEAM_2)
bluepower = 1;
}
if(self.enemy.islinked)
{
- if(self.enemy.team == FL_TEAM_1)
+ if(self.enemy.team == NUM_TEAM_1)
redpower = 2;
- else if(self.enemy.team == FL_TEAM_2)
+ else if(self.enemy.team == NUM_TEAM_2)
bluepower = 2;
}
float cc;
if(redpower == 1 && bluepower == 2)
- cc = (FL_TEAM_1 - 1) * 0x01 + (FL_TEAM_2 - 1) * 0x10;
+ cc = (NUM_TEAM_1 - 1) * 0x01 + (NUM_TEAM_2 - 1) * 0x10;
else if(redpower == 2 && bluepower == 1)
- cc = (FL_TEAM_1 - 1) * 0x10 + (FL_TEAM_2 - 1) * 0x01;
+ cc = (NUM_TEAM_1 - 1) * 0x10 + (NUM_TEAM_2 - 1) * 0x01;
else if(redpower)
- cc = (FL_TEAM_1 - 1) * 0x11;
+ cc = (NUM_TEAM_1 - 1) * 0x11;
else if(bluepower)
- cc = (FL_TEAM_2 - 1) * 0x11;
+ cc = (NUM_TEAM_2 - 1) * 0x11;
else
cc = 0;
RandomSelection_Init();
- if(self.team == FL_TEAM_1)
+ if(self.team == NUM_TEAM_1)
RandomSelection_Add(ons_red_generator, 0, string_null, 1, 1);
- if(self.team == FL_TEAM_2)
+ if(self.team == NUM_TEAM_2)
RandomSelection_Add(ons_blue_generator, 0, string_null, 1, 1);
entity _cp = findchain(classname, "onslaught_controlpoint"):
RandomSelection_Init();
- if(self.team == FL_TEAM_1)
+ if(self.team == NUM_TEAM_1)
{
if(!_close_to_home)
_trg_gen = ons_blue_generator;
_trg_gen = ons_red_generator;
}
- if(self.team == FL_TEAM_2)
+ if(self.team == NUM_TEAM_2)
{
if(_close_to_home)
_trg_gen = ons_blue_generator;
if(!autocvar_g_onslaught_spawn_at_generator)
return 0;
- _trg_gen = ((self.team == FL_TEAM_1) ? ons_red_generator : ons_blue_generator);
+ _trg_gen = ((self.team == NUM_TEAM_1) ? ons_red_generator : ons_blue_generator);
for(i = 0; i < 10; ++i)
{