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 );
static void skaterift_world_load_done( void *payload, u32 size ){
struct world_load_complete_data *data = payload;
static void skaterift_world_load_done( void *payload, u32 size ){
struct world_load_complete_data *data = payload;
- vg_msg sav = {0};
- sav.buf = data->save.buf;
- sav.len = data->save.len;
- sav.max = data->save.len;
+ vg_msg sav;
+ vg_msg_init( &sav, data->save.buf, data->save.len );
for( u32 i=0; i<data->instance_count; i++ ){
world_instance *world = &world_static.instances[ data->instance_start+i ];
for( u32 i=0; i<data->instance_count; i++ ){
world_instance *world = &world_static.instances[ data->instance_start+i ];
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[] ){
* 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
*/