POLARIS: Fix oversight in not-late-join jobs without spawnpoints on the map

They spawn in space. That's fine, right?
This commit is contained in:
Arokha Sieyes
2018-02-24 15:22:23 -05:00
committed by Leshana
parent 57ed0f6e9e
commit e9ad27de9f

View File

@@ -327,6 +327,27 @@ var/global/datum/controller/occupations/job_master
var/datum/job/job = GetJob(rank)
var/list/spawn_in_storage = list()
if(!joined_late)
var/obj/S = null
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if(sloc.name != rank) continue
if(locate(/mob/living) in sloc.loc) continue
S = sloc
break
if(!S)
S = locate("start*[rank]") // use old stype
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.forceMove(S.loc)
else
var/list/spawn_props = LateSpawn(H.client, rank)
var/turf/T = spawn_props["turf"]
H.forceMove(T)
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
H.buckled.forceMove(H.loc)
H.buckled.set_dir(H.dir)
if(job)
//Equip custom gear loadout.
@@ -398,25 +419,6 @@ var/global/datum/controller/occupations/job_master
H.job = rank
if(!joined_late)
var/obj/S = null
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if(sloc.name != rank) continue
if(locate(/mob/living) in sloc.loc) continue
S = sloc
break
if(!S)
S = locate("start*[rank]") // use old stype
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.forceMove(S.loc)
else
LateSpawn(H, rank)
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
H.buckled.forceMove(H.loc)
H.buckled.set_dir(H.dir)
// If they're head, give them the account info for their department
if(H.mind && job.head_position)
var/remembered_info = ""
@@ -612,7 +614,7 @@ var/global/datum/controller/occupations/job_master
var/datum/spawnpoint/spawnpos
//Spawn them at their preferred one
if(C.prefs.spawnpoint)
if(C && C.prefs.spawnpoint)
if(!(C.prefs.spawnpoint in using_map.allowed_spawns))
to_chat(C, "<span class='warning'>Your chosen spawnpoint ([C.prefs.spawnpoint]) is unavailable for the current map. Spawning you at one of the enabled spawn points instead.</span>")
spawnpos = null