40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
/*
|
|
* Copyright (c) 2016-2022 Vera Visions LLC.
|
|
*
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
* copyright notice and this permission notice appear in all copies.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
|
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
/* generic function that applies damage, pain and suffering */
|
|
void
|
|
Damage_Apply(entity t, entity c, float dmg, int w, damageType_t type)
|
|
{
|
|
CGameRules rules = (CGameRules)g_grMode;
|
|
rules.DamageApply(t, c, dmg, w, type);
|
|
}
|
|
|
|
/* physical check of whether or not we can trace important parts of an ent */
|
|
float
|
|
Damage_CheckTrace(entity t, vector vecHitPos)
|
|
{
|
|
CGameRules rules = (CGameRules)g_grMode;
|
|
return rules.DamageCheckTrace(t, vecHitPos);
|
|
}
|
|
|
|
/* even more pain and suffering, mostly used for explosives */
|
|
void
|
|
Damage_Radius(vector org, entity attacker, float dmg, float r, int check, int w)
|
|
{
|
|
CGameRules rules = (CGameRules)g_grMode;
|
|
rules.DamageRadius(org, attacker, dmg, r, check, w);
|
|
}
|