about summary refs log tree commit diff
path: root/src/game/client/gameclient.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-08 18:19:45 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-08 18:19:45 +0000
commit79f9fb41d486bd9737f0238b7907712a5d99cd1e (patch)
tree6b3df5ac58e796873303bde00e4c38076efe86a6 /src/game/client/gameclient.cpp
parent646635ec84ba97629c8fa19ee18bea0945cd501a (diff)
downloadzcatch-79f9fb41d486bd9737f0238b7907712a5d99cd1e.tar.gz
zcatch-79f9fb41d486bd9737f0238b7907712a5d99cd1e.zip
fixed so that the components are reset on connect
Diffstat (limited to 'src/game/client/gameclient.cpp')
-rw-r--r--src/game/client/gameclient.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp
index fee12eb0..6fc478b0 100644
--- a/src/game/client/gameclient.cpp
+++ b/src/game/client/gameclient.cpp
@@ -206,6 +206,9 @@ void GAMECLIENT::on_init()
 		thread_create(load_sounds_thread, 0);
 	else
 		load_sounds_thread((void*)1);
+
+	for(int i = 0; i < all.num; i++)
+		all.components[i]->on_reset();
 	
 	int64 end = time_get();
 	dbg_msg("", "%f.2ms", ((end-start)*1000)/(float)time_freq());
@@ -264,7 +267,10 @@ void GAMECLIENT::on_connected()
 	render_tilemap_generate_skip();
 
 	for(int i = 0; i < all.num; i++)
+	{
 		all.components[i]->on_mapload();
+		all.components[i]->on_reset();
+	}
 	
 	// send the inital info
 	send_info(true);