mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 09:53:38 +02:00
agent::spawn_at(): Disassociate from constructor, allow tile == NULL
This commit is contained in:
parent
3e5366a5c4
commit
7714906baa
3 changed files with 13 additions and 13 deletions
4
main.cc
4
main.cc
|
@ -67,7 +67,9 @@ next_agent:
|
|||
int cfd = accept(lfd, NULL, NULL);
|
||||
if (cfd >= 0) {
|
||||
class connection *conn = new class connection(cfd);
|
||||
agents.push_back(new class agent(aid++, map.agent_startpos(), conn));
|
||||
class agent *a = new class agent(aid++, conn);
|
||||
agents.push_back(a);
|
||||
a->spawn_at(map.agent_startpos());
|
||||
}
|
||||
|
||||
/* Collect and take actions. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue