diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_pmove.c | 12 | ||||
-rw-r--r-- | src/game/bg_public.h | 2 | ||||
-rw-r--r-- | src/game/g_combat.c | 11 | ||||
-rw-r--r-- | src/game/tremulous.h | 1 |
4 files changed, 20 insertions, 6 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 53593573..8bac27f5 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -348,11 +348,10 @@ static float PM_CmdScale( usercmd_t *cmd ) if( pm->ps->stats[ STAT_PTEAM ] == PTE_HUMANS && pm->ps->pm_type == PM_NORMAL ) { - if( !( pm->ps->stats[ STAT_STATE ] & SS_SPEEDBOOST ) ) - { - //if not sprinting + if( pm->ps->stats[ STAT_STATE ] & SS_SPEEDBOOST ) + modifier *= HUMAN_SPRINT_MODIFIER; + else modifier *= HUMAN_JOG_MODIFIER; - } if( cmd->forwardmove < 0 ) { @@ -1771,7 +1770,7 @@ static void PM_GroundClimbTrace( void ) rTtANGrTsTt -= 32768; //set the correction angle - if( traceCROSSsurf[ 2 ] < 0 ) + if( traceCROSSsurf[ 2 ] <= 0.0f ) rTtANGrTsTt = -rTtANGrTsTt; //phew! - correct the angle @@ -2343,6 +2342,9 @@ static void PM_Footsteps( void ) } bobmove *= BG_FindBobCycleForClass( pm->ps->stats[ STAT_PCLASS ] ); + + if( pm->ps->stats[ STAT_STATE ] & SS_SPEEDBOOST ) + bobmove *= HUMAN_SPRINT_MODIFIER; // check for footstep / splash sounds old = pm->ps->bobCycle; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 550c7f2f..876a2f7e 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -541,6 +541,8 @@ typedef enum EV_HUMAN_BUILDABLE_EXPLOSION, EV_ALIEN_BUILDABLE_EXPLOSION, EV_ALIEN_ACIDTUBE, + EV_HUMAN_BUILDABLE_DAMAGE, + EV_ALIEN_BUILDABLE_DAMAGE, EV_ALIEN_EVOLVE, diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 3d57b5b0..f820b2b0 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -990,8 +990,17 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, if( take ) { targ->health = targ->health - take; + + if( targ->s.eType == ET_BUILDABLE ) + { + if( targ->biteam == BIT_ALIENS ) + G_AddEvent( targ, EV_ALIEN_BUILDABLE_DAMAGE, 0 ); + else if( targ->biteam == BIT_HUMANS ) + G_AddEvent( targ, EV_HUMAN_BUILDABLE_DAMAGE, 0 ); + } + if( targ->client ) - targ->client->ps.stats[STAT_HEALTH] = targ->health; + targ->client->ps.stats[ STAT_HEALTH ] = targ->health; //TA: add to the attackers "account" on the target if( targ->client && attacker->client && diff --git a/src/game/tremulous.h b/src/game/tremulous.h index b030e6d5..692da42b 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -475,6 +475,7 @@ * HUMAN misc */ +#define HUMAN_SPRINT_MODIFIER 1.2f #define HUMAN_JOG_MODIFIER 0.9f #define HUMAN_BACK_MODIFIER 0.7f #define HUMAN_SIDE_MODIFIER 0.8f |