summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2004-03-25 05:19:23 +0000
committerTim Angus <tim@ngus.net>2004-03-25 05:19:23 +0000
commit01b2fd216a79749a0d801e87a44ba1b399b2a977 (patch)
tree9efd792ffbc4be20bd023372799bccd46ee84eb2
parentc5d421e1af51f714192b236933df7bde5a331000 (diff)
* Fixed particle system infinite loop bug in trem2
* Spawns that are interfered with plats now suicide * Fixed spectator scrolling colour screwup
-rw-r--r--entities.def14
-rw-r--r--src/cgame/cg_buildable.c4
-rw-r--r--src/cgame/cg_draw.c10
-rw-r--r--src/cgame/cg_particles.c2
-rw-r--r--src/game/g_buildable.c6
5 files changed, 31 insertions, 5 deletions
diff --git a/entities.def b/entities.def
index 19282d7c..bd58da55 100644
--- a/entities.def
+++ b/entities.def
@@ -1418,6 +1418,20 @@ TRIGGER_* ENTITIES
//=============================================================================
+/*QUAKED trigger_stage (.5 .5 .5) (-8 -8 -8) (8 8 8)
+Fires its targets when the team key reaches stage key.
+UNTESTED: please report whether or not this works for you.
+
+-------- KEYS --------
+target: this points to the entity to activate.
+
+team: the team which triggers this entity; 1 for aliens, 2 for humans
+
+stage: the stage at which this entity is triggered; 1 for stage 2, 2 for stage 3
+*/
+
+//=============================================================================
+
/*QUAKED trigger_always (.5 .5 .5) (-8 -8 -8) (8 8 8)
Automatic trigger. It will fire the entities it targets as soon as it spawns in the game.
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index d5f6871e..708e8277 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -551,6 +551,10 @@ static void CG_RunBuildableLerpFrame( centity_t *cent )
// see if the animation sequence is switching
if( newAnimation != lf->animationNumber || !lf->animation )
{
+ if( cg_debugRandom.integer )
+ CG_Printf( "newAnimation: %d lf->animationNumber: %d lf->animation: %d\n",
+ newAnimation, lf->animationNumber, !!lf->animation );
+
CG_SetBuildableLerpFrameAnimation( buildable, lf, newAnimation );
if( !cg_buildables[ buildable ].sounds[ newAnimation ].looped &&
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 4608893f..eb098793 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -1495,8 +1495,14 @@ static void CG_DrawTeamSpectators( rectDef_t *rect, float scale, vec4_t color, q
{
if( cg.spectatorOffset < cg.spectatorLen )
{
- cg.spectatorPaintX += CG_Text_Width( &cg.spectatorList[ cg.spectatorOffset ], scale, 1 ) - 1;
- cg.spectatorOffset++;
+ //TA: skip colour directives
+ if( Q_IsColorString( &cg.spectatorList[ cg.spectatorOffset ] ) )
+ cg.spectatorOffset += 2;
+ else
+ {
+ cg.spectatorPaintX += CG_Text_Width( &cg.spectatorList[ cg.spectatorOffset ], scale, 1 ) - 1;
+ cg.spectatorOffset++;
+ }
}
else
{
diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c
index cc7c4722..9b37382a 100644
--- a/src/cgame/cg_particles.c
+++ b/src/cgame/cg_particles.c
@@ -275,7 +275,7 @@ static void CG_SpawnNewParticles( void )
//calculate next ejection time
lerpFrac = 1.0 - ( (float)pe->count / (float)pe->totalParticles );
- pe->nextEjectionTime = cg.time + CG_RandomiseValue(
+ pe->nextEjectionTime = cg.time + (int)CG_RandomiseValue(
CG_LerpValues( pe->ejectPeriod.initial,
pe->ejectPeriod.final,
lerpFrac ),
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 3ff4da9a..3cebcd08 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -588,7 +588,8 @@ void ASpawn_Think( gentity_t *self )
{
if( ( ent = G_CheckSpawnPoint( self->s.origin, self->s.origin2, BA_A_SPAWN, NULL ) ) != NULL )
{
- if( ent->s.eType == ET_BUILDABLE || ent->s.number == ENTITYNUM_WORLD )
+ if( ent->s.eType == ET_BUILDABLE || ent->s.number == ENTITYNUM_WORLD ||
+ ent->s.eType == ET_MOVER )
{
G_Damage( self, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE );
return;
@@ -2090,7 +2091,8 @@ void HSpawn_Think( gentity_t *self )
{
if( ( ent = G_CheckSpawnPoint( self->s.origin, self->s.origin2, BA_H_SPAWN, NULL ) ) != NULL )
{
- if( ent->s.eType == ET_BUILDABLE || ent->s.number == ENTITYNUM_WORLD )
+ if( ent->s.eType == ET_BUILDABLE || ent->s.number == ENTITYNUM_WORLD ||
+ ent->s.eType == ET_MOVER )
{
G_Damage( self, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE );
return;