Files
S.P.L.U.R.T-Station-13/code/controllers/subsystem/parallax.dm
Poojawa f67e9f6d87 Bleeding edgy refresh (#303)
* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
2017-03-21 11:44:10 -05:00

43 lines
1.0 KiB
Plaintext

var/datum/controller/subsystem/parallax/SSparallax
/datum/controller/subsystem/parallax
name = "Parallax"
wait = 2
flags = SS_POST_FIRE_TIMING | SS_FIRE_IN_LOBBY | SS_BACKGROUND | SS_NO_INIT
priority = 65
var/list/currentrun
/datum/controller/subsystem/parallax/New()
NEW_SS_GLOBAL(SSparallax)
return ..()
/datum/controller/subsystem/parallax/fire(resumed = 0)
if (!resumed)
src.currentrun = clients.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(length(currentrun))
var/client/C = currentrun[currentrun.len]
currentrun.len--
if (!C || !C.eye)
if (MC_TICK_CHECK)
return
continue
var/atom/movable/A = C.eye
if(!A)
return
for (A; isloc(A.loc) && !isturf(A.loc); A = A.loc);
if(A != C.movingmob)
if(C.movingmob != null)
C.movingmob.client_mobs_in_contents -= C.mob
UNSETEMPTY(C.movingmob.client_mobs_in_contents)
LAZYINITLIST(A.client_mobs_in_contents)
A.client_mobs_in_contents += C.mob
C.movingmob = A
if (MC_TICK_CHECK)
return
currentrun = null