From fd19ccb037e349286e3b72a1277c58079056fcc2 Mon Sep 17 00:00:00 2001 From: mtiusanen Date: Tue, 21 Oct 2014 19:44:29 +0300 Subject: 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. --- src/game/bg_pmove.c | 15 +++++---------- src/game/g_missile.c | 53 ++++++++++++++++++++++++++-------------------------- src/game/tremulous.h | 8 ++++---- 3 files changed, 36 insertions(+), 40 deletions(-) (limited to 'src/game') diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index c78129b..9728ff0 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -1400,10 +1400,8 @@ Only with the flight powerup static void PM_FlyMove( void ) { int i; - vec3_t wishvel; - float wishspeed; - vec3_t wishdir; - float scale; + vec3_t wishvel,wishdir; + float wishspeed,scale; // normal slowdown PM_Friction( ); @@ -1414,15 +1412,12 @@ static void PM_FlyMove( void ) // if( !scale ) { - wishvel[ 0 ] = 0; - wishvel[ 1 ] = 0; - wishvel[ 2 ] = 0; + VectorSet(wishvel,0.f,0.f,0.f); } else { - for( i = 0; i < 3; i++ ) - wishvel[ i ] = scale * pml.forward[ i ] * pm->cmd.forwardmove + scale * pml.right[ i ] * pm->cmd.rightmove; - + VectorScale(pml.forward,scale*pm->cmd.forwardmove,wishvel); + VectorMA(wishvel,scale*pm->cmd.rightmove,pml.right,wishvel); wishvel[ 2 ] += scale * pm->cmd.upmove; } 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; iclient && - 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; iclient && + 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; + } + } + } +} /* ================= diff --git a/src/game/tremulous.h b/src/game/tremulous.h index f76f968..44450f2 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -479,15 +479,15 @@ TREMULOUS EDGE MOD SRC FILE #define MDRIVER_REPEAT2 2200 #define CHAINGUN_PRICE 400 -#define CHAINGUN_BULLETS 350 +#define CHAINGUN_BULLETS 300 #define CHAINGUN_REPEAT 80 #define CHAINGUN_K_SCALE 1.0f -#define CHAINGUN_SPREAD 900 +#define CHAINGUN_SPREAD 1100 #define CHAINGUN_DMG HDM(6) #define CHAINGUN_REPEAT2 120 -#define CHAINGUN_SPREAD2 450 -#define CHAINGUN_DMG2 HDM(8) +#define CHAINGUN_SPREAD2 550 +#define CHAINGUN_DMG2 HDM(6) #define FLAMER_PRICE 550 #define FLAMER_GAS 200 -- cgit