Skip to content

Commit

Permalink
[s] fix plasmapistol exploit (ParadiseSS13#27477)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwertytoforty authored Nov 28, 2024
1 parent 422a48f commit 27fcd61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/modules/projectiles/guns/energy/special_eguns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,17 @@
to_chat(user, "<span class='notice'>You begin to overload [src].</span>")
charging = TRUE
charge_failure = FALSE
holder = user
RegisterSignal(holder, COMSIG_CARBON_SWAP_HANDS, PROC_REF(fail_charge))
addtimer(CALLBACK(src, PROC_REF(overload)), 2.5 SECONDS)

/obj/item/gun/energy/plasma_pistol/proc/fail_charge()
SIGNAL_HANDLER // COMSIG_CARBON_SWAP_HANDS
charge_failure = TRUE // No charging 2 guns at once.
UnregisterSignal(holder, COMSIG_CARBON_SWAP_HANDS)

/obj/item/gun/energy/plasma_pistol/proc/overload()
UnregisterSignal(holder, COMSIG_CARBON_SWAP_HANDS)
if(ishuman(loc) && !charge_failure)
var/mob/living/carbon/C = loc
select_fire(C)
Expand Down

0 comments on commit 27fcd61

Please sign in to comment.