Fix "self" param to the GS.leave callback

This commit is contained in:
Carlo Cabanilla 2013-04-11 23:44:17 -03:00
parent 4f6c85e514
commit 11cf27df4d

View File

@ -36,7 +36,7 @@ function GS.new(t) return t or {} end -- constructor - deprecated!
function GS.switch(to, ...)
assert(to, "Missing argument: Gamestate to switch to")
local pre = current
;(current.leave or __NULL__)(self)
;(current.leave or __NULL__)(current)
;(to.init or __NULL__)(to)
to.init = nil
current = to