summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2017-08-20 13:47:07 -0500
committerDavid McMackins II <contact@mcmackins.org>2017-08-20 13:47:07 -0500
commit9faedad2ea3507e16b453f9a6093a96e94e0fe56 (patch)
tree595ded5c4bed47a1dba15f8516c3e3ee12707708
parentaff97494a1e11fecb671cfe9323b1e0e240643ff (diff)
Add ability to not unload previous state
-rw-r--r--state.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/state.lua b/state.lua
index 0601a7a..f700020 100644
--- a/state.lua
+++ b/state.lua
@@ -1,6 +1,6 @@
--
-- Agario Checkers - Checkers-like game with inspiration from agar.io
--- Copyright (C) 2016 Delwink, LLC
+-- Copyright (C) 2016-2017 Delwink, LLC
--
-- Redistributions, modified or unmodified, in whole or in part, must retain
-- applicable copyright or other legal privilege notices, these conditions, and
@@ -40,8 +40,8 @@ require 'class'
activestate = nil
-function setstate(state)
- if activestate then
+function setstate(state, keepstate)
+ if activestate and not keepstate then
activestate:unload()
end