return k_entity_call_result_unhandled;
}
-void ent_challenge_preupdate( ent_challenge *challenge, int active )
+void ent_challenge_preupdate( ent_focus_context *ctx )
{
- world_instance *world = world_current_instance();
+ world_instance *world = ctx->world;
+ ent_challenge *challenge = mdl_arritm( &world->ent_challenge, ctx->index );
/* maximum distance from active challenge */
- if( !active ){
+ if( !ctx->active )
+ {
f32 min_dist2 = 999999.9f;
- if( mdl_entity_id_type( challenge->first ) == k_ent_objective ){
+ if( mdl_entity_id_type( challenge->first ) == k_ent_objective )
+ {
u32 next = challenge->first;
while( mdl_entity_id_type(next) == k_ent_objective ){
u32 index = mdl_entity_id_id( next );