X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player.c;h=4746e4fb4c774e0777cc46cc7911dd98f20d2fee;hb=2dd61c7f0185ec525658ca398801f46e6adccf23;hp=25e4b774b8528627704c656378330addb42ef0a2;hpb=9eb3de757a997becb8406417a4bf613f4cb04900;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player.c b/player.c index 25e4b77..4746e4f 100644 --- a/player.c +++ b/player.c @@ -113,18 +113,6 @@ void player__bind( player_instance *player ) PLAYER_API void player__pre_update( player_instance *player ){ - if( button_down( k_srbind_reset ) && !player->immobile ){ - if( player->subsystem == k_player_subsystem_dead ){ - localplayer_cmd_respawn( 0, NULL ); - } - else{ - /* cant do that */ - audio_lock(); - audio_oneshot( &audio_rewind[4], 1.0f, 0.0f ); - audio_unlock(); - } - } - if( button_down( k_srbind_camera ) && !player->immobile ){ if( player->cam_control.camera_mode == k_cam_firstperson ) player->cam_control.camera_mode = k_cam_thirdperson; @@ -187,7 +175,7 @@ void player__pass_gate( player_instance *player, ent_gate *gate ) VG_STATIC void player_apply_transport_to_cam( m4x3f transport ) { - /* FIXME: Applies to main_camera directly! */ + /* FIXME: Applies to skaterift.cam directly! */ /* Pre-emptively edit the camera matrices so that the motion vectors * are correct */ @@ -195,13 +183,13 @@ VG_STATIC void player_apply_transport_to_cam( m4x3f transport ) m4x4f transport_4; m4x3_invert_affine( transport, transport_i ); m4x3_expand( transport_i, transport_4 ); - m4x4_mul( main_camera.mtx.pv, transport_4, main_camera.mtx.pv ); - m4x4_mul( main_camera.mtx.v, transport_4, main_camera.mtx.v ); + m4x4_mul( skaterift.cam.mtx.pv, transport_4, skaterift.cam.mtx.pv ); + m4x4_mul( skaterift.cam.mtx.v, transport_4, skaterift.cam.mtx.v ); /* we want the regular transform here no the inversion */ m4x3_expand( transport, transport_4 ); - m4x4_mul( gate_camera.mtx.pv, transport_4, gate_camera.mtx.pv ); - m4x4_mul( gate_camera.mtx.v, transport_4, gate_camera.mtx.v ); + m4x4_mul( world_gates.cam.mtx.pv, transport_4, world_gates.cam.mtx.pv ); + m4x4_mul( world_gates.cam.mtx.v, transport_4, world_gates.cam.mtx.v ); } __attribute__ ((deprecated)) @@ -236,6 +224,16 @@ PLAYER_API void player__im_gui( player_instance *player ){ g_player_debugger[2] = 300; g_player_debugger[3] = 16; + player__debugtext( 2, "director" ); + player__debugtext( 1, "activity: %s", + (const char *[]){ [k_skaterift_menu] = "menu", + [k_skaterift_replay] = "replay", + [k_skaterift_skateshop] = "shop", + [k_skaterift_default] = "default" + } [skaterift.activity] ); + player__debugtext( 1, "time_rate: %.4f", skaterift.time_rate ); + + player__debugtext( 2, "player_instance[%p]", player ); player__debugtext( 1, "angles: " PRINTF_v3f( player->cam.angles ) ); player__debugtext( 1, "basis: " PRINTF_v4f( player->qbasis ) );