projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
the luxuries of a modern C compiler
[carveJwlIkooP6JGAAIwe30JlM.git]
/
player.c
diff --git
a/player.c
b/player.c
index 0339a8d889f87c0faa08bf6b2443cf2bba9e783b..145a9285c79c636ece7c70b32c4d947725a213c7 100644
(file)
--- a/
player.c
+++ b/
player.c
@@
-5,6
+5,8
@@
#include "camera.h"
#include "player_model.h"
#include "input.h"
#include "camera.h"
#include "player_model.h"
#include "input.h"
+#include "world.h"
+#include "audio.h"
VG_STATIC int localplayer_cmd_respawn( int argc, const char *argv[] )
{
VG_STATIC int localplayer_cmd_respawn( int argc, const char *argv[] )
{
@@
-130,9
+132,9
@@
void player__pre_update( player_instance *player )
}
if( button_down( k_srbind_reset ) && !player->immobile ){
}
if( button_down( k_srbind_reset ) && !player->immobile ){
-
double delta = world_global.time - world_global
.last_use;
+
f64 delta = world_static.time - world_static
.last_use;
- if( (delta <= RESET_MAX_TIME) && (world_
global
.last_use != 0.0) ){
+ if( (delta <= RESET_MAX_TIME) && (world_
static
.last_use != 0.0) ){
player->rewinding = 1;
player->rewind_sound_wait = 1;
player->rewind_time = (double)player->rewind_length - 0.0001;
player->rewinding = 1;
player->rewind_sound_wait = 1;
player->rewind_time = (double)player->rewind_length - 0.0001;
@@
-219,11
+221,11
@@
void player__post_update( player_instance *player )
PLAYER_API
void player__pass_gate( player_instance *player, ent_gate *gate )
{
PLAYER_API
void player__pass_gate( player_instance *player, ent_gate *gate )
{
- world_routes_fracture(
get_active_world
(), gate,
+ world_routes_fracture(
world_current_instance
(), gate,
player->rb.co, player->rb.v );
player->gate_waiting = gate;
player->rb.co, player->rb.v );
player->gate_waiting = gate;
- world_routes_activate_entry_gate(
get_active_world
(), gate );
+ world_routes_activate_entry_gate(
world_current_instance
(), gate );
m4x3_mulv( gate->transport, player->tpv_lpf, player->tpv_lpf );
m3x3_mulv( gate->transport, player->cam_velocity_smooth,
m4x3_mulv( gate->transport, player->tpv_lpf, player->tpv_lpf );
m3x3_mulv( gate->transport, player->cam_velocity_smooth,
@@
-250,9
+252,9
@@
void player__pass_gate( player_instance *player, ent_gate *gate )
player_save_rewind_frame( player );
if( gate->type == k_gate_type_nonlocel )
player_save_rewind_frame( player );
if( gate->type == k_gate_type_nonlocel )
- world_
global
.active_world = gate->target;
+ world_
static
.active_world = gate->target;
- world_
global.in_volum
e = 0;
+ world_
volumes.insid
e = 0;
audio_lock();
audio_oneshot( &audio_gate_pass, 1.0f, 0.0f );
audio_lock();
audio_oneshot( &audio_gate_pass, 1.0f, 0.0f );
@@
-346,4
+348,13
@@
PLAYER_API void player__kill( player_instance *player )
}
}
+/* implementation */
+#include "player_common.c"
+#include "player_walk.c"
+#include "player_skate.c"
+#include "player_dead.c"
+#include "player_drive.c"
+#include "player_render.c"
+#include "player_ragdoll.c"
+
#endif /* PLAYER_C */
#endif /* PLAYER_C */