From 237bf1ea73bd4c2c75faca7c5598049a2be3dc40 Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 19 Oct 2016 12:16:16 +0300 Subject: [PATCH] Make players not damage barneys and scientists, just damage yourself --- dlls/barney.cpp | 5 ++++- dlls/combat.cpp | 2 +- dlls/scientist.cpp | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/barney.cpp b/dlls/barney.cpp index b1c97090..e9cb309d 100644 --- a/dlls/barney.cpp +++ b/dlls/barney.cpp @@ -512,7 +512,10 @@ int CBarney::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float // Alright, now I'm pissed! PlaySentence( "BA_MAD", 4, VOL_NORM, ATTN_NORM ); - Remember( bits_MEMORY_PROVOKED ); + if( pevAttacker->health <= 10 ) + Forget( bits_MEMORY_PROVOKED ); + else + Remember( bits_MEMORY_PROVOKED ); StopFollowing( TRUE ); } else diff --git a/dlls/combat.cpp b/dlls/combat.cpp index b98229f7..83e8188a 100644 --- a/dlls/combat.cpp +++ b/dlls/combat.cpp @@ -890,7 +890,7 @@ int CBaseMonster::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, f int classs = Classify(); if( classs == CLASS_HUMAN_PASSIVE || classs == CLASS_PLAYER_ALLY ) { - + activator->TakeDamage( pevInflictor, pevAttacker, flDamage*1.5, bitsDamageType ); return 0; } } diff --git a/dlls/scientist.cpp b/dlls/scientist.cpp index 4e60c58e..dc37a2b3 100644 --- a/dlls/scientist.cpp +++ b/dlls/scientist.cpp @@ -745,7 +745,11 @@ int CScientist::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo { if( pevInflictor && pevInflictor->flags & FL_CLIENT ) { - Remember( bits_MEMORY_PROVOKED ); + if( pevAttacker->health <= 10 ) + Forget( bits_MEMORY_PROVOKED ); + else + Remember( bits_MEMORY_PROVOKED ); + StopFollowing( TRUE ); }