Added support for 'god' command.

This commit is contained in:
Marco Cawthorne 2019-03-31 15:53:07 +02:00
parent d4a28c6934
commit 943587e685
11 changed files with 8 additions and 0 deletions

View file

@ -91,6 +91,10 @@ Generic function that applies damage, pain and suffering
*/
void Damage_Apply(entity eTarget, entity eAttacker, float iDamage, vector vHitPos, int iSkipArmor)
{
if (eTarget.flags & FL_GODMODE) {
return;
}
/* Modify the damage based on the location */
switch (trace_surface_id) {
case BODY_HEAD:

View file

@ -35,6 +35,10 @@ Generic function that applies damage, pain and suffering
*/
void Damage_Apply(entity eTarget, entity eAttacker, float fDamage, vector vHitPos, int a)
{
if (eTarget.flags & FL_GODMODE) {
return;
}
// Apply the damage finally
if (eTarget.armor && fDamage > 0) {
float flArmor;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.