Use damage defines from SDK Hooks directly.
Removes redundant defines. DMG_CSS_HEADSHOT was never used.
This commit is contained in:
parent
6550dd9e02
commit
daa461fee6
@ -25,18 +25,6 @@
|
|||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @section Counter Strike: Source specific damage flags.
|
|
||||||
*/
|
|
||||||
#define DMG_CSS_FALL (DMG_FALL) // Client was damaged by falling.
|
|
||||||
#define DMG_CSS_BLAST (DMG_BLAST) // Client was damaged by explosion.
|
|
||||||
#define DMG_CSS_BURN (DMG_DIRECT) // Client was damaged by fire.
|
|
||||||
#define DMG_CSS_BULLET (DMG_NEVERGIB) // Client was shot or knifed.
|
|
||||||
#define DMG_CSS_HEADSHOT (1 << 30) // Client was shot in the head.
|
|
||||||
/**
|
|
||||||
* @endsection
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @section Suicide intercept defines.
|
* @section Suicide intercept defines.
|
||||||
*/
|
*/
|
||||||
@ -252,7 +240,7 @@ public Action:DamageOnTakeDamage(client, &attacker, &inflictor, &Float:damage, &
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Client was shot or knifed.
|
// Client was shot or knifed.
|
||||||
if (damagetype & DMG_CSS_BULLET)
|
if (damagetype & DMG_BULLET || damagetype & DMG_NEVERGIB)
|
||||||
{
|
{
|
||||||
// If attacker isn't valid, then allow damage.
|
// If attacker isn't valid, then allow damage.
|
||||||
if (!ZRIsClientValid(attacker))
|
if (!ZRIsClientValid(attacker))
|
||||||
@ -317,7 +305,7 @@ public Action:DamageOnTakeDamage(client, &attacker, &inflictor, &Float:damage, &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Client was damaged by explosion.
|
// Client was damaged by explosion.
|
||||||
else if (damagetype & DMG_CSS_BLAST)
|
else if (damagetype & DMG_BLAST)
|
||||||
{
|
{
|
||||||
// If blast damage is blocked, then stop.
|
// If blast damage is blocked, then stop.
|
||||||
new bool:damageblockblast = GetConVarBool(g_hCvarsList[CVAR_DAMAGE_BLOCK_BLAST]);
|
new bool:damageblockblast = GetConVarBool(g_hCvarsList[CVAR_DAMAGE_BLOCK_BLAST]);
|
||||||
@ -342,7 +330,7 @@ public Action:DamageOnTakeDamage(client, &attacker, &inflictor, &Float:damage, &
|
|||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
// Client was damaged by falling.
|
// Client was damaged by falling.
|
||||||
else if (damagetype & DMG_CSS_FALL)
|
else if (damagetype & DMG_FALL)
|
||||||
{
|
{
|
||||||
// If class has "nofalldamage" disabled, then allow damage.
|
// If class has "nofalldamage" disabled, then allow damage.
|
||||||
new bool:blockfalldamage = ClassGetNoFallDamage(client);
|
new bool:blockfalldamage = ClassGetNoFallDamage(client);
|
||||||
|
@ -72,7 +72,8 @@ NapalmOnOffsetsFound()
|
|||||||
NapalmOnTakeDamage(client, damagetype)
|
NapalmOnTakeDamage(client, damagetype)
|
||||||
{
|
{
|
||||||
// Client was damaged by fire.
|
// Client was damaged by fire.
|
||||||
if (damagetype & DMG_CSS_BURN)
|
// TODO: Is damage type different in CS:S and CS:GO (it was checking only DMG_DIRECT for some reason). Checking both.
|
||||||
|
if (damagetype & DMG_BURN || damagetype & DMG_DIRECT)
|
||||||
{
|
{
|
||||||
// Only take action if it isn't disabled, or the option is valid.
|
// Only take action if it isn't disabled, or the option is valid.
|
||||||
new douse = GetConVarInt(g_hCvarsList[CVAR_NAPALM_DOUSE]);
|
new douse = GetConVarInt(g_hCvarsList[CVAR_NAPALM_DOUSE]);
|
||||||
|
Loading…
Reference in New Issue
Block a user