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
{
12 int active
, isfriend
, isblocked
;
14 u16 board_view_slot
, playermodel_view_slot
;
15 enum player_subsystem subsystem
;
17 /* this is set IF they exist in a world that we have loaded */
18 world_instance
*active_world
;
19 int world_match
[ k_world_max
];
20 u32 location_pstr
; /* TODO: valid if active_world set. */
22 /* TODO: Compression with server code */
23 char username
[ NETWORK_USERNAME_MAX
];
24 char items
[k_netmsg_playeritem_max
][ADDON_UID_MAX
];
33 list
[ NETWORK_MAX_PLAYERS
];
35 struct interp_buffer
{
36 /* collect the most recent 6 frames of animation data */
40 enum player_subsystem subsystem
;
45 union interp_animdata
{
46 struct player_skate_animator _skate
;
47 struct player_walk_animator _walk
;
48 struct player_dead_animator _dead
;
52 frames
[ NETWORK_BUFFERFRAMES
];
56 interp_data
[ NETWORK_MAX_PLAYERS
];
58 struct net_sfx sfx_queue
[ NETWORK_SFX_QUEUE_LENGTH
];
61 struct player_board_pose board_poses
[ NETWORK_MAX_PLAYERS
];
65 f64 last_data_measurement
;
69 static void player_remote_rx_200_300( SteamNetworkingMessage_t
*msg
);
70 static void remote_player_debug_update(void);
71 static void remote_player_send_playerframe(void);
72 static void animate_remote_player( u32 index
);
73 static void render_remote_players( world_instance
*world
, camera
*cam
);
74 static void relink_all_remote_player_worlds(void);
75 static void player_remote_update_friendflags( struct network_player
*remote
);
77 #endif /* PLAYER_REMOTE_H */