fixed so that the components are reset on connect

This commit is contained in:
Magnus Auvinen 2008-10-08 18:19:45 +00:00
parent 646635ec84
commit 79f9fb41d4

View file

@ -206,6 +206,9 @@ void GAMECLIENT::on_init()
thread_create(load_sounds_thread, 0); thread_create(load_sounds_thread, 0);
else else
load_sounds_thread((void*)1); load_sounds_thread((void*)1);
for(int i = 0; i < all.num; i++)
all.components[i]->on_reset();
int64 end = time_get(); int64 end = time_get();
dbg_msg("", "%f.2ms", ((end-start)*1000)/(float)time_freq()); dbg_msg("", "%f.2ms", ((end-start)*1000)/(float)time_freq());
@ -264,7 +267,10 @@ void GAMECLIENT::on_connected()
render_tilemap_generate_skip(); render_tilemap_generate_skip();
for(int i = 0; i < all.num; i++) for(int i = 0; i < all.num; i++)
{
all.components[i]->on_mapload(); all.components[i]->on_mapload();
all.components[i]->on_reset();
}
// send the inital info // send the inital info
send_info(true); send_info(true);