Merge pull request #789 from Citadel-Station-13/upstream-merge-26908
[MIRROR] Fixes dead mobs being initialized twice
This commit is contained in:
@@ -1,49 +1,51 @@
|
||||
//Dead mobs can exist whenever. This is needful
|
||||
|
||||
INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
|
||||
/mob/dead/Initialize()
|
||||
if(initialized)
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
tag = "mob_[next_mob_id++]"
|
||||
GLOB.mob_list += src
|
||||
|
||||
INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
prepare_huds()
|
||||
|
||||
|
||||
/mob/dead/Initialize()
|
||||
|
||||
if(initialized)
|
||||
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
if(config.cross_allowed)
|
||||
verbs += /mob/dead/proc/server_hop
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
initialized = TRUE
|
||||
/mob/dead/dust() //ghosts can't be vaporised.
|
||||
return
|
||||
|
||||
/mob/dead/gib() //ghosts can't be gibbed.
|
||||
return
|
||||
|
||||
tag = "mob_[next_mob_id++]"
|
||||
|
||||
GLOB.mob_list += src
|
||||
/mob/dead/ConveyorMove() //lol
|
||||
return
|
||||
|
||||
|
||||
prepare_huds()
|
||||
|
||||
|
||||
if(config.cross_allowed)
|
||||
|
||||
verbs += /mob/dead/proc/server_hop
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/mob/dead/proc/server_hop()
|
||||
set category = "OOC"
|
||||
set name = "Server Hop!"
|
||||
set desc= "Jump to the other server"
|
||||
if(notransform)
|
||||
return
|
||||
if(!config.cross_allowed)
|
||||
verbs -= /mob/dead/proc/server_hop
|
||||
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
|
||||
return
|
||||
if (alert(src, "Jump to server running at [config.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
|
||||
return 0
|
||||
if (client && config.cross_allowed)
|
||||
to_chat(src, "<span class='notice'>Sending you to [config.cross_address].</span>")
|
||||
new /obj/screen/splash(client)
|
||||
notransform = TRUE
|
||||
sleep(29) //let the animation play
|
||||
notransform = FALSE
|
||||
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
|
||||
client << link(config.cross_address + "?server_hop=[key]")
|
||||
else
|
||||
to_chat(src, "<span class='error'>There is no other server configured!</span>")
|
||||
|
||||
/mob/dead/dust() //ghosts can't be vaporised.
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/dead/gib() //ghosts can't be gibbed.
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/dead/ConveyorMove() //lol
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/dead/proc/server_hop()
|
||||
|
||||
set category = "OOC"
|
||||
|
||||
set name = "Server Hop!"
|
||||
@@ -0,0 +1,9 @@
|
||||
diff a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm (rejected hunks)
|
||||
@@ -5,6 +5,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
/mob/dead/Initialize()
|
||||
if(initialized)
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
+ initialized = TRUE
|
||||
tag = "mob_[next_mob_id++]"
|
||||
GLOB.mob_list += src
|
||||
|
||||
Reference in New Issue
Block a user