mdl_load_array( meta, &world->ent_skateshop, "ent_skateshop", heap );
mdl_load_array( meta, &world->ent_swspreview,"ent_swspreview", heap );
mdl_load_array( meta, &world->ent_ccmd, "ent_ccmd", heap );
mdl_load_array( meta, &world->ent_skateshop, "ent_skateshop", heap );
mdl_load_array( meta, &world->ent_swspreview,"ent_swspreview", heap );
mdl_load_array( meta, &world->ent_ccmd, "ent_ccmd", heap );
mdl_load_array( meta, &world->ent_challenge, "ent_challenge", heap );
mdl_load_array( meta, &world->ent_challenge, "ent_challenge", heap );
mdl_load_array( meta, &world->ent_relay, "ent_relay", heap );
mdl_load_array( meta, &world->ent_cubemap, "ent_cubemap", heap );
mdl_load_array( meta, &world->ent_relay, "ent_relay", heap );
mdl_load_array( meta, &world->ent_cubemap, "ent_cubemap", heap );
if( world_static.active_instance != 0 )
vg_error( "Cannot change worlds while in non-root world\n" );
else{
if( world_static.active_instance != 0 )
vg_error( "Cannot change worlds while in non-root world\n" );
else{
char buf[76];
addon_alias_uid( ®->alias, buf );
vg_info( "switching to: %s\n", buf );
char buf[76];
addon_alias_uid( ®->alias, buf );
vg_info( "switching to: %s\n", buf );
}
}
/* console command for the above function */
static int skaterift_change_world_command( int argc, const char *argv[] ){
}
}
/* console command for the above function */
static int skaterift_change_world_command( int argc, const char *argv[] ){
+ for( u32 i=0; i<mdl_arrcount(&world->ent_cubemap); i++ ){
+ ent_cubemap *cm = mdl_arritm(&world->ent_cubemap,i);
+ glDeleteTextures( 1, &cm->texture_id );
+ glDeleteFramebuffers( 1, &cm->framebuffer_id );
+ glDeleteRenderbuffers( 1, &cm->renderbuffer_id );
+ }
+
* reset the world structure without deallocating persistent buffers
* TODO: Make this a memset(0), and have persistent items live in a static loc
*/
* reset the world structure without deallocating persistent buffers
* TODO: Make this a memset(0), and have persistent items live in a static loc
*/