projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move texture compiler to native code
[carveJwlIkooP6JGAAIwe30JlM.git]
/
ent_objective.c
diff --git
a/ent_objective.c
b/ent_objective.c
index ee52af7518ff12062a82380925cca437e57a1bb9..66b822db62d9e4eb9bf2a20cd71ab76db8c2230f 100644
(file)
--- a/
ent_objective.c
+++ b/
ent_objective.c
@@
-1,12
+1,13
@@
-#ifndef ENT_OBJECTIVE_C
-#define ENT_OBJECTIVE_C
-
#include "world.h"
#include "world_load.h"
#include "entity.h"
#include "audio.h"
#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"
-
VG_STATIC
void ent_objective_pass( world_instance *world,
+
static
void ent_objective_pass( world_instance *world,
ent_objective *objective ){
if( objective->id_next ){
world_static.challenge_timer += objective->filter;
ent_objective *objective ){
if( objective->id_next ){
world_static.challenge_timer += objective->filter;
@@
-20,15
+21,20
@@
VG_STATIC void ent_objective_pass( world_instance *world,
ent_objective_pass( world, next );
else{
vg_info( "pass challenge point\n" );
ent_objective_pass( world, next );
else{
vg_info( "pass challenge point\n" );
+ audio_lock();
audio_oneshot_3d( &audio_challenge[0], localplayer.rb.co,
30.0f, 1.0f );
audio_oneshot_3d( &audio_challenge[0], localplayer.rb.co,
30.0f, 1.0f );
+ audio_unlock();
}
}
else {
vg_success( "challenge win\n" );
}
}
else {
vg_success( "challenge win\n" );
+ audio_lock();
audio_oneshot( &audio_challenge[2], 1.0f, 0.0f );
audio_oneshot( &audio_challenge[2], 1.0f, 0.0f );
+ audio_unlock();
world_static.challenge_target = NULL;
world_static.challenge_timer = 0.0f;
world_static.challenge_target = NULL;
world_static.challenge_timer = 0.0f;
+ world_static.focused_entity = 0;
if( objective->id_win ){
ent_call call;
if( objective->id_win ){
ent_call call;
@@
-37,12
+43,14
@@
VG_STATIC void ent_objective_pass( world_instance *world,
call.id = objective->id_win;
entity_call( world, &call );
}
call.id = objective->id_win;
entity_call( world, &call );
}
+
+ ent_region_re_eval( world );
}
}
}
}
-
VG_STATIC
int ent_objective_check_filter( ent_objective *objective ){
+
static
int ent_objective_check_filter( ent_objective *objective ){
if( objective->filter ){
if( objective->filter ){
- struct player_skate_state *s = &
localplayer.
_skate.state;
+ struct player_skate_state *s = &
player
_skate.state;
enum trick_type trick = s->trick_type;
u32 state = 0x00;
enum trick_type trick = s->trick_type;
u32 state = 0x00;
@@
-73,7
+81,8
@@
VG_STATIC int ent_objective_check_filter( ent_objective *objective ){
}
}
}
}
-VG_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 );
u32 index = mdl_entity_id_id( call->id );
ent_objective *objective = mdl_arritm( &world->ent_objective, index );
@@
-87,11
+96,14
@@
VG_STATIC void ent_objective_call( world_instance *world, ent_call *call ){
ent_objective_pass( world, objective );
}
else {
ent_objective_pass( world, objective );
}
else {
+ audio_lock();
audio_oneshot_3d( &audio_challenge[6], localplayer.rb.co,
30.0f, 1.0f );
audio_oneshot_3d( &audio_challenge[6], localplayer.rb.co,
30.0f, 1.0f );
- vg_error( "challenge fialed\n" );
+ audio_unlock();
+ vg_error( "challenge failed\n" );
world_static.challenge_target = NULL;
world_static.challenge_timer = 0.0f;
world_static.challenge_target = NULL;
world_static.challenge_timer = 0.0f;
+ world_static.focused_entity = 0;
}
}
}
}
}
}
@@
-116,5
+128,3
@@
VG_STATIC void ent_objective_call( world_instance *world, ent_call *call ){
vg_error( "Unhandled function id: %u\n", call->function );
}
}
vg_error( "Unhandled function id: %u\n", call->function );
}
}
-
-#endif /* ENT_OBJECTIVE_C */