-#ifndef ENT_OBJECTIVE_C
-#define ENT_OBJECTIVE_C
-
#include "world.h"
#include "world_load.h"
#include "entity.h"
#include "audio.h"
#include "steam.h"
+#include "ent_region.h"
+#include "player.h"
+#include "player_skate.h"
static void ent_objective_pass( world_instance *world,
ent_objective *objective ){
entity_call( world, &call );
}
- u32 world_completed = 1;
- for( u32 i=0; i<mdl_arrcount(&world->ent_challenge); i++ ){
- ent_challenge *challenge = mdl_arritm( &world->ent_challenge, i );
- if( !challenge->status ){
- world_completed = 0;
- break;
- }
- }
-
- if( world_completed ){
- const char *understate = "Understate DIY park";
- if( mdl_pstreq( &world->meta, world->info.pstr_name,
- understate, vg_strdjb2( understate ))){
- steam_set_achievement( "CITY_COMPLETE" );
- steam_store_achievements();
- }
- }
+ ent_region_re_eval( world );
}
}
}
}
-static void ent_objective_call( world_instance *world, ent_call *call ){
+void ent_objective_call( world_instance *world, ent_call *call )
+{
u32 index = mdl_entity_id_id( call->id );
ent_objective *objective = mdl_arritm( &world->ent_objective, index );
vg_error( "Unhandled function id: %u\n", call->function );
}
}
-
-#endif /* ENT_OBJECTIVE_C */