aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/mp
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_codecallbacks.gnut14
1 files changed, 14 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_codecallbacks.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_codecallbacks.gnut
index 425a8b8b..ff281d6e 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_codecallbacks.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_codecallbacks.gnut
@@ -283,12 +283,26 @@ void function CodeCallback_DamagePlayerOrNPC( entity ent, var damageInfo )
return
RunClassDamageFinalCallbacks( ent, damageInfo )
+
#if VERBOSE_DAMAGE_PRINTOUTS
printt( " after class damage final callbacks:", DamageInfo_GetDamage( damageInfo ) )
#endif
if ( DamageInfo_GetDamage( damageInfo ) == 0 )
return
+ // Added via AddEntityCallback_OnFinalDamaged
+ foreach ( callbackFunc in ent.e.entFinalDamageCallbacks )
+ {
+ callbackFunc( ent, damageInfo )
+ }
+
+ #if VERBOSE_DAMAGE_PRINTOUTS
+ printt( " afterAddEntityCallback_OnFinalDamaged callbacks:", DamageInfo_GetDamage( damageInfo ) )
+ #endif
+
+ if ( DamageInfo_GetDamage( damageInfo ) == 0 )
+ return
+
if ( DamageInfo_GetCustomDamageType( damageInfo ) & DF_DOOMED_HEALTH_LOSS )
DamageInfo_AddDamageFlags( damageInfo, DAMAGEFLAG_NOPAIN )