From 345627fd81c1ad7ea1ef84f54701c7d30770b010 Mon Sep 17 00:00:00 2001 From: Till Schreiber Date: Thu, 26 Dec 2024 10:38:08 +0100 Subject: [PATCH] ALTV-610 add source entity to damage event --- server/src/events/Main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/events/Main.cpp b/server/src/events/Main.cpp index d7d54d86..245669fe 100644 --- a/server/src/events/Main.cpp +++ b/server/src/events/Main.cpp @@ -59,6 +59,7 @@ V8Helpers::LocalEventHandler weaponDamage(EventType::WEAPON_DAMAGE_EVENT, args.push_back(V8Helpers::JSValue(ev->GetDamageValue())); args.push_back(resource->CreateVector3(ev->GetShotOffset())); args.push_back(V8Helpers::JSValue(static_cast(ev->GetBodyPart()))); + args.push_back(resource->GetBaseObjectOrNull(ev->GetSourceEntity())); }); V8Helpers::LocalEventHandler explosionEvent(EventType::EXPLOSION_EVENT,