From b8b1b2b7c32ca387057449e0fd31c76e6f59c9b2 Mon Sep 17 00:00:00 2001 From: legokidlogan <26103433+legokidlogan@users.noreply.github.com> Date: Sun, 8 Dec 2024 20:36:49 -0700 Subject: [PATCH] Use cfc_pvp hook to force-allow hotshot fire damage (#41) * Use cfc_pvp hook to force-allow hotshot fire damage * Match cfc_pvp hook change --- moon/powerups/server/hotshot.moon | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/moon/powerups/server/hotshot.moon b/moon/powerups/server/hotshot.moon index bd8917e..372bf90 100644 --- a/moon/powerups/server/hotshot.moon +++ b/moon/powerups/server/hotshot.moon @@ -78,6 +78,17 @@ fireDamageWatcher = (ent, damageInfo) -> hook.Add "EntityTakeDamage", "CFC_Powerups_Hotshot_OnFireDamage", fireDamageWatcher, HOOK_HIGH -- HOOK_HIGH to change the inflictor before fire damage blockers see the hook +fireDamagePVPWatcher = (ent, damageInfo) -> + return unless IsValid ent + + powerup = ent.latestHotshotPowerup + return unless powerup + return if powerup.expired + + return false + +hook.Add "CFC_PvP_ShouldBlockFireDamage", "CFC_Powerups_Hotshot_OnFireDamage", fireDamagePVPWatcher + -- Prevents hotshot users from receiving damage from hotshot death explosions explosionImmunityWatcher = (ent, damageInfo) -> return unless IsValid ent