[nexuiz-commits] r7147 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jul 6 02:08:57 EDT 2009
Author: div0
Date: 2009-07-06 02:08:57 -0400 (Mon, 06 Jul 2009)
New Revision: 7147
Modified:
trunk/data/qcsrc/server/mode_onslaught.qc
Log:
make ONS less spammy: only show healthbars on not shielded control points
Modified: trunk/data/qcsrc/server/mode_onslaught.qc
===================================================================
--- trunk/data/qcsrc/server/mode_onslaught.qc 2009-07-06 05:46:38 UTC (rev 7146)
+++ trunk/data/qcsrc/server/mode_onslaught.qc 2009-07-06 06:08:57 UTC (rev 7147)
@@ -674,9 +674,10 @@
self.think = onslaught_generator_deaththink; // explosion sequence
self.nextthink = time; // start exploding immediately
self.think(); // do the first explosion now
- onslaught_updatelinks();
WaypointSprite_UpdateMaxHealth(self.sprite, 0);
+
+ onslaught_updatelinks();
}
if(self.health <= 0)
setmodel(self, "models/onslaught/generator_dead.md3");
@@ -861,6 +862,19 @@
WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.75 0.75 0.75');
}
WaypointSprite_Ping(e.sprite);
+
+ if(e.goalentity) // don't mess up build bars!
+ {
+ if(sh)
+ {
+ WaypointSprite_UpdateMaxHealth(e.sprite, 0);
+ }
+ else
+ {
+ WaypointSprite_UpdateMaxHealth(e.sprite, e.goalentity.max_health);
+ WaypointSprite_UpdateHealth(e.sprite, e.goalentity.health);
+ }
+ }
}
}
@@ -1035,6 +1049,9 @@
self.owner.iscaptured = FALSE;
self.owner.team = 0;
self.owner.colormap = 1024;
+
+ WaypointSprite_UpdateMaxHealth(self.owner.sprite, 0);
+
onslaught_updatelinks();
// Use targets now (somebody make sure this is in the right place..)
@@ -1050,8 +1067,6 @@
setmodel(self.owner, "models/onslaught/controlpoint_pad.md3");
//setsize(self, '-32 -32 0', '32 32 8');
- WaypointSprite_UpdateMaxHealth(self.owner.sprite, 0);
-
remove(self);
}
};
@@ -1164,6 +1179,10 @@
sound(self, CHAN_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
bprint(ColoredTeamName(self.team), " captured ", self.owner.message, " control point\n");
self.owner.iscaptured = TRUE;
+
+ WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health);
+ WaypointSprite_UpdateHealth(self.owner.sprite, self.health);
+
onslaught_updatelinks();
// Use targets now (somebody make sure this is in the right place..)
@@ -1175,9 +1194,6 @@
self.cp_origin = self.origin;
self.cp_bob_origin = '0 0 0.1';
self.cp_bob_spd = 0;
-
- WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health);
- WaypointSprite_UpdateHealth(self.owner.sprite, self.health);
}
self.alpha = self.health / self.max_health;
// colormod flash when shot
@@ -1246,12 +1262,12 @@
setmodel(self, "models/onslaught/controlpoint_pad.md3");
//setsize(self, '-32 -32 0', '32 32 8');
+ WaypointSprite_UpdateMaxHealth(self.sprite, 0);
+
onslaught_updatelinks();
activator = self;
SUB_UseTargets(); // to reset the structures, playerspawns etc.
-
- WaypointSprite_UpdateMaxHealth(self.sprite, 0);
}
/*QUAKED spawnfunc_onslaught_controlpoint (0 .5 .8) (-32 -32 0) (32 32 128)
More information about the nexuiz-commits
mailing list