mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Merge pull request #12218 from phil235/BugFixBoogalooA
Fixes critical bug causing multiple hits from single projectile.
This commit is contained in:
@@ -139,6 +139,7 @@ var/datum/subsystem/ticker/ticker
|
||||
if(!mode.can_start())
|
||||
world << "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players and [mode.required_enemies] eligible antagonists needed. Reverting to pre-game lobby."
|
||||
qdel(mode)
|
||||
mode = null
|
||||
SSjob.ResetOccupations()
|
||||
return 0
|
||||
|
||||
@@ -150,6 +151,7 @@ var/datum/subsystem/ticker/ticker
|
||||
if(!Debug2)
|
||||
if(!can_continue)
|
||||
qdel(mode)
|
||||
mode = null
|
||||
world << "<B>Error setting up [master_mode].</B> Reverting to pre-game lobby."
|
||||
SSjob.ResetOccupations()
|
||||
return 0
|
||||
@@ -290,8 +292,11 @@ var/datum/subsystem/ticker/ticker
|
||||
flick("station_intact",cinematic)
|
||||
world << sound('sound/ambience/signal.ogg')
|
||||
sleep(100)
|
||||
if(cinematic) qdel(cinematic)
|
||||
if(temp_buckle) qdel(temp_buckle)
|
||||
if(cinematic)
|
||||
qdel(cinematic)
|
||||
cinematic = null
|
||||
if(temp_buckle)
|
||||
qdel(temp_buckle)
|
||||
return //Faster exit, since nothing happened
|
||||
else //Station nuked (nuke,explosion,summary)
|
||||
flick("intro_nuke",cinematic)
|
||||
|
||||
@@ -668,6 +668,7 @@ What a mess.*/
|
||||
if(active2)
|
||||
data_core.security -= active2
|
||||
qdel(active2)
|
||||
active2 = null
|
||||
|
||||
if("Delete Record (ALL) Execute")
|
||||
if(active1)
|
||||
@@ -679,10 +680,12 @@ What a mess.*/
|
||||
break
|
||||
data_core.general -= active1
|
||||
qdel(active1)
|
||||
active1 = null
|
||||
|
||||
if(active2)
|
||||
data_core.security -= active2
|
||||
qdel(active2)
|
||||
active2 = null
|
||||
else
|
||||
temp = "This function does not appear to be working at the moment. Our apologies."
|
||||
|
||||
|
||||
@@ -140,27 +140,28 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
radius++
|
||||
if(radius > FAKE_FLOOD_MAX_RADIUS)
|
||||
qdel(src)
|
||||
return
|
||||
Expand()
|
||||
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
|
||||
return
|
||||
|
||||
/obj/effect/hallucination/fake_flood/proc/Expand()
|
||||
if(!flood_turfs) //for qdel
|
||||
return
|
||||
for(var/turf/T in circlerangeturfs(loc,radius))
|
||||
if((T in flood_turfs)|| T.blocks_air)
|
||||
continue
|
||||
flood_images += image(image_icon,T,image_state,MOB_LAYER)
|
||||
flood_turfs += T
|
||||
if(target.client) target.client.images |= flood_images
|
||||
return
|
||||
if(target.client)
|
||||
target.client.images |= flood_images
|
||||
|
||||
/obj/effect/hallucination/fake_flood/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
qdel(flood_turfs)
|
||||
if(target.client) target.client.images.Remove(flood_images)
|
||||
flood_turfs = list()
|
||||
if(target.client)
|
||||
target.client.images.Remove(flood_images)
|
||||
target = null
|
||||
qdel(flood_images)
|
||||
flood_images = list()
|
||||
return ..()
|
||||
|
||||
/obj/effect/hallucination/simple/xeno
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
ready_proj(target, user, quiet, zone_override)
|
||||
if(distro)
|
||||
targloc = spread(targloc, curloc, distro)
|
||||
if(!throw_proj(targloc, user, params))
|
||||
if(!throw_proj(target, targloc, user, params))
|
||||
return 0
|
||||
if(i > 1)
|
||||
newshot()
|
||||
@@ -15,7 +15,7 @@
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/ammo_casing/proc/ready_proj(atom/target as mob|obj|turf, mob/living/user, quiet, zone_override = "")
|
||||
/obj/item/ammo_casing/proc/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
if (!BB)
|
||||
return
|
||||
BB.original = target
|
||||
@@ -30,14 +30,15 @@
|
||||
reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets
|
||||
qdel(reagents)
|
||||
|
||||
/obj/item/ammo_casing/proc/throw_proj(var/turf/targloc, mob/living/user as mob|obj, params)
|
||||
/obj/item/ammo_casing/proc/throw_proj(atom/target, turf/targloc, mob/living/user, params)
|
||||
var/turf/curloc = user.loc
|
||||
if (!istype(targloc) || !istype(curloc) || !BB)
|
||||
return 0
|
||||
if(targloc == curloc)
|
||||
if(BB.original == user) //if we target ourselves we go straight to bullet_act()
|
||||
user.bullet_act(BB, BB.def_zone)
|
||||
if(target) //if the target is right on our location we go straight to bullet_act()
|
||||
target.bullet_act(BB, BB.def_zone)
|
||||
qdel(BB)
|
||||
BB = null
|
||||
return 1
|
||||
BB.loc = get_turf(user)
|
||||
BB.starting = get_turf(user)
|
||||
@@ -51,7 +52,6 @@
|
||||
BB.p_x = text2num(mouse_control["icon-x"])
|
||||
if(mouse_control["icon-y"])
|
||||
BB.p_y = text2num(mouse_control["icon-y"])
|
||||
|
||||
if(BB)
|
||||
BB.fire()
|
||||
BB = null
|
||||
|
||||
@@ -122,14 +122,14 @@
|
||||
|
||||
/obj/item/weapon/gun/afterattack(atom/target as mob|obj|turf, mob/living/carbon/human/user as mob|obj, flag, params)//TODO: go over this
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
if(istype(target, /mob/) && !(target in user.contents) && target != user && user.a_intent == "harm")
|
||||
//We make sure that it is a mob, it's not us or part of us.
|
||||
return //Flogging action
|
||||
else if(ishuman(target) && ishuman(user))
|
||||
if(user.zone_sel.selecting == "mouth")
|
||||
handle_suicide(user, target, params)
|
||||
return
|
||||
else
|
||||
if(target in user.contents) //can't shoot stuff inside us.
|
||||
return
|
||||
if(!ismob(target) || user.a_intent == "harm") //melee attack
|
||||
return
|
||||
if(user.zone_sel.selecting == "mouth")
|
||||
handle_suicide(user, target, params)
|
||||
return
|
||||
if(target == user) //so we can't shoot ourselves (unless mouth selected)
|
||||
return
|
||||
|
||||
//Exclude lasertag guns from the CLUMSY check.
|
||||
@@ -391,10 +391,11 @@
|
||||
semicd = 1
|
||||
|
||||
if(!do_mob(user, target, 120) || user.zone_sel.selecting != "mouth")
|
||||
if(user == target && user)
|
||||
user.visible_message("<span class='notice'>[user] decided life was worth living.</span>")
|
||||
else if(user && target && target.Adjacent(user))
|
||||
target.visible_message("<span class='notice'>[user] has decided to spare [target]'s life.</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
|
||||
if(user)
|
||||
if(user == target)
|
||||
user.visible_message("<span class='notice'>[user] decided life was worth living.</span>")
|
||||
else if(target && target.Adjacent(user))
|
||||
target.visible_message("<span class='notice'>[user] has decided to spare [target]'s life.</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
|
||||
semicd = 0
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
author: phil235
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- bugfix: "Fixes critical bug causing multiple hits from single projectile."
|
||||
- bugfix: "Fixes not being able to shoot a mob on same tile as the shooter."
|
||||
- bugfix: "Clicking your mob (without targeting your mouth) no longer causes you to shoot yourself."
|
||||
- bugfix: "Fixes not being able to shoot non human mobs at point blank."
|
||||
Reference in New Issue
Block a user