+ else
+ vg_msg_cast( kv.value, kv.code, &alias->workshop_id, k_vg_msg_u64 );
+ }
+}
+
+static void skaterift_populate_world_savedata( savedata_file *file,
+ enum world_purpose which ){
+ file->path[0] = '\0';
+ file->len = 0;
+ addon_reg *reg = world_static.instance_addons[ which ];
+
+ if( !reg ){
+ vg_error( "Tried to save unspecified world (reg was null)\n" );
+ return;
+ }
+
+ skaterift_world_get_save_path( which, file->path );
+
+ vg_msg sav;
+ vg_msg_init( &sav, file->buf, sizeof(file->buf) );
+
+ world_instance *instance = &world_static.instances[which];
+ world_entity_serialize( instance, &sav );
+
+ vg_msg_frame( &sav, "player" );
+ {
+ vg_msg_wkvnum( &sav, "position", k_vg_msg_float|k_vg_msg_32b, 3,
+ (which == world_static.active_instance)?
+ localplayer.rb.co:
+ instance->player_co );