Skip to content

Commit

Permalink
Use cfc_pvp hook to force-allow hotshot fire damage (#41)
Browse files Browse the repository at this point in the history
* Use cfc_pvp hook to force-allow hotshot fire damage

* Match cfc_pvp hook change
  • Loading branch information
legokidlogan authored Dec 9, 2024
1 parent 00f1aad commit b8b1b2b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions moon/powerups/server/hotshot.moon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8b1b2b

Please sign in to comment.