summaryrefslogtreecommitdiff
path: root/src/game/g_missile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_missile.c')
-rw-r--r--src/game/g_missile.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/game/g_missile.c b/src/game/g_missile.c
index 6317636..71b5432 100644
--- a/src/game/g_missile.c
+++ b/src/game/g_missile.c
@@ -571,6 +571,12 @@ void AHive_ReturnToHive( gentity_t *self )
self->think = G_ExplodeMissile;
self->nextthink = level.time + 15000;
}
+
+ if( g_modStage3Strength.integer > 0 )
+ {
+ int nt = self->nextthink - level.time;
+ self->nextthink = level.time + nt * 100 / g_modStage3Strength.integer;
+ }
}
/*
@@ -584,6 +590,7 @@ void AHive_SearchAndDestroy( gentity_t *self )
{
vec3_t dir;
trace_t tr;
+ int speed;
trap_Trace( &tr, self->r.currentOrigin, self->r.mins, self->r.maxs,
self->target_ent->r.currentOrigin, self->r.ownerNum, self->clipmask );
@@ -603,13 +610,26 @@ void AHive_SearchAndDestroy( gentity_t *self )
VectorSubtract( self->target_ent->r.currentOrigin, self->r.currentOrigin, dir );
VectorNormalize( dir );
+ if( g_modStage3Strength.integer > 0 )
+ speed = HIVE_SPEED * g_modStage3Strength.integer / 100;
+ else
+ speed = HIVE_SPEED;
+
//change direction towards the player
- VectorScale( dir, HIVE_SPEED, self->s.pos.trDelta );
+ VectorScale( dir, speed, self->s.pos.trDelta );
SnapVector( self->s.pos.trDelta ); // save net bandwidth
VectorCopy( self->r.currentOrigin, self->s.pos.trBase );
self->s.pos.trTime = level.time;
self->nextthink = level.time + HIVE_DIR_CHANGE_PERIOD;
+
+ if( g_modBuildableSpeed.integer > 0)
+ self->nextthink = level.time + HIVE_DIR_CHANGE_PERIOD * 100 / g_modBuildableSpeed.integer;
+ if( g_modStage3Strength.integer > 0)
+ {
+ int nt = self->nextthink - level.time;
+ self->nextthink = level.time + nt * 100 / g_modStage3Strength.integer;
+ }
}
}
@@ -642,6 +662,12 @@ gentity_t *fire_hive( gentity_t *self, vec3_t start, vec3_t dir )
bolt->clipmask = MASK_SHOT;
bolt->target_ent = self->target_ent;
+ if( g_modBuildableSpeed.integer > 0)
+ {
+ bolt->nextthink = level.time + HIVE_DIR_CHANGE_PERIOD * 100 / g_modBuildableSpeed.integer;
+ bolt->damage = bolt->damage * g_modBuildableSpeed.integer / 100;
+ }
+
bolt->s.pos.trType = TR_LINEAR;
bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME; // move a bit on the very first frame
VectorCopy( start, bolt->s.pos.trBase );
@@ -805,6 +831,9 @@ gentity_t *fire_bounceBall( gentity_t *self, vec3_t start, vec3_t dir )
VectorCopy( start, bolt->r.currentOrigin );
/*bolt->s.eFlags |= EF_BOUNCE;*/
+ if( g_modAlienRate.integer > 0 )
+ bolt->damage = bolt->damage * g_modAlienRate.integer / 100;
+
return bolt;
}