Commit graph

225 commits

Author SHA1 Message Date
Kp 271146e84f Factor out net_udp_flush loop 2016-04-23 17:59:46 +00:00
Kp fc3e488d81 Remove unnecessary write in RAIIsocket::reset 2016-04-23 17:59:46 +00:00
Kp 20e72128de Add configure test and fallback code to support ancient Windows
Windows 2000 has no support for getaddrinfo.  Five years ago (Apr 5
2011), the addition of tracker support
(7f18afd5d7) brought a requirement for
getaddrinfo.  Recently, someone with a working Windows 2000 system
reported that Rebirth no longer starts on Windows 2000.  Although such
systems should not be connected to the Internet, they may still need
name resolution on a LAN.  Add a configure test to probe for getaddrinfo
support and fall back to gethostbyname if needed.

Compiling a binary that works on Windows 2000 requires one of:
* using an ancient SDK that does not declare getaddrinfo
* defining _WIN32_WINNT to exclude Windows XP support
* overriding the SConf test to force failure

Fixes: 7f18afd5d7 ("Client-side implementation for Tracker support by Matt 1360 Vandermeulen including improvements in udp_dns_filladdr and IPv4/IPv6 compability; Very little adjustments by me, too including IPv6 support for Windows (untested); Actual tracker code will follow later as seperate branch when it's done")
2016-03-18 02:05:16 +00:00
zico 57c33695e6 Do not read pdata packets while the level isn't loaded and try not to send packets to players in these states. 2016-03-05 12:05:43 +01:00
zico 901a554e96 New powerup management code: Addeed functions and packet type to keep track of original and current level inventory as well as player and thief inventories. Calling maybe_drop_net_powerup() for all ammo based weapons except Concussion missiles. Limiting maybe_drop_net_powerup() to only spawn items missing from initial level inventory. Added function to let host respawn items that were lost for whatever reason. Expanded maybe_drop_net_powerup() and child functions to be able to drop item based on a random player. Changed back maybe_drop_secondary_weapon_egg() to its original behavior, dropping 3 of each type max. 2016-02-25 14:11:08 +01:00
zico 2e6aa0f081 Took out obj_unlink() call in net_udp_read_object_packet(). As of 7064fcccba obj->segnum is undefined and obj_unlink() would be called for undefined objects, causing some new objects to not appear for rejoining players. Since init_objects() is called beforehand and host should not be able to send the same object twice, this whole call should be unnecessary to begin with. 2016-02-23 14:25:17 +01:00
Kp 553b313099 Use vwallptr 2016-02-12 04:02:28 +00:00
Kp 2fd6a425b0 Remove highest_valid 2016-02-12 04:02:28 +00:00
Kp b57f08c798 Use partial_const_range 2016-02-12 04:02:28 +00:00
Kp 74dfa29d31 Convert most Trigger references to valptridx 2016-02-06 22:12:54 +00:00
Kp 0d1dd636ca Move extraAccessory into if(D2)
It is only used in D2, so do not use the space when compiling D1.
2016-02-02 03:10:53 +00:00
Kp 124a2ee09c Move net_udp.cpp specific defines out of header 2016-01-26 03:45:06 +00:00
Kp 7386094bc3 Rename menu macros to reduce token pasting 2016-01-09 16:38:17 +00:00
Kp 2b34547b05 Remove redundant DXX_UDP_MENU_OPTIONS(ENUM) 2016-01-09 16:38:17 +00:00
Kp 079c4d8b5c Move netgame setup strings to param_opt 2016-01-09 16:38:15 +00:00
Kp bc392aaaf3 Move net_udp start_poll data onto stack 2016-01-09 16:38:15 +00:00
Kp 823ff63126 Move MplTrackerAddr to CArg 2015-12-24 04:01:29 +00:00
Kp 0b87ff267f Move MplTrackerPort to CArg 2015-12-24 04:01:29 +00:00
Kp 3f9f1f2b49 Move MplUdpMyPort to CArg 2015-12-24 04:01:29 +00:00
Kp 56e77d4fec Move MplUdpHostPort to CArg 2015-12-24 04:01:28 +00:00
Kp 4f14be6056 Move MplUdpHostAddr to CArg 2015-12-24 04:01:27 +00:00
Kp e8c34be843 Use v*ptr* factories with highest_valid 2015-12-22 04:18:51 +00:00
zico 2e6dae1d8b Abbreviated some text strings to make menus fit better into a 4x3 game window. 2015-12-14 15:32:42 +01:00
Kp 708dc0a7e1 Use vobjptr/vcobjptr for more Objects[] access 2015-12-03 03:26:49 +00:00
Kp b683b4cc68 Scope weapon type 2015-12-03 03:26:49 +00:00
Kp f72e739732 Defer initializing UDP bind address 2015-11-26 02:56:55 +00:00
Kp 82d0c2ed96 Make some implicit uses of ptridx construction explicit 2015-11-19 03:23:34 +00:00
Kp 6b353cb9ac Move player powerup_flags to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp 731e287329 Clean up trailing whitespace on rank strings 2015-10-30 02:52:55 +00:00
Kp 070444157e Use type safe player flags 2015-10-30 02:52:55 +00:00
Kp 7ac2840bfe Rename Netgame.player_flags to .net_player_flags
The simple name conflicts with an upcoming change.
2015-10-30 02:52:54 +00:00
Kp ea3c4a8986 Switch const multi text to array<> 2015-10-29 03:01:43 +00:00
Kp 78de0ac119 Add fwd-event.h with forward declarations of event.h 2015-10-09 02:46:10 +00:00
Kp aa1a1c5a6a Fix regressions from changes to advanced host menu
Non-static globals were initialized at wrong scope, leading to netgame
duplicate options being forgotten across program restart.
Netgame.DuplicatePowerups is not initialized until well after global
initialization runs.

Literal strings were copied into a local buffer.  Replace with a pointer
to the appropriate literal string.

Fixes: aa9a5df0d4 ("Rearrange Advanced Hosting Menu")
2015-10-03 17:17:49 +00:00
Christian ab85c6f0e9 Merge pull request #144 from Mako88/new-menu
Rearrange Advanced Hosting Menu (by Mako88/A Future Pilot)
2015-09-29 13:41:12 +02:00
Kp d9cef82f81 Allow nullptr for gr_get_string_size 2015-09-29 02:41:22 +00:00
Kp 71ffbdf719 Replace fill(0) with ={} 2015-09-29 02:41:22 +00:00
John Ackerman 0e73b2a209 Revert "Change friendly fire wording"
This reverts commit 8128d68e3d.
2015-09-27 12:40:14 -05:00
John Ackerman 8128d68e3d Change friendly fire wording 2015-09-25 16:52:41 -05:00
John Ackerman aa9a5df0d4 Rearrange Advanced Hosting Menu 2015-09-25 15:31:42 -05:00
Kp c0e7f70638 Update reactor life text as slider moves
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/125>
2015-09-22 02:28:38 +00:00
Kp 155cd3c928 Remove literal snprintf 2015-09-19 23:04:35 +00:00
zico 41983dc051 Reworked Advanced Netgame Menu to fit on all possible resolutions and added tracker address to seperate line as newmenu does not really like \n (yet) 2015-09-17 13:55:19 +02:00
Kp 1cdd4ac2ce Pass object & to [gs]et_*_id 2015-09-15 02:48:04 +00:00
Kp c4a8432081 Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*
The cast provokes a warning on systems that require alignment, so remove
it.  memcpy takes const void* input, so the cast is unnecessary.

Reported-by: MattWatt <https://github.com/dxx-rebirth/dxx-rebirth/issues/119>
2015-09-13 21:02:19 +00:00
zico 4a562bf098 Added multi_send_theif_frame() function to update thief bot more frequently (by PPS) and even if it is not controlled by a player to counter discrepancies caused by client side AI movement of the bot 2015-09-03 15:13:56 +02:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp f38e80c053 Use get_local_plrobj to compute reference to object of local player 2015-07-25 23:10:45 +00:00
Kp 73fdd59225 Require exact type for valptridx factory 2015-07-13 01:09:36 +00:00
Kp 78f7d1e3a6 Use valptr for net_udp.cpp 2015-07-12 01:04:21 +00:00