diff options
author | Mikko Tiusanen <ams@daug.net> | 2014-06-12 14:23:03 +0300 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2014-06-12 14:23:03 +0300 |
commit | 30c7eca2541d5642dd4a97e8e481686f38a43ea8 (patch) | |
tree | 1cf4e642eb7c3f68f7617a256cbe8b234db52f3d /src/game/g_buildable.c | |
parent | 9c083e0fb3212c62d276210b81bbb85436687319 (diff) |
Force fields are now cheaper and faster to build but less efficient vs rants.
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index e748a64..bcd5eb1 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1640,6 +1640,7 @@ void G_Push( gentity_t *self ) #define PUSH_REPEAT 400 #define PUSH_RANGE 140 #define PUSH_FORCE -900 +#define WEAK_PUSH_FORCE -675 int entityList[ MAX_GENTITIES ]; vec3_t range = { PUSH_RANGE, PUSH_RANGE, PUSH_RANGE }; @@ -1648,7 +1649,7 @@ void G_Push( gentity_t *self ) // int a; gentity_t *enemy; vec3_t start,dir,end; - + float force; self->nextthink = level.time + PUSH_REPEAT; @@ -1702,11 +1703,16 @@ void G_Push( gentity_t *self ) if (!enemy->takedamage) continue; + if ( enemy->client->ps.stats[ STAT_CLASS ] == PCL_ALIEN_LEVEL5 ) + force = PUSH_FORCE; + else + force = WEAK_PUSH_FORCE; + VectorCopy(enemy->r.currentOrigin, start); VectorCopy(self->r.currentOrigin, end); VectorSubtract(end, start, dir); VectorNormalize(dir); - VectorScale(dir,PUSH_FORCE, enemy->client->ps.velocity); + VectorScale(dir, force, enemy->client->ps.velocity); VectorCopy(dir, enemy->movedir); } |