#include "entity.h"
#include "ent_miniworld.h"
#include "world_render.h"
+#include "input.h"
static void ent_miniworld_call( world_instance *world, ent_call *call ){
ent_miniworld *miniworld = mdl_arritm( &world->ent_miniworld,
global_miniworld.active_id = call->id;
}
+ else if( call->function == 1 ){
+
+ if( global_miniworld.active_id == call->id )
+ global_miniworld.active_id = 0;
+ else
+ vg_warn( "bad call\n" );
+
+ if( miniworld->proxy ){
+ ent_prop *prop = mdl_arritm( &world->ent_prop,
+ mdl_entity_id_id(miniworld->proxy) );
+ prop->flags &= ~0x1;
+ }
+ }
}
static void ent_miniworld_render( world_instance *host_world ){
ent_miniworld *miniworld = mdl_arritm( &host_world->ent_miniworld,
mdl_entity_id_id(entity_id) );
+ int rendering = 1;
if( miniworld->purpose == k_world_purpose_invalid )
+ rendering = 0;
+
+ if( miniworld->proxy ){
+ ent_prop *prop = mdl_arritm( &host_world->ent_prop,
+ mdl_entity_id_id(miniworld->proxy) );
+ if( !rendering )
+ prop->flags &= ~0x1;
+ else
+ prop->flags |= 0x1;
+ }
+
+ if( !rendering )
return;
world_instance *dest_world = &world_static.instances[miniworld->purpose];
//render_world_routes( , &skaterift.cam, 1 );
}
+
+static void ent_miniworld_preupdate(void){
+ if( !global_miniworld.active_id )
+ return;
+
+ if( button_down( k_srbind_use ) ){
+
+ }
+}