Wizards can no longer de-jaunt in turfs with dense objects.

Also fixes an exploit where wizards could cast CentCom restricted spells by hiding inside objects, such as lockers or coffins.
This commit is contained in:
PsiOmegaDelta
2015-07-12 14:16:58 +02:00
parent 7a4ed714d2
commit 2ed978b1e1
4 changed files with 24 additions and 6 deletions

View File

@@ -189,7 +189,11 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
if(silenced > 0)
return
if(user.z == 2 && spell_flags & Z2NOCAST) //Certain spells are not allowed on the centcomm zlevel
var/turf/Turf = get_turf(user)
if(!Turf)
user << "<span class='warning'>You cannot cast spells in null space!</span>"
if(spell_flags & Z2NOCAST && (Turf.z in config.admin_levels)) //Certain spells are not allowed on the centcomm zlevel
return 0
if(spell_flags & CONSTRUCT_CHECK)