Clean up last_area garbo

This commit is contained in:
Aronai Sieyes
2020-04-30 15:42:55 -04:00
parent 8824fb02db
commit 311c4e35df
5 changed files with 3 additions and 16 deletions
+1 -3
View File
@@ -1299,9 +1299,7 @@ default behaviour is:
//actually throw it!
src.visible_message("<span class='warning'>[src] has thrown [item].</span>")
if(!src.lastarea)
src.lastarea = get_area(src.loc)
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity == 0))
if((istype(src.loc, /turf/space)) || (src.lastarea?.has_gravity == 0))
src.inertia_dir = get_dir(target, src)
step(src, inertia_dir)
+1
View File
@@ -45,6 +45,7 @@
dead_mob_list += src
else
living_mob_list += src
lastarea = get_area(src)
hook_vr("mob_new",list(src)) //VOREStation Code
update_transform() // Some mobs may start bigger or smaller than normal.
return ..()
@@ -511,8 +511,6 @@
if(!new_character)
new_character = new(T)
new_character.lastarea = get_area(T)
if(ticker.random_players)
new_character.gender = pick(MALE, FEMALE)
client.prefs.real_name = random_name(new_character.gender)