world->rendering_gate = NULL;
world->water.enabled = 0;
+ world->time = 0.0;
/* default lighting conditions
* -------------------------------------------------------------*/
mdl_load_array( meta, &world->ent_skateshop, "ent_skateshop", heap );
mdl_load_array( meta, &world->ent_swspreview,"ent_swspreview", heap );
+ mdl_array_ptr infos;
+ mdl_load_array( meta, &infos, "ent_worldinfo", vg_mem.scratch );
+
+ if( mdl_arrcount(&infos) ){
+ world->info = *((ent_worldinfo *)mdl_arritm(&infos,0));
+ }
+ else{
+ world->info.pstr_author = 0;
+ world->info.pstr_desc = 0;
+ world->info.pstr_name = 0;
+ world->info.timezone = 0.0f;
+ }
+
+ time_t t;
+ struct tm *tm;
+ time( &t );
+ tm = gmtime( &t );
+ world->time = (float)tm->tm_min/20.0f + (world->info.timezone/24.0f);
+
/* process resources from pack */
world_process_resources( world );