From ada1d0a6c91996604309cc319f05b7e3b101093c Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 27 Nov 2011 17:05:16 +0100 Subject: [PATCH] Fix agent initialization --- agent.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agent.h b/agent.h index 968ec27..911a46e 100644 --- a/agent.h +++ b/agent.h @@ -24,13 +24,13 @@ public: bool dead; agent(int id_, class connection *conn_, class map &map_) - : id (id_), conn (conn_), map (map_) + : id (id_), conn (conn_), map (map_), tile (NULL) { - energy = world::newborn_energy; - dead = false; attr.move = 1.0; attr.attack = 0.5; attr.defense = 0.5; + energy = world::newborn_energy; + dead = false; }; void spawn(void); void spawn_at(class tile &tile); @@ -53,10 +53,10 @@ public: herb(int id_, class map &map_) : agent(id_, NULL, map_) { - energy = world::herb_energy; attr.move = 0; attr.attack = 0; attr.defense = 0; + energy = world::herb_energy; } void on_tick(void);