Kp
9e8ef71157
Replace MALLOC+memset with CALLOC
2013-07-13 02:31:27 +00:00
Skywing
0c10c9db7f
It helps to pass the right length to bind().
...
- Fixes a break with -DIPv6 under Win32.
2013-06-27 01:48:10 +00:00
Kp
5575f9beba
Validate netgame mode index
2013-06-25 02:09:12 +00:00
Kp
2cece43d4b
Fix recvfrom prototype mismatches
...
Win32 uses int* instead of unsigned int*. Fortunately, socklen_t is
defined to the correct type in both cases, so use socklen_t and let the
compiler sort it out.
2013-06-08 17:43:35 +00:00
zico
40efb50a37
Clear Netgame struct each time player enters a new IP in manual join menu
2013-04-22 11:42:41 +02:00
zico
ea8020267a
In restricted game mode check for player callsign and sockaddr at the same time
2013-04-22 11:26:55 +02:00
Kp
8f95f0120d
Use ubyte/const ubyte consistently in multiplayer messaging
2013-03-31 20:42:14 +00:00
Kp
c31f5e8d1f
Remove unused StartNewLevel parameter 'secret_flag'
2013-03-23 20:50:35 +00:00
Kp
a81afea7fe
Rename include/error.h to include/dxxerror.h
...
Avoid conflict with generic system header.
2012-07-07 18:35:06 +00:00
Kp
93a23298ff
Rename D2XMAJORi/D2XMINORi/D2XMICROi to DXX_VERSION_MAJORi/DXX_VERSION_MINORi/DXX_VERSION_MICROi
2013-02-25 01:59:08 +00:00
Kp
5c2d180d0f
Normalize comments and whitespace to match D1X
2013-02-25 01:59:08 +00:00
zicodxx
9d16bf74d3
Fixed some minor HUD-text related issues: For team assignment messages, joining player name would appear; team color assignment in netgame info screen could be wrong due to wrong syntax handling; when rewrapping text messages to specific player, game would not add space behind colon
2013-01-08 11:42:10 +01:00
zicodxx
0a03ea3adc
Moved multi_* declarations to multi.h - patch by Kp
2013-01-03 16:33:57 +01:00
zicodxx
b68e3f430c
Centralized UDP Broadcast function for IPv4 and IPv6 calls - patch by Kp
2013-01-03 16:08:39 +01:00
zicodxx
ba1dcead7c
Moved vers_id.h inclusion to where it is needed - patch by Kp
2012-11-02 18:35:57 +01:00
zicodxx
b0288d8df0
removed MarkerOwner; some code cleaning in that regard
2012-06-10 11:26:29 +02:00
zicodxx
c8680ef789
use size of output buffer for snprintf; on the way changed rebirth-specific song file to dxx-r.sng to respect hog 8+3 file convention
2012-06-01 12:46:03 +02:00
zicodxx
3d10827ca3
Optimization for quaternion structure: Stuffed orientation in shorts and removed figure out segnum by position - saving 10 bytes for each positional update in Multiplayer; Also removed render_type from pdata to save yet another byte
2012-05-26 17:53:07 +02:00
zicodxx
87e9757577
Fixed one more copy/paste issue causeing positional updates relayed to possibly disconnected players
2012-05-26 14:09:03 +02:00
zicodxx
1296f3e3b3
Introduced quaternion functions to replace vector matrix where size matters - created by Florian Feucht; Added option for pdata packets based on quaternion in Multiplayer game; Removed PF_LEVELLING from new player objects to prevent jittering in player banking
2012-05-21 17:06:50 +02:00
zicodxx
70287bfde6
using our own functions for stricmp, strnicmp, strlwr, strupr, strrev with a d_ prefix for all platforms for consistency
2012-05-19 01:36:43 +02:00
zicodxx
2c5176a336
when updating game info also check for player connected status in case we send to everyone
2012-05-16 10:41:15 +02:00
zicodxx
1c8dc35257
Do not allow ports below 1024; More verbosity for udp_open_socket()
2012-05-16 00:59:19 +02:00
zicodxx
d472f592a0
Do not send endlevel packets to disconnected (but still saved) clients
2012-05-15 23:39:24 +02:00
zicodxx
6d3782996c
Fixed some non-critical compiler warnings; Now compiling with -std=c99 -pedantic and fixed warnings (except for editor build) caused by this
2012-05-14 12:20:30 +02:00
zicodxx
b0f34d2b89
fixed copy/paste mistake
2012-04-30 00:38:45 +02:00
zicodxx
4e4f949bc0
fixed improper player disconnecting which might have been caused by endlevel packet
2012-04-23 16:15:19 +02:00
zicodxx
b02060216e
Removed usage of 'oldmaxnet' variable when switching between coop and other game modes which would not be correctly set when coop mode is loaded from a netgame profile; Removed 'MaxNumNetPlayers' variable as already replaced by Netgame.max_numplayers
2012-04-18 11:28:23 +02:00
zicodxx
3a96935748
Further Multiplayer cleanup: moved gobal variable resets from multi_new_game() to proper function calls; added pnum variable to init_player_stats_game() and init_player_stats_new_ship() so these can be set for each player when starting match; added multi_new_level() calls when setting up game as well when trying to join game; cleaned multi_reset_stuff() from variable resetting that happen in general game code; when being dumped from game, made sure no packets are sent during messagebox dispaly; replaced MAX_NUM_NET_PLAYERS by MAX_PLAYERS as it's the same definition
2012-04-15 15:32:48 +02:00
zicodxx
90e41c1c85
When possibly sending player positions prior to firing, do that before messing multibuf; Added more strict sanity checks for outgoing and incoming multi packets; Moved some general game stuff from net_udp_init() to multi_new_game()
2012-04-15 03:05:28 +02:00
zicodxx
f35eba5f04
Fixed some Multiplayer bugs: Reactor invulnerable time did not checked for hours spent in level so reactor would become invulnerable again after 60 minutes; Fixed the fix (heh) for misordered explode/reappear packets; Reset Player_eggs_dropped when initializing new ship so eggs are properly dropped when player disconnects two times without respawning; Cleaned player disconnecting a little bit and made code more straightforward
2012-04-12 02:15:26 +02:00
zicodxx
c3b520b6e2
Immediately relay pdata packets from clients to others which should reduce artificial delay; allow sending of pdata packet when firing if enough time has passed since last update; only answer full game info requests 2 times per second and lite info 8 times per second
2012-03-29 10:16:33 +02:00
zicodxx
4323096cc4
Since the kicked message is shown after player is technically removed from the game we do not know hosts name anymore. Message changed accordingly
2012-03-28 12:09:22 +02:00
zicodxx
02fbfada3a
Unbuffered writing of gamelog.txt has it's own argument and is not triggered by -verbose argument anymore; Also increases verbosity of packet-loss-prevented packets by showing their types when added to queue
2012-01-09 15:21:09 +01:00
zicodxx
de3c04c582
Do not attempt to check for MULTI_PROTO_VERSION when requesting lite_info
2011-11-03 14:26:46 +01:00
zicodxx
2f08947f48
Introduced extra short based on MULTI_PROTO_VERSION for version-independent Multiplayer-compability-check; Changed version to 0.57.2 to make new version checking not cause problems with stable release 0.57.1; Removed old version_major/minor variables from netgame and player structures since DXX handles this independently; Cleaned up old version stuff and copyright messages
2011-11-02 01:04:42 +01:00
Chris Taylor
6eb4629ac2
Fix comparison is always false warning
2011-10-09 20:08:26 +08:00
zicodxx
a5d7454f64
Added wrapper functions dxx_sendto and dxx_recvfrom to collect simple statistics about amount and size of packets sent/received per second; Actually fixed packet scheduling in main UDP frame - was sending more than intended - stupid me
2011-09-21 20:03:46 +02:00
zicodxx
aa165490e6
Streamlined joining, rejoining, disconnecting players and timeouts, getting rid of unwanted rejoin messages and let host remove a player for good without rejoining it via pdata packet to really get rid of lossy or unwanted players; Care for rollover of pkt_num of stored mdata packets
2011-09-21 12:04:10 +02:00
zicodxx
951f3edd80
Reworked Packet Loss Prevention: If an important packet could not be recovered until it timed out, dump player who failed sending/receiving it; Noloss queue can proces spackets until a certain traffic has been reached; In main UDP frame schedule different types of packets depending on PPS to decrease traffic produced in one frame, hopefully preventing too much loss in high-traffic situations; Small code cleanups; Added new dump signal for loss of important packet; When dumping player also disconnect that one in case the dumped player does not accept the signal
2011-09-19 13:01:11 +02:00
zicodxx
a8892bd13a
Added new priority level for MDATA packets to also send them ASAP without the need for an ACK; Streamlined sending multibot and fire packets and on the way artificially and automatically scaling fire rates, energy/ammo usage and damage of weapons in Multiplayer to decrease traffic easy way without changing the Gameplay
2011-09-15 10:45:48 +02:00
zicodxx
0e50a9e7c4
Properly call multi_leave_game() when host leaves multi game to let clients exit smoothly
2011-07-19 11:31:08 +02:00
zicodxx
4367c9a117
Fixed typo in Packets per sec. in GAME_RULES screen; Reduced max amount of games shown on netlist to 900 to reduce RAM usage... as if we'd ever reach this
2011-07-15 11:46:06 +02:00
zicodxx
8a495dab09
When updating netgame hoard game flag used for compability reasons must be removed as it can be set - otherwise screwing up game mode display in netlist menu
2011-07-15 01:34:36 +02:00
zicodxx
c947462c38
Slight improvement for Packet Loss Prevention: Be able to send to 35 packets per call of net_udp_noloss_process_queue() and also let counter only increase if a packet was actually sent, making sure the queue is not stuck on the first 5 packets in the list
2011-07-08 01:23:44 +02:00
zicodxx
dd01f591a6
Fixed object sync for latecoming clients which was broken due to a very, very, VERY stupid mistake...
2011-06-24 13:09:42 +02:00
zicodxx
dd991fbf6b
Got rid of cfile code: Renamed cfile-functions to use PHYSFSX-naming convention, Replaced cfile-macros with proper PHYSFS(X) calls; Introduced PHYSFSX_exists() which can check case-sensitive or case-insensitive to give more flexibility with game content
2011-06-01 09:59:55 +02:00
zicodxx
ea70f3db03
Made netgame setup menu more flexible towards (constant or temporary) changes in available game modes
2011-05-28 12:07:40 +02:00
zicodxx
dadb99bdca
Added multi_send_data_direct to send multibuf to a specific player (i.e. Host<->Client, not Client<->Client); Overhauled kill sending/receiving and computation to rely in host information about game_mode-related variables (team_vector, Bounty_target) which are vital for consistent kill computation; Added function to send/update game_mode-related variables and solve /move command with this as well instead of workaround via updating lite_info
2011-05-25 15:25:13 +02:00
zicodxx
bdeb0a70b4
When restoring Coop setting from netgame profile don't forget to fix max players variable
2011-05-22 20:04:43 +02:00