summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-02-27 04:50:35 +0000
committerTim Angus <tim@ngus.net>2003-02-27 04:50:35 +0000
commit938b6ef12b8eecac08497fc6183233e0a9bc8f11 (patch)
tree3e074b335dd09c2df5f7d64fdc6c99572bcd0d1a /src
parent63b76c006f1ae19cc68dece317ccbdd6def2549e (diff)
* Locational damage and armour actually work now
* Ownerdrawn helmet, which was strangely not committed first time round
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_draw.c3
-rw-r--r--src/game/bg_misc.c2
-rw-r--r--src/game/g_combat.c25
3 files changed, 17 insertions, 13 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 229f2994..63cc6ccf 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2098,6 +2098,9 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x,
case CG_PLAYER_ALIEN_SENSE:
CG_DrawAlienSense( &rect );
break;
+ case CG_PLAYER_HUMAN_SCANNER:
+ CG_DrawHumanScanner( &rect, shader );
+ break;
case CG_PLAYER_USABLE_BUILDABLE:
CG_DrawUsableBuildable( &rect, shader, color );
break;
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 63c4cad7..549e5a81 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -2222,7 +2222,7 @@ weaponAttributes_t bg_weapons[ ] =
SLOT_WEAPON, //int slots;
"prifle", //char *weaponName;
"Pulse Rifle", //char *weaponHumanName;
- { "models/weapons2/plasma/plasma.md3", 0, 0, 0 },
+ { "models/weapons2/prifle/prifle.md3", 0, 0, 0 },
"icons/iconw_pulse",
"gfx/2d/crosshaira", 24,
PRIFLE_CLIPS, //int quan;
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;
}