- if (l.team == COLOR_TEAM1) t1 = 1;
- if (l.team == COLOR_TEAM2) t2 = 1;
- if (l.team == COLOR_TEAM3) t3 = 1;
- if (l.team == COLOR_TEAM4) 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;
}
// self.max_health / 300 gives 5 minutes of overtime.
// control points reduce the overtime duration.
}
// self.max_health / 300 gives 5 minutes of overtime.
// control points reduce the overtime duration.
- sound(self, CH_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTEN_NORM);
- soundto(MSG_ONE, e, CHAN_AUTO, "kh/alarm.wav", VOL_BASE, ATTN_NONE); // FIXME: Uniqe sound?
+ soundto(MSG_ONE, e, CHAN_AUTO, "kh/alarm.wav", VOL_BASE, ATTEN_NONE); // FIXME: Uniqe sound?
if(random() < 0.01)
{
pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
if(random() < 0.01)
{
pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
- sound(self, CH_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTEN_NORM);
}
else
pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
}
else
pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
- sound(self, CH_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTEN_NORM);
- sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTEN_NORM);
te_explosion(org);
onslaught_generator_shockwave_spawn(org);
pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
te_explosion(org);
onslaught_generator_shockwave_spawn(org);
pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
- sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
{
// this is protected by a shield, so ignore the damage
if (time > self.pain_finished)
{
// this is protected by a shield, so ignore the damage
if (time > self.pain_finished)
{
play2(attacker, "onslaught/damageblockedbyshield.wav");
self.pain_finished = time + 1;
{
play2(attacker, "onslaught/damageblockedbyshield.wav");
self.pain_finished = time + 1;
- bprint(ColoredTeamName(self.team), " generator has less than ", ftos(h), " health remaining\n");
+ bprint(Team_ColoredFullName(self.team), " generator has less than ", ftos(h), " health remaining\n");
- t = ColoredTeamName(attacker.team);
- bprint(ColoredTeamName(self.team), " generator destroyed by ", t, "!\n");
+ t = Team_ColoredFullName(attacker.team);
+ bprint(Team_ColoredFullName(self.team), " generator destroyed by ", t, "!\n");
// Throw some flaming gibs on damage, more damage = more chance for gib
if(random() < damage/220)
{
// Throw some flaming gibs on damage, more damage = more chance for gib
if(random() < damage/220)
{
- sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
i = random();
if(i < 0.3)
ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib1.md3", 5, TRUE);
i = random();
if(i < 0.3)
ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib1.md3", 5, TRUE);
- sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE, ATTEN_NORM);
- sound(self, CH_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE, ATTEN_NORM);
- s1 = onslaught_generator_waypointsprite_for_team(e, COLOR_TEAM1);
- s2 = onslaught_generator_waypointsprite_for_team(e, COLOR_TEAM2);
+ 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);
s3 = onslaught_generator_waypointsprite_for_team(e, -1);
WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3);
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
{
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
{
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, colormapPaletteColor(e.team - 1, FALSE));
else
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.75 0.75 0.75');
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
{
a = onslaught_controlpoint_attackable(e, t);
if(a == 3 || a == 4) // ATTACK/TOUCH THIS ONE NOW
{
return "ons-cp-atck-blue";
else
return "ons-cp-atck-neut";
}
else if(a == -2) // DEFEND THIS ONE NOW
{
return "ons-cp-atck-blue";
else
return "ons-cp-atck-neut";
}
else if(a == -2) // DEFEND THIS ONE NOW
{
return "ons-cp-dfnd-blue";
}
else if(e.team == t || a == -1 || a == 1) // own point, or fire at it
{
return "ons-cp-dfnd-blue";
}
else if(e.team == t || a == -1 || a == 1) // own point, or fire at it
{
- s1 = onslaught_controlpoint_waypointsprite_for_team(e, COLOR_TEAM1);
- s2 = onslaught_controlpoint_waypointsprite_for_team(e, COLOR_TEAM2);
+ 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;
s3 = onslaught_controlpoint_waypointsprite_for_team(e, -1);
WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3);
float sh;
- sh = !(onslaught_controlpoint_can_be_linked(e, COLOR_TEAM1) || onslaught_controlpoint_can_be_linked(e, COLOR_TEAM2));
+ sh = !(onslaught_controlpoint_can_be_linked(e, NUM_TEAM_1) || onslaught_controlpoint_can_be_linked(e, 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
{
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
{
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, colormapPaletteColor(e.team - 1, FALSE));
else
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.75 0.75 0.75');
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, colormapPaletteColor(e.team - 1, FALSE));
else
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.75 0.75 0.75');
InitializeEntity(self, onslaught_generator_delayed, INITPRIO_LAST);
WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
InitializeEntity(self, onslaught_generator_delayed, INITPRIO_LAST);
WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
WaypointSprite_UpdateHealth(self.sprite, self.health);
WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
WaypointSprite_UpdateHealth(self.sprite, self.health);
{
// this is protected by a shield, so ignore the damage
if (time > self.pain_finished)
{
// this is protected by a shield, so ignore the damage
if (time > self.pain_finished)
{
play2(attacker, "onslaught/damageblockedbyshield.wav");
self.pain_finished = time + 1;
{
play2(attacker, "onslaught/damageblockedbyshield.wav");
self.pain_finished = time + 1;
pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
//sound on every hit
if (random() < 0.5)
pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
//sound on every hit
if (random() < 0.5)
- sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTN_NORM);
+ sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTEN_NORM);
- sound(self, CH_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTN_NORM);
+ sound(self, CH_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTEN_NORM);
- sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
{
string t;
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
{
string t;
- t = ColoredTeamName(attacker.team);
- bprint(ColoredTeamName(self.team), " ", self.message, " control point destroyed by ", t, "\n");
+ t = Team_ColoredFullName(attacker.team);
+ bprint(Team_ColoredFullName(self.team), " ", self.message, " control point destroyed by ", t, "\n");
ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 25, "models/onslaught/controlpoint_icon_gib1.md3", 3, FALSE);
ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE);
ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE);
ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 25, "models/onslaught/controlpoint_icon_gib1.md3", 3, FALSE);
ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE);
ons_throwgib(self.origin, (2 * randomvec() - '1 1 1') * 45, "models/onslaught/controlpoint_icon_gib2.md3", 3, FALSE);
pointparticles(particleeffectnum("electricity_sparks"), self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
if(random() > 0.8)
pointparticles(particleeffectnum("electricity_sparks"), self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
if(random() > 0.8)
- sound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTEN_NORM);
- sound(self, CH_PAIN, "onslaught/ons_spark2.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_PAIN, "onslaught/ons_spark2.wav", VOL_BASE, ATTEN_NORM);
self.health = self.max_health;
self.count = autocvar_g_onslaught_cp_regen * sys_frametime; // slow repair rate from now on
self.think = onslaught_controlpoint_icon_think;
self.health = self.max_health;
self.count = autocvar_g_onslaught_cp_regen * sys_frametime; // slow repair rate from now on
self.think = onslaught_controlpoint_icon_think;
- sound(self, CH_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
- bprint(ColoredTeamName(self.team), " captured ", self.owner.message, " control point\n");
+ sound(self, CH_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTEN_NORM);
+ bprint(Team_ColoredFullName(self.team), " captured ", self.owner.message, " control point\n");
self.owner.iscaptured = TRUE;
WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health);
self.owner.iscaptured = TRUE;
WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health);
e.think = onslaught_controlpoint_icon_buildthink;
e.nextthink = time + sys_frametime;
e.count = (e.max_health - e.health) * sys_frametime / autocvar_g_onslaught_cp_buildtime; // how long it takes to build
e.think = onslaught_controlpoint_icon_buildthink;
e.nextthink = time + sys_frametime;
e.count = (e.max_health - e.health) * sys_frametime / autocvar_g_onslaught_cp_buildtime; // how long it takes to build
- sound(e, CH_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
+ sound(e, CH_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTEN_NORM);
self.team = e.team;
self.colormap = e.colormap;
WaypointSprite_UpdateBuildFinished(self.sprite, time + (e.max_health - e.health) / (e.count / sys_frametime));
self.team = e.team;
self.colormap = e.colormap;
WaypointSprite_UpdateBuildFinished(self.sprite, time + (e.max_health - e.health) / (e.count / sys_frametime));
waypoint_spawnforitem(self);
WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
waypoint_spawnforitem(self);
WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0');
RandomSelection_Add(ons_red_generator, 0, string_null, 1, 1);
RandomSelection_Add(ons_red_generator, 0, string_null, 1, 1);
RandomSelection_Add(ons_blue_generator, 0, string_null, 1, 1);
entity _cp = findchain(classname, "onslaught_controlpoint"):
RandomSelection_Add(ons_blue_generator, 0, string_null, 1, 1);
entity _cp = findchain(classname, "onslaught_controlpoint"):