mob
proc
Fire()
if(!src.weapon||src.fired||src.reloading)return
var/obj/Pickup/guns/G = src.weapon
if(G.Cap<=0)
if(src.LocateAmmo()){src.reloading=1;src.Reload()}
else src << "You need more ammo"
return
src.fired = 1
var/damage = round(rand(G.Fire_Power/2,G.Fire_Power))
spawn(G.FireRate)
if(src)
GunshotAlert()
src.fired=0
G.Cap--
G.suffix="[G.Cap]/[G.MaxCap]"
src.target = locate(/mob)in oview(5)
if(!usr.target) return
var/obj/Bullets/proj = new(src)
GunshotAlert()
for(var/mob/NPC/m in oview(src.weapon.GUN_SOUND_RANGE))
for(var/mob/M in oview(5))
if(M.fired)
walk_to(M,src,10)
Problem description:
when i make it src.fired = 0, it doesn't reset for any reason and i'm not sure why is it not reseting.
And if you determined that it was the fired var because there was no bullet this could also be the problem...
if(!usr.target) return
Using usr in a custom proc usually results in problems.
If what I said doesn't fix it I would recommend adding this to the beginning of the fire proc, running it a few times, and post what it returns...