Skip to content
Snippets Groups Projects
Commit 6d48dcd1 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

Editor bug fix

parent 751a5aa3
No related branches found
No related tags found
No related merge requests found
...@@ -323,7 +323,7 @@ class Controller(object): ...@@ -323,7 +323,7 @@ class Controller(object):
def restartAgents(self, event): def restartAgents(self, event):
self.log("Restart Agents - nAgents:", self.view.wRegenNAgents.value) self.log("Restart Agents - nAgents:", self.view.wRegenNAgents.value)
if self.model.init_agents_static is not None: if self.model.init_agents_static is not None:
self.model.env.agents_static = [EnvAgentStatic(d[0], d[1], d[2]) for d in self.model.init_agents_static] self.model.env.agents_static = [EnvAgentStatic(d[0], d[1], d[2], moving=False) for d in self.model.init_agents_static]
self.model.env.agents = None self.model.env.agents = None
self.model.init_agents_static = None self.model.init_agents_static = None
self.player = None self.player = None
...@@ -685,7 +685,7 @@ class EditorModel(object): ...@@ -685,7 +685,7 @@ class EditorModel(object):
# No # No
if self.iSelectedAgent is None: if self.iSelectedAgent is None:
# Create a new agent and select it. # Create a new agent and select it.
agent_static = EnvAgentStatic(rcCell, 0, rcCell) agent_static = EnvAgentStatic(rcCell, 0, rcCell, moving=False)
self.iSelectedAgent = self.env.add_agent_static(agent_static) self.iSelectedAgent = self.env.add_agent_static(agent_static)
self.player = None # will need to start a new player self.player = None # will need to start a new player
else: else:
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment