From 86c552cab9d245b6d58638179df2ae657ef9a5db Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 22 Sep 2017 18:22:33 +0200 Subject: Hero now holds config for World restart --- not/Hero.lua | 2 +- not/World.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'not') diff --git a/not/Hero.lua b/not/Hero.lua index fc5d840..a97a2b1 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -32,8 +32,8 @@ function Hero:new (config, x, y, world) self:setBodyFixedRotation(true) self:newFixture() -- General + self.config = config self.world = world - self.name = config.name self.angle = 0 self.facing = 1 -- Status diff --git a/not/World.lua b/not/World.lua index 4523efa..6bc5e18 100644 --- a/not/World.lua +++ b/not/World.lua @@ -468,7 +468,7 @@ function World:controlpressed (set, action, key) map.filename = filename local nauts = {} for _,naut in pairs(self:getNautsAll()) do - table.insert(nauts, {naut.name, naut:getControllerSet()}) + table.insert(nauts, {naut.config, naut:getControllerSet()}) end local new = World(map, nauts) sceneManager:changeScene(new) -- cgit v1.1