X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player.c;h=de96060710677edb746e08277838848ea485e8e8;hb=137d40d96fe923600d8378b8e138e3c276f27ff4;hp=9938de6507c7aa7963e32906424c6c32b051963c;hpb=ce0205fd929e5fb1446f8c52fcab344884d82569;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player.c b/player.c index 9938de6..de96060 100644 --- a/player.c +++ b/player.c @@ -10,6 +10,7 @@ #include "player_replay.h" #include "network.h" #include "network_common.h" +#include "world_routes.h" static int localplayer_cmd_respawn( int argc, const char *argv[] ){ ent_spawn *rp = NULL, *r; @@ -192,20 +193,16 @@ static void player__im_gui(void){ player__debugtext( 2, "instance #%u", world_static.active_instance ); - char buf_hub[96], - buf_client[96]; - if( world_static.addon_client ) - addon_alias_uid( &world_static.addon_client->alias, buf_client ); - else - strcpy( buf_client, "none" ); + char buf[96]; + for( u32 i=0; ialias, buf ); + else + strcpy( buf, "none" ); - if( world_static.addon_hub ) - addon_alias_uid( &world_static.addon_hub->alias, buf_hub ); - else - strcpy( buf_hub, "none" ); + player__debugtext( 1, "world #%u: %s", i, buf ); + } - player__debugtext( 1, "hub uid: %s", buf_hub ); - player__debugtext( 1, "client uid: %s", buf_client ); player__debugtext( 2, "director" ); player__debugtext( 1, "activity: %s", (const char *[]){ [k_skaterift_menu] = "menu", @@ -257,15 +254,23 @@ static void player__spawn( ent_spawn *rp ){ player_subsystems[ localplayer.subsystem ]->reset( rp ); localplayer.boundary_hash ^= NETMSG_BOUNDARY_BIT; + + for( u32 i=0; istatus == k_world_status_loaded ){ + world_routes_clear( instance ); + } + } } static void player__kill(void){ } -static void player__begin_holdout(void){ +static void player__begin_holdout( v3f offset ){ memcpy( &localplayer.holdout_pose, &localplayer.pose, sizeof(localplayer.pose) ); + v3_copy( offset, localplayer.holdout_pose.root_co ); localplayer.holdout_time = 1.0f; }