X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_miniworld.c;fp=ent_miniworld.c;h=54ce8ae5c6782752897d639da0014fbad417430e;hb=1a7f4a35e88698bdb45c90f646f1645589d5511c;hp=bc59d470f6c17e2aeb6ee8f169c76a4f4839c661;hpb=63fe317d7db724162561da52aa382c82ac3c29be;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_miniworld.c b/ent_miniworld.c index bc59d47..54ce8ae 100644 --- a/ent_miniworld.c +++ b/ent_miniworld.c @@ -14,6 +14,19 @@ static void ent_miniworld_call( world_instance *world, ent_call *call ){ 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 ){ @@ -25,7 +38,20 @@ 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];