diff options
author | Tim Angus <tim@ngus.net> | 2003-02-27 04:50:35 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2003-02-27 04:50:35 +0000 |
commit | 938b6ef12b8eecac08497fc6183233e0a9bc8f11 (patch) | |
tree | 3e074b335dd09c2df5f7d64fdc6c99572bcd0d1a /src/game/g_combat.c | |
parent | 63b76c006f1ae19cc68dece317ccbdd6def2549e (diff) |
* Locational damage and armour actually work now
* Ownerdrawn helmet, which was strangely not committed first time round
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r-- | src/game/g_combat.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c index a7cf150b..8f472550 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -644,18 +644,18 @@ float G_CalcDamageModifier( vec3_t point, gentity_t *targ, gentity_t *attacker, if( g_damageRegions[ class ][ i ].minAngle > g_damageRegions[ class ][ i ].maxAngle ) { - rotationBound = ( hitRotation > g_damageRegions[ class ][ i ].minAngle && - hitRotation < 360 ) || ( hitRotation >= 0 && + rotationBound = ( hitRotation >= g_damageRegions[ class ][ i ].minAngle && + hitRotation <= 360 ) || ( hitRotation >= 0 && hitRotation <= g_damageRegions[ class ][ i ].maxAngle ); } else { - rotationBound = ( hitRotation > g_damageRegions[ class ][ i ].minAngle && + rotationBound = ( hitRotation >= g_damageRegions[ class ][ i ].minAngle && hitRotation <= g_damageRegions[ class ][ i ].maxAngle ); } if( rotationBound && - hitRatio > g_damageRegions[ class ][ i ].minHeight && + hitRatio >= g_damageRegions[ class ][ i ].minHeight && hitRatio <= g_damageRegions[ class ][ i ].maxHeight && ( g_damageRegions[ class ][ i ].crouch == ( targ->client->ps.pm_flags & PMF_DUCKED ) ) ) @@ -670,21 +670,21 @@ float G_CalcDamageModifier( vec3_t point, gentity_t *targ, gentity_t *attacker, { qboolean rotationBound; - if( g_damageRegions[ class ][ i ].minAngle > - g_damageRegions[ class ][ i ].maxAngle ) + if( g_armourRegions[ i ][ j ].minAngle > + g_armourRegions[ i ][ j ].maxAngle ) { - rotationBound = ( hitRotation > g_damageRegions[ class ][ i ].minAngle && - hitRotation < 360 ) || ( hitRotation >= 0 && - hitRotation <= g_damageRegions[ class ][ i ].maxAngle ); + rotationBound = ( hitRotation >= g_armourRegions[ i ][ j ].minAngle && + hitRotation <= 360 ) || ( hitRotation >= 0 && + hitRotation <= g_armourRegions[ i ][ j ].maxAngle ); } else { - rotationBound = ( hitRotation > g_damageRegions[ class ][ i ].minAngle && - hitRotation <= g_damageRegions[ class ][ i ].maxAngle ); + rotationBound = ( hitRotation >= g_armourRegions[ i ][ j ].minAngle && + hitRotation <= g_armourRegions[ i ][ j ].maxAngle ); } if( rotationBound && - hitRatio > g_armourRegions[ i ][ j ].minHeight && + hitRatio >= g_armourRegions[ i ][ j ].minHeight && hitRatio <= g_armourRegions[ i ][ j ].maxHeight && ( g_armourRegions[ i ][ j ].crouch == ( targ->client->ps.pm_flags & PMF_DUCKED ) ) ) @@ -693,6 +693,7 @@ float G_CalcDamageModifier( vec3_t point, gentity_t *targ, gentity_t *attacker, } } + G_Printf( "%f\n", modifier ); return modifier; } |