Files
Aurora.3/code/controllers/subsystems/parallax.dm
Lohikar b071bbf0d2 Parallax-related performance tweaks (#2810)
Experimental tweaks to how parallax's movement hooks work; the current ones appear to be fairly expensive for all movable movement, doing locate(/mob) in src on every forceMove(). This PR creates a new lazylist (contained_mobs) containing a list of every mob directly contained by an object. contained_mobs is updated on mob/forceMove().

Not sure how to handle mobs located deeper than directly inside an object.

Only alternative to this I see is to make SSparallax tick.
2017-06-26 12:05:17 +03:00

21 lines
464 B
Plaintext

#define GRID_WIDTH 3
var/datum/controller/subsystem/parallax/SSparallax
/datum/controller/subsystem/parallax
name = "Space Parallax"
init_order = SS_INIT_PARALLAX
flags = SS_NO_FIRE
var/list/parallax_icon[(GRID_WIDTH**2)*3]
var/parallax_initialized = 0
/datum/controller/subsystem/parallax/New()
NEW_SS_GLOBAL(SSparallax)
/datum/controller/subsystem/parallax/Initialize(timeofday)
create_global_parallax_icons()
..(timeofday, TRUE)
#undef GRID_WIDTH