projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TODO about preupdate call style
[carveJwlIkooP6JGAAIwe30JlM.git]
/
ent_challenge.c
diff --git
a/ent_challenge.c
b/ent_challenge.c
index 9499d0fed8e7b0e6ce9f51fcd1cf0a161d373c55..861edbd6f60e10f9bac4b8ed9c12e093c9fee37a 100644
(file)
--- a/
ent_challenge.c
+++ b/
ent_challenge.c
@@
-46,15
+46,18
@@
entity_call_result ent_challenge_call( world_instance *world, ent_call *call )
return k_entity_call_result_unhandled;
}
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 */
/* maximum distance from active challenge */
- if( !active ){
+ if( !ctx->active )
+ {
f32 min_dist2 = 999999.9f;
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 );
u32 next = challenge->first;
while( mdl_entity_id_type(next) == k_ent_objective ){
u32 index = mdl_entity_id_id( next );