Kp
fe360b18e3
Implement secluded spawns
2015-07-04 21:01:18 +00:00
Kp
8f46fb3ae6
Move net_udp_more_options into class
2015-07-04 21:01:17 +00:00
Kp
f458e5ad62
Defer rule masking into helper
2015-07-02 02:37:55 +00:00
Kp
108d22fc80
Avoid remultiplying netgame info y
2015-06-21 22:30:28 +00:00
Kp
8600fb9fcb
Rework rule display
2015-06-21 22:30:28 +00:00
Kp
4bcec0c578
Factor out netgame info base y
2015-06-21 22:30:27 +00:00
Kp
2a62fa7d78
Make Spawn invulnerability a slider in 0s-4s
2015-06-13 22:42:22 +00:00
Kp
a64a08fd6c
Raise kill goal limit to 100
2015-06-13 22:42:22 +00:00
Kp
ce72014e2e
Always parse WORDS_BIGENDIAN and !WORDS_BIGENDIAN
2015-06-13 22:42:21 +00:00
Kp
2d70cd65ea
Cache font space results
2015-06-13 22:42:20 +00:00
Kp
78f6dc29a6
Cache font scale Y float
2015-06-13 22:42:20 +00:00
Kp
5573ed6bea
Cache font scale X float
2015-06-13 22:42:20 +00:00
Kp
4a8f836a3d
Use valptr for net_udp highest_valid
2015-06-13 22:42:18 +00:00
Kp
6792c1bc4b
Enable -Wunused-parameter
2015-04-26 20:15:56 +00:00
Kp
b46ecbb3e9
Add netgame parameter to duplicate powerups
2015-04-19 04:18:53 +00:00
Kp
4381b81497
Pack spawn granted items in D1
2015-04-19 04:18:53 +00:00
Kp
c338862ad6
Reduce gauges.h includes
2015-04-19 04:18:51 +00:00
Kp
29a57b0dc0
Remove unused net_udp parameters
2015-04-19 04:18:49 +00:00
zico
17f5f67948
Fixed regression from 2645d41b5f
- must use UDP_MDATA_STOR_QUEUE_SIZE for UDP_mdata_trace as it it a looping list
2015-04-18 22:15:52 +02:00
zico
03f9f11b6d
Reworked net_udp_noloss_validate_mdata() to properly REsend MDATA ACK for packets that have been received before
2015-04-18 15:00:24 +02:00
Kp
1c7bae4fc4
Use local array<> for object_buffer
2015-04-02 02:36:57 +00:00
Kp
90fbebf8fd
Convert most global arrays to array<>
2015-04-02 02:36:52 +00:00
Kp
598a5e42a2
Allow granting items at player spawn
2015-03-28 17:18:02 +00:00
Kp
7ecb605a58
Combine tracker message formatting
2015-03-28 17:18:01 +00:00
Kp
12b5d6c94e
Stringize packets per second limits
2015-03-28 17:18:01 +00:00
Kp
99e4fedcd3
Guard kernel_accepts_extra_sockaddr_bytes in defined(IPv6)
2015-03-26 02:42:26 +00:00
Kp
7bf49fe551
Fix clang -Wmissing-braces warnings
2015-03-22 18:49:21 +00:00
Kp
9ddea5f570
Reduce lifetime of Args
2015-03-22 18:49:20 +00:00
Kp
dcb2fc6524
Factor out UDP broadcast lookup
2015-03-07 17:20:41 +00:00
Kp
81eae187e5
Pass selection for EVENT_NEWMENU_CHANGED
2015-02-28 22:34:07 +00:00
Kp
cc508be34c
Pass selection for EVENT_NEWMENU_SELECTED
2015-02-28 22:34:07 +00:00
Kp
335780758b
Remove unused DXX_*_INPUT argument MAX_TEXT_LEN
2015-02-28 19:36:02 +00:00
Kp
1580a274f2
Use array<> for net_udp buffers
2015-02-28 19:36:01 +00:00
zico
390d1746a5
Fixed conditions so positional data are not sent before the level is loaded.
2015-02-22 18:04:37 +01:00
zico
600d9b8685
Removed conditions for Endlevel_sequence in Multiplayer as it is not set - except for multi data where it was rather governed by NETSTAT_ENDLEVEL
2015-02-22 17:31:06 +01:00
zico
afd70564e5
Gave client address as player_address for all UPID_SYNC packets so clients can properly discover their player number when (re)joining running games. Defined 0xcc as MULTI_PNUM_UNDEF for purpose of uninitialized Multiplayer client slots.
2015-02-22 01:41:02 +01:00
zico
eef3dc03a7
Due to flexible size of game/lite info packets only check for maximum size of these packets
2015-02-21 18:21:34 +01:00
Kp
bbb9a23697
Convert {GET,PUT}_INTEL_{SHORT,INT} to C++ casts
2015-02-14 22:48:29 +00:00
Kp
dc8b88eed4
Convert various loops to range_for
2015-02-14 22:48:27 +00:00
Kp
a64bce8e26
Add workaround for clang crash compiling net_udp.cpp
...
Compiling net_udp.cpp with clang-3.4 crashes the compiler when parsing
a decltype that refers into the class currently being compiled. Parsing
a decltype that refers to a parent class works. Rearrange the decltype
usage to avoid referencing the current class. This makes the code
harder to read and less flexible, but prevents clang from crashing.
Clang self trace:
1. <eof> parser at end of file
2. similar/main/net_udp.cpp:317:8: instantiating function definition 'operator()'
3. similar/main/net_udp.cpp:317:8: LLVM IR generation of declaration '(anonymous namespace)::sockaddr_dispatch_t<(anonymous namespace)::dxx_recvfrom_t>::operator()'
4. similar/main/net_udp.cpp:317:8: Mangling declaration '(anonymous namespace)::sockaddr_dispatch_t<(anonymous namespace)::dxx_recvfrom_t>::operator()'
[Update: also affects OS X clang v6, as reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/35#issuecomment-73350066 ]
2015-02-07 20:28:09 +00:00
Kp
99a4a0ed62
Capture range_for by-value temporaries as const
...
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug. Require use of a by-reference
capture when modification is desired.
sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp
3045f0fbe0
Use MSG_DONTWAIT when available
2015-02-05 03:03:48 +00:00
Kp
ae0a00a893
Return timer_query() from timer_update()
...
Most timer_update sites immediately query the timer, so return it to
save them the call.
2015-02-05 03:03:48 +00:00
Kp
ffa1efc468
Rework net_udp_process_pong
...
Fix order of parameter validation. Remove useless test on constant i.
Handle out of range delta.
2015-02-05 03:03:48 +00:00
Kp
b8d4d6d245
Move strings to end of info
2015-02-03 00:37:08 +00:00
Kp
c256af92af
Fix off-by-one ntstring copying
2015-02-01 23:50:02 +00:00
Kp
156e59a094
Unify Windows/non-Windows socket creation
2015-02-01 23:50:02 +00:00
Kp
faa2493e74
Validate UDP host port
2015-02-01 23:07:18 +00:00
Kp
6bc48b7876
Add option -no-tracker to suppress tracker for one run
2015-01-24 19:16:35 +00:00
Kp
4b2b4e0ef9
Add missed format of UDP_MyPort
...
Fixes: 9ccc5400fb
("Refactor UDP_MyPort handling")
2015-01-24 19:16:34 +00:00
Kp
40fd988a0f
Hide local classes in anonymous namespaces
2015-01-23 03:55:06 +00:00
zico
48f9390bbe
Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master
2015-01-22 13:58:18 +01:00
Kp
6f15e46512
Use separate type for general purpose sockaddr
2015-01-18 01:58:34 +00:00
Kp
4f6b5dff04
Fix memory corruption resolving IPv6 address without IPv6 support
2015-01-18 01:58:34 +00:00
Kp
74bcaa3c55
Abstract net_udp_send_game_info sockaddr dispatch
2015-01-18 01:58:34 +00:00
Kp
be59631c5f
Abstract net_udp_request_game_info sockaddr dispatch
2015-01-18 01:58:33 +00:00
Kp
c4ed01ff5c
Skip useless comparisons preparing netgame info
2015-01-18 01:58:33 +00:00
Kp
3b8c9e8724
Abstract recvfrom sockaddr dispatch
2015-01-18 01:58:33 +00:00
Kp
c8022a1001
Abstract socket array/sockaddr dispatch
2015-01-18 01:58:33 +00:00
Kp
370434855a
Reorder dxx_recvfrom args
2015-01-18 01:58:33 +00:00
Kp
40d1068fb4
Reorder dxx_sendto args
2015-01-18 01:58:33 +00:00
Kp
37afbb1f7e
Pack ntstrings in transit
2015-01-18 01:58:32 +00:00
Kp
c6664a45a6
Add newmenu_do helper for array<newmenu_item, N>
2015-01-18 01:58:32 +00:00
Kp
6e0464a58c
Pass nm_set_item_slider arg by &
2015-01-18 01:58:32 +00:00
Kp
426fb16654
Pass nm_set_item_radio arg by &
2015-01-18 01:58:31 +00:00
Kp
fa10e51999
Add helper nm_item_text
2015-01-18 01:58:31 +00:00
Kp
4705c3f2d8
Pass nm_set_item_checkbox arg by &
2015-01-18 01:58:31 +00:00
Kp
f8163957ef
Add helper nm_item_input
2015-01-18 01:58:31 +00:00
Kp
67e503b9b7
Add helper nm_item_menu
2015-01-18 01:58:31 +00:00
Kp
249534c669
Short circuit net_udp_process_monitor_vector
2015-01-18 01:58:30 +00:00
Kp
63353ae4ad
Factor out net_udp_create_monitor_vector bitmap array
2015-01-17 18:31:42 +00:00
Kp
28a31a223f
Centralize window_close calls
2015-01-17 18:31:41 +00:00
Kp
c2b7990550
Pass window_get_canvas arg by &
2015-01-17 18:31:40 +00:00
Kp
b6a3735f53
Add convenience d_strnicmp for literal right side
2015-01-12 00:26:03 +00:00
Kp
6a872da54a
Pass UDP socket by &
2015-01-03 23:44:32 +00:00
Kp
d5d416c62c
Use ntstring for Netgame.mission_name
2015-01-03 23:44:32 +00:00
Kp
bd9513b080
Fix sending uninitialized bytes in light request
2014-12-30 02:09:21 +00:00
Kp
fbac119095
Propagate use of objptridx_t
2014-12-23 04:20:27 +00:00
Kp
ac1340e3c9
Use ntstring for mission_name
2014-12-22 04:35:48 +00:00
Kp
03370ed3e5
Use ntstring for Netgame.mission_name
2014-12-22 04:35:48 +00:00
Kp
e166846dd1
Use ntstring for Netgame.game_name
2014-12-22 04:35:48 +00:00
Kp
0c8191db94
Fix player clear range
2014-12-07 00:49:18 +00:00
Kp
a0727f4f84
Throw on net_udp_read_sync_packet failure
...
Callers expect sane Player_num, but on failure, it is invalid.
Returning a failure status causes net_udp_level_sync to fault using
Players[Player_num].connected, so throw an exception instead.
2014-12-07 00:00:22 +00:00
Kp
2b627f0158
Pass net_udp buffers as const
2014-12-06 23:59:34 +00:00
Kp
9d700aab08
Make kill_matrix uint16_t, not short
2014-12-06 23:30:55 +00:00
Kp
cfe0f89dae
Use array<> for team_kills
2014-12-06 04:52:53 +00:00
Kp
a55028d5b4
Fix crash on UDP initialization
2014-12-06 02:16:28 +00:00
Kp
f206b3b127
Reduce inclusion of object.h
2014-11-23 04:36:58 +00:00
Kp
2c349136cc
Avoid slicing into segnum_t local
2014-11-20 03:00:36 +00:00
Kp
60837a7cfb
Fix -fno-inline build by promoting INVALID_SOCKET to global scope
2014-11-02 17:05:10 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
bbba6255ab
Use RAIIsocket for UDP_Socket[]
2014-10-21 02:37:00 +00:00
Kp
2645d41b5f
Convert net_udp to range_for
2014-10-19 03:54:18 +00:00
Kp
62dc7a874f
Pass sockaddr by const &, not value
2014-10-18 23:37:34 +00:00
Kp
54f635c5cc
Use operator== to compare sockaddr
2014-10-18 23:20:39 +00:00
Kp
486707a9ef
Fix argument to net_udp_send_mdata_direct
...
Use argument, not global
2014-10-17 02:23:40 +00:00
Kp
7c76c68255
Make unused_newmenu_userdata_t const
2014-10-16 02:13:09 +00:00
zico
cc785a991c
Update timer in net_udp_do_frame and net_udp_process_pong to make sure we don't cause artificial delays
2014-10-13 02:18:10 +02:00
Kp
7f648c0f5f
Wrap segment iteration idiom
2014-10-12 23:10:05 +00:00
Kp
fb641b3250
Wrap object iteration idiom
2014-10-12 23:05:46 +00:00