#include "ent_miniworld.h"
#include "gui.h"
+#include "shaders/model_entity.h"
+#include "shaders/model_character_view.h"
+#include "shaders/model_board_view.h"
+
static int localplayer_cmd_respawn( int argc, const char *argv[] ){
ent_spawn *rp = NULL, *r;
world_instance *world = world_current_instance();
static void player_init(void){
for( u32 i=0; i<vg_list_size(player_subsystems); i++ ){
struct player_subsystem_interface *sys = player_subsystems[i];
-
if( sys->system_register ) sys->system_register();
}
vg_console_reg_var( "cinema_fixed", &k_cinema_fixed, k_var_dtype_i32, 0 );
vg_console_reg_var( "invert_y", &k_invert_y,
k_var_dtype_i32, VG_VAR_PERSISTENT );
+
+ shader_model_character_view_register();
+ shader_model_board_view_register();
+ shader_model_entity_register();
}
static void player__debugtext( int size, const char *fmt, ... ){
static void player__post_update(void){
if( player_subsystems[ localplayer.subsystem ]->post_update )
player_subsystems[ localplayer.subsystem ]->post_update();
+
+ SDL_AtomicLock( &air_data.sl );
+ air_data.speed = v3_length( localplayer.rb.v );
+ SDL_AtomicUnlock( &air_data.sl );
}
/*
localplayer.boundary_hash ^= NETMSG_GATE_BOUNDARY_BIT;
localplayer.boundary_hash &= ~NETMSG_BOUNDARY_MASK;
localplayer.boundary_hash |= index;
-
+
ent_gate *gate = mdl_arritm( &world->ent_gate, mdl_entity_id_id(id) );
world_routes_fracture( world, gate, localplayer.rb.co, localplayer.rb.v );
localplayer.gate_waiting = gate;
- world_routes_activate_entry_gate( world_current_instance(), gate );
struct player_cam_controller *cc = &localplayer.cam_control;
m4x3_mulv( gate->transport, cc->tpv_lpf, cc->tpv_lpf );
world_static.active_instance = gate->target;
player__clean_refs();
}
+ else
+ world_routes_activate_entry_gate( world, gate );
v3f v0;
v3_angles_vector( localplayer.angles, v0 );
}
static void player_apply_transport_to_cam( m4x3f transport ){
- /* FIXME: Applies to skaterift.cam directly! */
-
/* Pre-emptively edit the camera matrices so that the motion vectors
* are correct */
m4x3f transport_i;
[k_skaterift_replay] = "replay",
[k_skaterift_ent_focus] = "ent_focus",
[k_skaterift_default] = "default",
- [k_skaterift_respawning]= "map"
+ [k_skaterift_world_map] = "world map"
} [skaterift.activity] );
player__debugtext( 1, "time_rate: %.4f", skaterift.time_rate );
/* implementation */
#include "player_common.c"
+
#include "player_walk.c"
#include "player_skate.c"
#include "player_dead.c"
#include "player_drive.c"
+#include "player_basic_info.c"
+
#include "player_render.c"
#include "player_ragdoll.c"
#include "player_replay.c"