X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_challenge.c;h=8f8c277338f3312562591e0b9924a951fd712ba6;hb=1a194c3888293733939b2dd944251ae1b6c398ce;hp=c2ee3b6434eb163fc2687efa247f49ced237716c;hpb=14851c4c820eb07a0db0ec0366a70bdd6518c331;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_challenge.c b/ent_challenge.c index c2ee3b6..8f8c277 100644 --- a/ent_challenge.c +++ b/ent_challenge.c @@ -25,7 +25,8 @@ void ent_challenge_call( world_instance *world, ent_call *call ) if( (localplayer.subsystem == k_player_subsystem_walk) && (world_static.challenge_target == NULL) ){ world_static.challenge_target = NULL; - world_entity_focus( call->id ); + world_entity_set_focus( call->id ); + world_entity_focus_modal(); gui_helper_clear(); vg_str text; @@ -66,7 +67,7 @@ void ent_challenge_preupdate( ent_challenge *challenge, int active ) if( min_dist2 > max_dist*max_dist ){ world_static.challenge_target = NULL; world_static.challenge_timer = 0.0f; - world_static.focused_entity = 0; + world_entity_clear_focus(); audio_lock(); audio_oneshot_3d( &audio_challenge[6], localplayer.rb.co, 30.0f, 1.0f ); @@ -83,7 +84,7 @@ void ent_challenge_preupdate( ent_challenge *challenge, int active ) world_static.challenge_target = mdl_arritm( &world->ent_objective, index ); world_static.challenge_timer = 0.0f; - world_entity_unfocus(); + world_entity_exit_modal(); gui_helper_clear(); u32 next = challenge->first; @@ -101,9 +102,11 @@ void ent_challenge_preupdate( ent_challenge *challenge, int active ) } } - if( button_down( k_srbind_mback ) ){ + if( button_down( k_srbind_mback ) ) + { world_static.challenge_target = NULL; - world_entity_unfocus(); + world_entity_exit_modal(); + world_entity_clear_focus(); gui_helper_clear(); audio_lock(); audio_oneshot( &audio_challenge[4], 1.0f, 0.0f );