summaryrefslogtreecommitdiff
path: root/src/game/g_missile.c
diff options
context:
space:
mode:
authormtiusanen <ams@daug.net>2014-10-21 19:44:29 +0300
committermtiusanen <ams@daug.net>2014-10-21 19:44:29 +0300
commitfd19ccb037e349286e3b72a1277c58079056fcc2 (patch)
tree0567b9261a53c205c5e3c02638ae2ba5eb3d7294 /src/game/g_missile.c
parentdacb45bb2b1ca96a9fbd51b8380f5b10f1ce2123 (diff)
Updated hummel movement to use vector arithmetic functions.
Increased chaingun spread and reduced the damage of it's 2ndary fire. Mines explode on all aliens again.
Diffstat (limited to 'src/game/g_missile.c')
-rw-r--r--src/game/g_missile.c53
1 files changed, 27 insertions, 26 deletions
diff --git a/src/game/g_missile.c b/src/game/g_missile.c
index a69b4fc..74b351c 100644
--- a/src/game/g_missile.c
+++ b/src/game/g_missile.c
@@ -503,36 +503,37 @@ If an enemy is close to the entity, go boom!
================
*/
void G_ProcessMine(gentity_t *ent) {
- int i, total_entities, entityList[MAX_GENTITIES];
- vec3_t range, mins, maxs;
- gentity_t *target;
+ int i, total_entities, entityList[MAX_GENTITIES];
+ vec3_t range, mins, maxs;
+ gentity_t *target;
- // Set the next time to run this check (can be overwritten below)
- ent->nextthink = level.time + MINE_CHECK_FREQUENCY;
+ // Set the next time to run this check (can be overwritten below)
+ ent->nextthink = level.time + MINE_CHECK_FREQUENCY;
- // Grab all entities around us
- VectorSet(range, MINE_DETECT, MINE_DETECT, MINE_DETECT);
- VectorAdd(ent->s.origin, range, maxs);
- VectorSubtract(ent->s.origin, range, mins);
+ // Grab all entities around us
+ VectorSet(range, MINE_DETECT, MINE_DETECT, MINE_DETECT);
+ VectorAdd(ent->s.origin, range, maxs);
+ VectorSubtract(ent->s.origin, range, mins);
- total_entities = trap_EntitiesInBox(mins, maxs, entityList, MAX_GENTITIES);
+ total_entities = trap_EntitiesInBox(mins, maxs, entityList, MAX_GENTITIES);
- // Loop entities looking for an enemy body
- for(i=0; i<total_entities; i++) {
- target = &g_entities[entityList[i]];
- if(target->client &&
- target->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS &&
- target->client->ps.weapon > WP_ALEVEL1_UPG ) {
- if (G_Visible( ent, target, MASK_SHOT ))
- {
- // Found an enemy, boom time!
- ent->nextthink = level.time + MINE_BOOM_TIME;
- ent->think = G_ExplodeMissile;
- return;
- }
- }
- }
-}
+ // Loop entities looking for an enemy body
+ for(i=0; i<total_entities; i++) {
+ target = &g_entities[entityList[i]];
+ if(target->client &&
+ target->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS/* &&
+ target->client->ps.weapon > WP_ALEVEL1_UPG */)
+ {
+ if (G_Visible( ent, target, MASK_SHOT ))
+ {
+ // Found an enemy, boom time!
+ ent->nextthink = level.time + MINE_BOOM_TIME;
+ ent->think = G_ExplodeMissile;
+ return;
+ }
+ }
+ }
+}
/*
=================