#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_console_reg_cmd( "respawn", localplayer_cmd_respawn, NULL );
+ VG_VAR_F32( k_cam_damp );
+ VG_VAR_F32( k_cam_spring );
+ VG_VAR_F32( k_cam_punch );
+ VG_VAR_F32( k_cam_shake_strength );
+ VG_VAR_F32( k_cam_shake_trackspeed );
}
PLAYER_API
}
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_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;
- 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,
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_volume = 0;
+ world_volumes.inside = 0;
audio_lock();
audio_oneshot( &audio_gate_pass, 1.0f, 0.0f );
player->subsystem = k_player_subsystem_walk;
player->immobile = 0;
player->gate_waiting = NULL;
+ player->rewind_length = 0;
+ player->rewind_accum = 0.0f;
+ player->rewind_gate = NULL;
+ player->rewinding = 0;
+ world_static.last_use = 0.0;
global_skateshop_exit();
}
+/* 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 */