.vector glowmod;
void monster_changeteam()
{
- switch(self.team - 1)
- {
- case NUM_TEAM_1: // Red
- {
- self.glowmod = '2 0 0';
- self.teamradar_color = '1 0 0';
- break;
- }
- case NUM_TEAM_2: // Blue
- {
- self.glowmod = '0 0 2';
- self.teamradar_color = '0 0 1';
- break;
- }
- case NUM_TEAM_3: // Yellow
- {
- self.glowmod = '1 1 0';
- self.teamradar_color = '1 1 0';
- break;
- }
- case NUM_TEAM_4: // Pink
- {
- self.glowmod = '1 0 1';
- self.teamradar_color = '1 0 1';
- break;
- }
- }
+ self.glowmod = Team_ColorRGB(self.team - 1);
+ self.teamradar_color = Team_ColorRGB(self.team - 1);
if(self.team)
self.colormap = 1024 + (self.team - 1) * 17;
.vector glowmod;
void generator_changeteam()
-{
- switch(self.team - 1)
- {
- case NUM_TEAM_1: // Red
- {
- self.glowmod = '2 0 0';
- self.teamradar_color = '1 0 0';
- break;
- }
- case NUM_TEAM_2: // Blue
- {
- self.glowmod = '0 0 2';
- self.teamradar_color = '0 0 1';
- break;
- }
- case NUM_TEAM_3: // Yellow
- {
- self.glowmod = '1 1 0';
- self.teamradar_color = '1 1 0';
- break;
- }
- case NUM_TEAM_4: // Pink
- {
- self.glowmod = '1 0 1';
- self.teamradar_color = '1 0 1';
- break;
- }
- }
+{
+ self.glowmod = Team_ColorRGB(self.team - 1);
+ self.teamradar_color = Team_ColorRGB(self.team - 1);
if(self.team)
self.colormap = 1024 + (self.team - 1) * 17;
onslaught_updatelinks();
}
- /*
- if(self.health <= 0)
- setmodel(self, "models/onslaught/generator_dead.md3");
- else if(self.health < self.max_health * 0.10)
- setmodel(self, "models/onslaught/generator_dmg9.md3");
- else if(self.health < self.max_health * 0.20)
- setmodel(self, "models/onslaught/generator_dmg8.md3");
- else if(self.health < self.max_health * 0.30)
- setmodel(self, "models/onslaught/generator_dmg7.md3");
- else if(self.health < self.max_health * 0.40)
- setmodel(self, "models/onslaught/generator_dmg6.md3");
- else if(self.health < self.max_health * 0.50)
- setmodel(self, "models/onslaught/generator_dmg5.md3");
- else if(self.health < self.max_health * 0.60)
- setmodel(self, "models/onslaught/generator_dmg4.md3");
- else if(self.health < self.max_health * 0.70)
- setmodel(self, "models/onslaught/generator_dmg3.md3");
- else if(self.health < self.max_health * 0.80)
- setmodel(self, "models/onslaught/generator_dmg2.md3");
- else if(self.health < self.max_health * 0.90)
- setmodel(self, "models/onslaught/generator_dmg1.md3");
- setsize(self, GENERATOR_MIN, GENERATOR_MAX);
- */
// Throw some flaming gibs on damage, more damage = more chance for gib
if(random() < damage/220)