Skip to content

Commit

Permalink
prevents harming dead when MODE_NO_ATTACK_DEAD (#7734)
Browse files Browse the repository at this point in the history
# About the pull request

MODE_NO_ATTACK_DEAD makes you think you can not harm dead, but it only
prevented shooting them, did not prevent harm from flames and
explosions. this solves the issue

# Explain why it's good for the game

there is good reason why xenos can not harm dead humans, same goes for
your enemeis in HvH, putting 600 burn on dead is NOT intended. makes the
gamemode more fair and in that way fun.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: MODE_NO_ATTACK_DEAD now prevents harm from explosions and flames
correctly
/:cl:

---------

Co-authored-by: vincibrv <[email protected]>
Co-authored-by: harryob <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent a580f95 commit 2344bc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@
no_limb_loss, damage_source = create_cause_data("amputation"),\
mob/attack_source = null,\
brute_reduced_by = -1, burn_reduced_by = -1)
if((brute > 0 || burn > 0) && owner && MODE_HAS_MODIFIER(/datum/gamemode_modifier/disable_attacking_corpses) && owner.stat == DEAD) //if they take positive damage (not healing) we prevent it
return 0
if((brute <= 0) && (burn <= 0))
return 0

Expand Down

0 comments on commit 2344bc8

Please sign in to comment.