Skip to content

Commit

Permalink
Fixed gun executions (#3253)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Fixes executions. Also fired off a few other rounds to make sure nothing
else was wonky.

No Kepori were actually harmed in the making of this film. 

![dreamseeker_W5IavcWlZT](https://github.com/user-attachments/assets/81aa66eb-41d1-46ba-8633-d9d822d111fb)

There was a circular logic issue that arose with the gun.dm refactor
from a couple months ago and that's what was causing the issue.

Fixes #3252

## Why It's Good For The Game

Intended feature is working again

## Changelog

:cl:
fix: Executing someone with a gun is back, you psychos. Paint the floor
red!
/:cl:
  • Loading branch information
Anticept authored Aug 2, 2024
1 parent a866388 commit fd7868e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@
if(chambered && chambered.BB && can_trigger_gun(user))
chambered.BB.damage *= 3
//Check is here for safeties and such, brain will be removed after
if(!pre_fire(target, user, TRUE, params, BODY_ZONE_HEAD))
if(!pre_fire(target, user, TRUE, FALSE, params, BODY_ZONE_HEAD)) // We're already in handle_suicide, hence the 4th parameter needs to be FALSE to avoid circular logic. Also, BODY_ZONE_HEAD because we want to damage the head as a whole.
return

var/obj/item/organ/brain/brain_to_blast = target.getorganslot(ORGAN_SLOT_BRAIN)
Expand Down

0 comments on commit fd7868e

Please sign in to comment.