Open source remastering of the Freespace 2 engine
multiutil.h File Reference
#include "network/psnet2.h"

Go to the source code of this file.


#define MULTI_SIG_SHIP   1
#define MULTI_SIG_DEBRIS   4
#define OO_POS_RET_SIZE   9
#define OO_ORIENT_RET_SIZE   6
#define OO_VEL_RET_SIZE   4
#define OO_ROTVEL_RET_SIZE   4


ushort multi_assign_network_signature (int what_kind)
ushort multi_get_next_network_signature (int what_kind)
void multi_set_network_signature (ushort signature, int what_kind)
void stuff_netplayer_info (net_player *nplayer, net_addr *addr, int ship_class, player *pplayer)
int find_player (net_addr *addr)
int find_player_no_port (net_addr *addr)
int find_player_id (short player_id)
int find_player_socket (PSNET_SOCKET_RELIABLE sock)
int multi_find_player_by_object (object *obj)
int multi_find_player_by_signature (int signature)
int multi_find_player_by_callsign (const char *callsign)
int multi_find_player_by_net_signature (ushort net_signature)
int multi_find_player_by_parse_object (p_object *p_objp)
int multi_find_player_by_ship_name (const char *ship_name, bool inc_respawning=false)
int multi_create_player (int player_num, player *pl, const char *name, net_addr *addr, int ship_class, short id)
int multi_find_open_netplayer_slot ()
int multi_find_open_player_slot ()
void delete_player (int player_num, int kicked_reason=-1)
int multi_get_player_ship (int np_index)
int multi_num_players ()
int multi_num_observers ()
int multi_num_connections ()
const char * multi_random_death_word ()
const char * multi_random_chat_start ()
int multi_ship_class_lookup (const char *ship_name)
ushort netmisc_calc_checksum (void *vptr, int len)
void fill_net_addr (net_addr *addr, ubyte *address, ushort port)
char * get_text_address (char *text, ubyte *address)
objectmulti_get_network_object (ushort net_signature)
void multi_find_ingame_join_pos (object *new_obj)
void multi_pack_orient_matrix (ubyte *data, matrix *m)
void multi_unpack_orient_matrix (ubyte *data, matrix *m)
void multi_do_client_warp (float frame_time)
void multi_assign_player_ship (int net_player_num, object *objp, int ship_class)
int lookup_ship_status (net_player *p, int unique_id, int remove=0)
void remove_ship_status_item (net_player *p, int id)
void add_net_button_info (net_player *p, button_info *bi, int unique_id)
void multi_maybe_send_ship_status ()
void multi_apply_ship_status (net_player *p, button_info *bi, int locally)
void multiplayer_match_target_speed (net_player *p)
void multi_subsys_update_all ()
void server_verify_filesig (short player_id, ushort sum_sig, int length_sig)
int server_all_filesigs_ok ()
void multi_untag_player_ships ()
void multi_broadcast_stats (int stats_code)
int multi_netplayer_state_check (int state, int ignore_standalone=0)
int multi_netplayer_state_check2 (int state, int state2, int ignore_standalone=0)
int multi_netplayer_state_check3 (int state, int state2, int state3, int ignore_standalone=0)
int multi_netplayer_flag_check (int flags, int ignore_standalone=0)
void multi_eval_socket_error (PSNET_SOCKET sock, int error)
void multi_maybe_send_repair_info (object *dest_obj, object *source_objp, int code)
int multi_is_valid_unknown_packet (ubyte type)
void multi_create_standalone_object ()
int multi_message_should_broadcast (int type)
active_gamemulti_new_active_game (void)
active_gamemulti_update_active_games (active_game *ag)
void multi_free_active_games ()
server_itemmulti_new_server_item (void)
void multi_free_server_list ()
int multi_can_message (net_player *p)
int multi_can_end_mission (net_player *p)
int multi_eval_join_request (join_request *jr, net_addr *addr)
void multi_warpout_all_players ()
int multi_get_highest_rank ()
void multi_handle_end_mission_request ()
void multi_handle_state_special ()
void multi_file_xfer_notify (int handle)
int multi_query_lag_status ()
void multi_process_valid_join_request (join_request *jr, net_addr *who_from, int ingame_join_team=-1)
int multi_process_restricted_keys (int k)
void multi_player_ships_available (int *team_0, int *team_1)
void multi_server_update_player_weapons (net_player *pl, ship *shipp)
void multi_flush_multidata_cache ()
void multi_flush_mission_stuff ()
int multi_ignore_controls (int key=-1)
int multi_kill_limit_reached ()
void multi_display_chat_msg (const char *msg, int player_index, int add_id)
void multi_get_mission_checksum (const char *filename)
int multi_pack_unpack_position (int write, ubyte *data, vec3d *pos)
int multi_pack_unpack_orient (int write, ubyte *data, matrix *orient)
int multi_pack_unpack_vel (int write, ubyte *data, matrix *orient, vec3d *pos, physics_info *pi)
int multi_pack_unpack_desired_vel (int write, ubyte *data, matrix *orient, vec3d *pos, physics_info *pi, ship_info *sip)
int multi_pack_unpack_rotvel (int write, ubyte *data, matrix *orient, vec3d *pos, physics_info *pi)
int multi_pack_unpack_desired_rotvel (int write, ubyte *data, matrix *orient, vec3d *pos, physics_info *pi, ship_info *sip)
char multi_unit_to_char (float unit)
float multi_char_to_unit (float val)
int multi_show_ingame_ping ()
int multi_is_builtin_mission ()
int multi_get_connection_speed ()
void multi_update_valid_missions ()
short multi_get_new_id ()
void send_debrief_event ()
void multi_handle_sudden_mission_end ()
void multi_send_anti_timeout_ping ()
void multi_make_fake_players (int count)

Macro Definition Documentation


Definition at line 33 of file multiutil.h.

#define MULTI_SIG_DEBRIS   4

Definition at line 35 of file multiutil.h.


Definition at line 34 of file multiutil.h.

#define MULTI_SIG_SHIP   1

Definition at line 32 of file multiutil.h.


Definition at line 215 of file multiutil.h.


Definition at line 205 of file multiutil.h.

#define OO_ORIENT_RET_SIZE   6

Definition at line 195 of file multiutil.h.

#define OO_POS_RET_SIZE   9

Definition at line 190 of file multiutil.h.

#define OO_ROTVEL_RET_SIZE   4

Definition at line 210 of file multiutil.h.

#define OO_VEL_RET_SIZE   4

Definition at line 200 of file multiutil.h.

Function Documentation

void add_net_button_info ( net_player p,
button_info bi,
int  unique_id 

Definition at line 1183 of file multiutil.cpp.

void delete_player ( int  player_num,
int  kicked_reason = -1 

Definition at line 862 of file multiutil.cpp.

void fill_net_addr ( net_addr addr,
ubyte address,
ushort  port 

Definition at line 1049 of file multiutil.cpp.

int find_player ( net_addr addr)

Definition at line 431 of file multiutil.cpp.

int find_player_id ( short  player_id)

Definition at line 465 of file multiutil.cpp.

int find_player_no_port ( net_addr addr)

Definition at line 448 of file multiutil.cpp.

int find_player_socket ( PSNET_SOCKET_RELIABLE  sock)

Definition at line 482 of file multiutil.cpp.

char* get_text_address ( char *  text,
ubyte address 

Definition at line 1067 of file multiutil.cpp.

int lookup_ship_status ( net_player p,
int  unique_id,
int  remove = 0 

Definition at line 1156 of file multiutil.cpp.

void multi_apply_ship_status ( net_player p,
button_info bi,
int  locally 

Definition at line 1212 of file multiutil.cpp.

ushort multi_assign_network_signature ( int  what_kind)

Definition at line 105 of file multiutil.cpp.

void multi_assign_player_ship ( int  net_player_num,
object objp,
int  ship_class 

Definition at line 681 of file multiutil.cpp.

void multi_broadcast_stats ( int  stats_code)

Definition at line 1419 of file multiutil.cpp.

int multi_can_end_mission ( net_player p)

Definition at line 1897 of file multiutil.cpp.

int multi_can_message ( net_player p)

Definition at line 1848 of file multiutil.cpp.

float multi_char_to_unit ( float  val)

Definition at line 2975 of file multiutil.cpp.

int multi_create_player ( int  player_num,
player pl,
const char *  name,
net_addr addr,
int  ship_class,
short  id 

Definition at line 728 of file multiutil.cpp.

void multi_create_standalone_object ( )

Definition at line 1569 of file multiutil.cpp.

void multi_display_chat_msg ( const char *  msg,
int  player_index,
int  add_id 

Definition at line 2895 of file multiutil.cpp.

void multi_do_client_warp ( float  frame_time)

Definition at line 1140 of file multiutil.cpp.

int multi_eval_join_request ( join_request jr,
net_addr addr 

Definition at line 1946 of file multiutil.cpp.

void multi_eval_socket_error ( PSNET_SOCKET  sock,
int  error 

Definition at line 1506 of file multiutil.cpp.

void multi_file_xfer_notify ( int  handle)

Definition at line 2327 of file multiutil.cpp.

void multi_find_ingame_join_pos ( object new_obj)
int multi_find_open_netplayer_slot ( )

Definition at line 621 of file multiutil.cpp.

int multi_find_open_player_slot ( )

Definition at line 647 of file multiutil.cpp.

int multi_find_player_by_callsign ( const char *  callsign)

Definition at line 1291 of file multiutil.cpp.

int multi_find_player_by_net_signature ( ushort  net_signature)

Definition at line 537 of file multiutil.cpp.

int multi_find_player_by_object ( object obj)

Definition at line 500 of file multiutil.cpp.

int multi_find_player_by_parse_object ( p_object p_objp)

Definition at line 554 of file multiutil.cpp.

int multi_find_player_by_ship_name ( const char *  ship_name,
bool  inc_respawning = false 

Definition at line 570 of file multiutil.cpp.

int multi_find_player_by_signature ( int  signature)

Definition at line 520 of file multiutil.cpp.

void multi_flush_mission_stuff ( )

Definition at line 2787 of file multiutil.cpp.

void multi_flush_multidata_cache ( )

Definition at line 2778 of file multiutil.cpp.

void multi_free_active_games ( )

Definition at line 1739 of file multiutil.cpp.

void multi_free_server_list ( )

Definition at line 1781 of file multiutil.cpp.

int multi_get_connection_speed ( )

Definition at line 2999 of file multiutil.cpp.

int multi_get_highest_rank ( )

Definition at line 2201 of file multiutil.cpp.

void multi_get_mission_checksum ( const char *  filename)

Definition at line 2921 of file multiutil.cpp.

object* multi_get_network_object ( ushort  net_signature)

Definition at line 220 of file multiutil.cpp.

short multi_get_new_id ( )

Definition at line 3167 of file multiutil.cpp.

ushort multi_get_next_network_signature ( int  what_kind)

Definition at line 168 of file multiutil.cpp.

int multi_get_player_ship ( int  np_index)

Definition at line 599 of file multiutil.cpp.

void multi_handle_end_mission_request ( )

Definition at line 2218 of file multiutil.cpp.

void multi_handle_state_special ( )

Definition at line 2253 of file multiutil.cpp.

void multi_handle_sudden_mission_end ( )

Definition at line 2135 of file multiutil.cpp.

int multi_ignore_controls ( int  key = -1)

Definition at line 2845 of file multiutil.cpp.

int multi_is_builtin_mission ( )

Definition at line 1304 of file multiutil.cpp.

int multi_is_valid_unknown_packet ( ubyte  type)

Definition at line 1563 of file multiutil.cpp.

int multi_kill_limit_reached ( )

Definition at line 2872 of file multiutil.cpp.

void multi_make_fake_players ( int  count)
void multi_maybe_send_repair_info ( object dest_obj,
object source_objp,
int  code 

Definition at line 1551 of file multiutil.cpp.

void multi_maybe_send_ship_status ( )

Definition at line 1242 of file multiutil.cpp.

int multi_message_should_broadcast ( int  type)

Definition at line 1605 of file multiutil.cpp.

int multi_netplayer_flag_check ( int  flags,
int  ignore_standalone = 0 

Definition at line 1486 of file multiutil.cpp.

int multi_netplayer_state_check ( int  state,
int  ignore_standalone = 0 

Definition at line 1433 of file multiutil.cpp.

int multi_netplayer_state_check2 ( int  state,
int  state2,
int  ignore_standalone = 0 

Definition at line 1450 of file multiutil.cpp.

int multi_netplayer_state_check3 ( int  state,
int  state2,
int  state3,
int  ignore_standalone = 0 

Definition at line 1467 of file multiutil.cpp.

active_game* multi_new_active_game ( void  )

Definition at line 1621 of file multiutil.cpp.

server_item* multi_new_server_item ( void  )

Definition at line 1758 of file multiutil.cpp.

int multi_num_connections ( )

Definition at line 1832 of file multiutil.cpp.

int multi_num_observers ( )

Definition at line 1815 of file multiutil.cpp.

int multi_num_players ( )

Definition at line 1799 of file multiutil.cpp.

void multi_pack_orient_matrix ( ubyte data,
matrix m 

Definition at line 1089 of file multiutil.cpp.

int multi_pack_unpack_desired_rotvel ( int  write,
ubyte data,
matrix orient,
vec3d pos,
physics_info pi,
ship_info sip 

Definition at line 4081 of file multiutil.cpp.

int multi_pack_unpack_desired_vel ( int  write,
ubyte data,
matrix orient,
vec3d pos,
physics_info pi,
ship_info sip 

Definition at line 3941 of file multiutil.cpp.

int multi_pack_unpack_orient ( int  write,
ubyte data,
matrix orient 

Definition at line 3677 of file multiutil.cpp.

int multi_pack_unpack_position ( int  write,
ubyte data,
vec3d pos 

Definition at line 3586 of file multiutil.cpp.

int multi_pack_unpack_rotvel ( int  write,
ubyte data,
matrix orient,
vec3d pos,
physics_info pi 

Definition at line 4041 of file multiutil.cpp.

int multi_pack_unpack_vel ( int  write,
ubyte data,
matrix orient,
vec3d pos,
physics_info pi 

Definition at line 3893 of file multiutil.cpp.

void multi_player_ships_available ( int team_0,
int team_1 

Definition at line 2711 of file multiutil.cpp.

int multi_process_restricted_keys ( int  k)

Definition at line 2609 of file multiutil.cpp.

void multi_process_valid_join_request ( join_request jr,
net_addr who_from,
int  ingame_join_team = -1 

Definition at line 2416 of file multiutil.cpp.

int multi_query_lag_status ( )

Definition at line 2392 of file multiutil.cpp.

const char* multi_random_chat_start ( )

Definition at line 376 of file multiutil.cpp.

const char* multi_random_death_word ( )

Definition at line 277 of file multiutil.cpp.

void multi_send_anti_timeout_ping ( )

Definition at line 4171 of file multiutil.cpp.

void multi_server_update_player_weapons ( net_player pl,
ship shipp 

Definition at line 2737 of file multiutil.cpp.

void multi_set_network_signature ( ushort  signature,
int  what_kind 

Definition at line 198 of file multiutil.cpp.

int multi_ship_class_lookup ( const char *  ship_name)

Definition at line 409 of file multiutil.cpp.

int multi_show_ingame_ping ( )

Definition at line 2993 of file multiutil.cpp.

void multi_subsys_update_all ( )

Definition at line 1279 of file multiutil.cpp.

char multi_unit_to_char ( float  unit)

Definition at line 2958 of file multiutil.cpp.

void multi_unpack_orient_matrix ( ubyte data,
matrix m 

Definition at line 1113 of file multiutil.cpp.

void multi_untag_player_ships ( )

Definition at line 1404 of file multiutil.cpp.

active_game* multi_update_active_games ( active_game ag)

Definition at line 1649 of file multiutil.cpp.

void multi_update_valid_missions ( )

Definition at line 3041 of file multiutil.cpp.

void multi_warpout_all_players ( )

Definition at line 2143 of file multiutil.cpp.

void multiplayer_match_target_speed ( net_player p)
ushort netmisc_calc_checksum ( void vptr,
int  len 

Definition at line 252 of file multiutil.cpp.

void remove_ship_status_item ( net_player p,
int  id 

Definition at line 1172 of file multiutil.cpp.

void send_debrief_event ( )

Definition at line 4159 of file multiutil.cpp.

int server_all_filesigs_ok ( )

Definition at line 1389 of file multiutil.cpp.

void server_verify_filesig ( short  player_id,
ushort  sum_sig,
int  length_sig 

Definition at line 1324 of file multiutil.cpp.

void stuff_netplayer_info ( net_player nplayer,
net_addr addr,
int  ship_class,
player pplayer 

Definition at line 664 of file multiutil.cpp.