1 #ifndef PLAYER_REMOTE_H
2 #define PLAYER_REMOTE_H
6 #include "network_common.h"
8 #define NETWORK_SFX_QUEUE_LENGTH 12
11 struct network_player
{
13 u16 board_view_slot
, playermodel_view_slot
;
14 enum player_subsystem subsystem
;
16 /* this is set IF they exist in a world that we have loaded */
17 world_instance
*active_world
;
18 int hub_match
, client_match
;
20 /* TODO: Compression with server code */
21 char username
[ NETWORK_USERNAME_MAX
];
22 char items
[k_netmsg_playeritem_max
][ADDON_UID_MAX
];
27 list
[ NETWORK_MAX_PLAYERS
];
29 struct interp_buffer
{
30 /* collect the most recent 6 frames of animation data */
34 enum player_subsystem subsystem
;
39 union interp_animdata
{
40 struct player_skate_animator _skate
;
41 struct player_walk_animator _walk
;
42 struct player_dead_animator _dead
;
46 frames
[ NETWORK_BUFFERFRAMES
];
50 interp_data
[ NETWORK_MAX_PLAYERS
];
52 struct net_sfx sfx_queue
[ NETWORK_SFX_QUEUE_LENGTH
];
55 struct player_board_pose board_poses
[ NETWORK_MAX_PLAYERS
];
59 f64 last_data_measurement
;
63 static void player_remote_rx_200_300( SteamNetworkingMessage_t
*msg
);
64 static void remote_player_debug_update(void);
65 static void remote_player_send_playerframe(void);
66 static void animate_remote_player( u32 index
);
67 static void render_remote_players( world_instance
*world
, camera
*cam
);
68 static void relink_all_remote_player_worlds(void);
70 #endif /* PLAYER_REMOTE_H */