proc/Shoot()
start
if(src.x==1||src.x==100||src.y==1||src.y==100)
del src
if(icon_state=="a"||icon_state=="b"||icon_state=="d"||icon_state=="c")
goto next2
icon_state=direction
next2
if(icon_state=="a")
spawn(7)
Move(get_step(src,1))
if(icon_state=="b")
spawn(2)
goto start
if(icon_state=="b2")
spawn(2)
goto start
if(canmove==0)
return
if(src.direction=="right")
src.Move(get_step(src,4))
if(icon=='XeronS.dmi'||icon=='ored.dmi'||icon=='ored2.dmi'||icon=='oshot.dmi'||icon=='oshot2.dmi'||icon=='Atomic Xeron Blasts.dmi')
src.Move(get_step(src,4))
goto next
if(src.direction=="downright")
src.Move(get_step(src,SOUTHEAST))
goto next
if(src.direction=="downleft")
src.Move(get_step(src,SOUTHWEST))
goto next
if(src.direction=="upleft")
src.Move(get_step(src,NORTHWEST))
goto next
if(src.direction=="upright")
src.Move(get_step(src,NORTHEAST))
goto next
if(src.direction=="up")
src.Move(get_step(src,1))
src.Move(get_step(src,1))
goto next
if(src.direction=="down")
src.Move(get_step(src,2))
if(src.direction=="left")
src.Move(get_step(src,8))
if(icon=='XeronS.dmi'||icon=='ored.dmi'||icon=='ored2.dmi'||icon=='oshot.dmi'||icon=='oshot2.dmi'||icon=='Atomic Xeron Blasts.dmi')
src.Move(get_step(src,8))
next
sleep(1)
goto start
atom/movable
proc/fall()
status="d"
var/num=0
while(usr.status=="d")
num+=1
var/turf/t=get_step(src,2)
Move(get_step(src,2))
if(loc!=t&&status=="d")
usr.status="g"
dashing=0
return
else
if(usr.status=="d")
sleep(2)</b>
atom/movable/Bump(O)
if(get_dir(O,src)==1&&ismob(src))
O:Bumpedabove(src)
else if(get_dir(O,src)==2&&ismob(src))
O:Bumpedbelow(src)
else
O:Bumped(src)
atom/proc/Bumpedabove(O)
atom/proc/Bumpedbelow(O)
atom/proc/Bumped(O)
Okay, I use Daemon to host and when after awhile or when about 8 or more players start connecting the CPU usage sky rockets up to 40% and rising,
it causes tremendous lag and I can only hold so much people if it gets up to 25 then the game isn't even playable it's VERY laggy.
So does anyone know why it's causing so much CPU usage lag?
2: Don't use goto
3: Learn to program, I recommend the DM guide.