mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Fix #52 - Gamestate require init function.
Use __NULL__ when init is not defined in the state.
This commit is contained in:
parent
37f4ed9e43
commit
f851254f26
@ -40,7 +40,7 @@ local function change_state(stack_offset, to, ...)
|
|||||||
local pre = stack[#stack]
|
local pre = stack[#stack]
|
||||||
|
|
||||||
-- initialize only on first call
|
-- initialize only on first call
|
||||||
;(initialized_states[to] or to.init)(to)
|
;(initialized_states[to] or to.init or __NULL__)(to)
|
||||||
initialized_states[to] = __NULL__
|
initialized_states[to] = __NULL__
|
||||||
|
|
||||||
stack[#stack+stack_offset] = to
|
stack[#stack+stack_offset] = to
|
||||||
|
Loading…
Reference in New Issue
Block a user