Commit graph

8943 commits

Author SHA1 Message Date
Kp 411b623aa7 Move player::net_killed_total to player_info 2016-11-12 18:10:07 +00:00
zico ad638539d6 Setting version number to 0.59.100 for upcoming public BETA. 2016-11-12 16:07:21 +01:00
zico 8258532693 Do not process tracker timeout if we're a client (which doesn't get any ACKs) 2016-11-12 15:56:49 +01:00
zico b508e2a294 Restrict powerup repopulation for Multiplayer as well as sending and processing of inventory packets to NETSTAT_PLAYING consistently. 2016-11-12 15:55:37 +01:00
zico dafd4a69be Fixed and revamped 30f9233b36e9e546a7479fd152331b7b0d689d47: initialize segnum for objects during object syncing only. Should only be required for OBJ_NONE but since net_udp_read_object_packet() does only process changed objects and setting segnum in init_objects() isn't desired, this initialization is applied to all objects (except the host player object) before the sync process. 2016-11-12 15:52:16 +01:00
Kp b19e93cc04 Skip tracking idx in obj_get_signature 2016-11-10 04:22:19 +00:00
Kp 930c4c6a99 Remove write-only variable multi_goto_secret
multi_goto_secret is read only to decide whether to write a new value to
it, but never to change other control flow.
2016-11-10 04:22:19 +00:00
Kp ce193812d8 Reset Omega_charge when loading save games
If loading an pre-v22 save game, or loading any save where the player
died on the secret level, clear Omega_charge instead of retaining
whatever value the prior game used.
2016-11-10 04:22:18 +00:00
Kp 188ef99536 Assert that newly allocated objects are type OBJ_NONE 2016-11-10 04:22:18 +00:00
zico 30f9233b36 Reverted 2e6aa0f081 and partially reverted 7064fcccba to still allow segnum and signature init for multiplayer games, keeping consistency during object sync. 2016-11-08 14:16:26 +01:00
zico 5f21bdd71f In net_udp_game_connect, moved test for dl->gameid above test for timer. In udp_tracker_process_game removed redundant location of IP/Port delimiter, added another byte for termination of sIP, added size checks for sIP and sPort before actully copying them and added failsafe check for reading TrackerGameID. 2016-11-08 13:18:51 +01:00
Kp 1cb04cb64b Merge branch derhass:patches/GLES_GL_extension_unification into master 2016-11-06 19:24:52 +00:00
Chris Taylor 143ed30fee Merging in unification/master, resolving conflict in similar/main/kmatrix.cpp 2016-11-06 14:20:18 +08:00
Chris Taylor 219cf31381 Change joy_*_handler definitions back to macros for no joystick build in response to feedback 2016-11-06 14:04:04 +08:00
Chris Taylor 8a8f11dc89 Include cstdint in common/include/fwd-event.h instead of pstypes.h to only include required uint8_t 2016-11-06 13:44:29 +08:00
Kp 46b1ea8fd5 Give full Omega_charge when omega cannon is granted 2016-11-05 21:22:44 +00:00
Kp e33f298b5f Fix build with max_hats_per_joystick=0
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/258>
2016-11-05 21:22:43 +00:00
Kp 5f6d60bb7c Fix menu.cpp build when max_joysticks=0
menu.cpp always needs SDL.h, but included it only as a side effect of
joy.h including SDL.h.  joy.h only includes SDL.h when max_joysticks!=0.

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/258>
2016-11-05 21:22:43 +00:00
Kp 560cc2aa65 Fix -Wempty-body warnings when max_joysticks=0 2016-11-05 21:22:43 +00:00
derhass 1fe4f1ed67 clean up ogl_extensions.cpp as suggested by vLKp 2016-11-05 19:16:30 +01:00
derhass 551570d29b Unify OpenGL extension handling between OpenGL and OpenGL ES code paths.
Split ogl_get_verinfo() into ogl_tune_for_current() and
ogl_extensions_init(), and consolidate all the OpenGL extension handling
into ogl_extensions.cpp. Unify the code paths for texture anisotropy and
GPU synchronization for OpenGL and OpenGL ES.

Currently, our renderer only uses GLES 1.0, so no real world implementation
will support sync objects for such an old context, but the logic is valid,
and this way, the GLES specific code paths are reduced.

This patch also fixes an issue where the old ogl_get_verinfo() did modify
the texture filtering mode if no anisotropic filter was available. This
was some leftover from the time when the anisotropic filter was a just
a specific CGameConfig.TexFilt mode, and not a separate, orthogonal setting
CGameCfg.TexAnisotropy that it is now.
2016-11-03 21:59:11 +01:00
Kp a0cd8360bc Request v4-mapped v6 addresses instead of native v4 addresses 2016-11-02 03:58:25 +00:00
zico 730879d733 Updated handling of data sent by tracker. Added support for handling ACKs from tracker and Hole punching between game clients via tracker. Changed udp_dns_filladdr to not perform DNS lookup if requested which is used for broadcasts and IPs sent by tracker. Added text display on NETGAMES menu to indicating if a connection is in progress. Fixed issue allowing to select an invalid game on NETGAMES list. Upon cancelling a forming netgame, made sure tracke runregister packet is sent. Added function to verify tracker address to make sure incoming packets originate from expected trtacker address (and port). Slightly improved handling game data from tracker to be less prone to crash if receiving unexpected data. 2016-11-02 04:20:41 +01:00
zico dc46fb9528 Fixed compile-time error of software rendering build. 2016-10-31 11:44:22 +01:00
zico 8bd3eaad4c Fixed misleading indentations. 2016-10-31 11:36:48 +01:00
zico 78ad83a134 Fixed compile-time errors when using use_udp=0. Still some warnings but it builds. 2016-10-31 11:21:59 +01:00
Chris Taylor ca0a012ecb Remove window_exists - can get back from an earlier commit if needed 2016-10-31 16:17:39 +08:00
Chris Taylor 5064a938f9 Change dcx::window track method to assert that w_exists was previously nullptr (for efficiency) 2016-10-31 16:15:20 +08:00
Chris Taylor c5e6ca8a85 Update joy_*_handler definitions for no joystick build to return a window_event_result 2016-10-31 15:38:54 +08:00
Chris Taylor 9511f65a90 Declare some local window_event_result vars later (clarity) 2016-10-31 14:58:34 +08:00
Chris Taylor 21e41b15a9 Use listbox_subfunction_t template for listbox_callback member (for convenience of possible future modification) 2016-10-31 14:35:29 +08:00
Chris Taylor e26d08cd48 Change window_event_result back to a uint8_t with the only forward declaration in fwd-event.h and fix the errors that result. 2016-10-31 10:17:54 +08:00
Kp 1ba67c0d30 Test whether SDL_endian.h provokes -Wuseless-cast warning
derhass reports that SDL on Raspbian provokes a warning from
-Wuseless-cast.  Add a test that will report -Wuseless-cast as unusable
when SDL causes this warning.  Developers on Raspbian will not get the
benefit of -Wuseless-cast, but their build will succeed.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/257>
2016-10-30 18:37:28 +00:00
Kp 52667fae6c Merge branch derhass/patches/ogles-warning-cleanup
derhass reports that OpenGL ES builds warn for unused parameter
`texanis`.  This parameter controls a feature that is not available in
current Rebirth OpenGL ES builds.  Cast the parameter to void to silence
the warning.  Long term, the code ought to be changed to advise the user
when their platform lacks this feature.  In the short term, merge this
fix so that the build will succeed.

https://github.com/dxx-rebirth/dxx-rebirth/pull/256
2016-10-30 18:30:48 +00:00
Kp c73fd378c2 Merge branch derhass/patches/ogles-cast-cleanup
derhass reports that some OpenGL ES code was missed during the
conversion from old-style casts to C++ casts.  Merge the fixes for those
sites.

https://github.com/dxx-rebirth/dxx-rebirth/pull/255
2016-10-30 17:32:01 +00:00
zico 155e054f68 Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master 2016-10-30 03:18:39 +01:00
zico 3db9a8d999 Fixed ping display on HUD (no idea why it was multiplied by 44 - probably copy/paste mistake) 2016-10-30 03:18:15 +01:00
derhass b144badb11 fix old-style casts in the DXX_USE_OGLES code paths 2016-10-29 23:58:28 +00:00
derhass 1c756316cb fix a -Wunused-parameter warning in the DXX_USE_OGLES code path
The `texanis` parameter is not used in OpenGL ES, but in desktop GL.
2016-10-29 23:57:03 +00:00
Kp 458070a080 Add test and fallback for extended identifiers
Extended identifiers are convenient when supported, but derhass reports
that the latest stable gcc on Raspbian stable fails the test for
mandatory extended identifier support.  Replace the Cxx11RequiredFeature
test for extended identifiers with an SConf test to selectively enable
-fextended-identifiers.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/254>
Fixes: a8a41aa2ff ("Move git version into Python class")
2016-10-29 23:16:19 +00:00
Kp 8a2e15e20a Add message for when user disables full map cheat 2016-10-29 23:16:18 +00:00
Kp 57412a21c9 Return vobjptridx from segiter
The segiter code used objptridx because end is signalled by object_none,
and vobjptridx does not allow object_none.  However, the compiler
produces better code if segment_object_range_t returns vobjptridx and
future cleanups are easier if iterating objects_in yields vobjptridx
objects.  Add a special-case override of the normal checking rules, move
the required checks into segiter, and then let segiter break the rules
normally enforced by valptridx.  Add a comment explaining that this
permits unsafe coding and should be done only with a clear understanding
of the responsibilities it brings.
2016-10-29 23:16:18 +00:00
Kp b75a2e4a68 Pass object &to obj_create_copy 2016-10-29 23:16:18 +00:00
Kp d8d7980a00 Simplify load_mine_data_compiled fuelcen iteration 2016-10-29 23:16:18 +00:00
Kp 51a897e6a7 Use range_for for hmp reset_tracks 2016-10-29 23:16:18 +00:00
Kp aabd01c9ad Use range_for in hmp_open 2016-10-29 23:16:17 +00:00
Kp 3fc3cfecf1 Use range_for in key_handler 2016-10-29 23:16:17 +00:00
Kp 5a69c09ec2 Move fuelcen_activate special assignment up
One caller uses fuelcen_activate when segp->special != station_type.
Every other caller passes the type that was already on the segment.
Move the assignment into the one caller that needs it, then remove the
argument.
2016-10-29 23:16:17 +00:00
Kp 65f9fd54f8 Use vcsegptr for build_object_lists 2016-10-29 23:16:17 +00:00
Kp aa58e02337 Add consistency asserts in segment iterator 2016-10-29 23:16:17 +00:00