Commit graph

3040 commits

Author SHA1 Message Date
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
Chris Taylor 143ed30fee Merging in unification/master, resolving conflict in similar/main/kmatrix.cpp 2016-11-06 14:20:18 +08:00
Kp 46b1ea8fd5 Give full Omega_charge when omega cannon is granted 2016-11-05 21:22:44 +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 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 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 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
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
Kp 8a2e15e20a Add message for when user disables full map cheat 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 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 e95db4c269 Fold move_away_from_player switch cases 2016-10-29 23:16:17 +00:00
Kp 33bba1fa61 Map boss-gated robots across players 2016-10-29 23:16:16 +00:00
Kp 2b9a86abe3 Factor out buddy hints about invulnerable boss 2016-10-29 23:16:16 +00:00
Kp 57196e8f9f Look up robot type in multi_send_boss_create_robot 2016-10-29 23:16:16 +00:00
Kp c45e441ecd Move map_objnum... into multi_send_boss_create_robot
Whenever a robot is sent to peers, it needs to be added to the local
mapping also.  Move the one use so far into multi_send_boss_create_robot
to simplify maintenance.
2016-10-29 23:16:16 +00:00
Kp c4cfe54010 Return literal object_none on object_none error path
gcc generates better code for:

	if (variable == magic_constant)
		return magic_constant;

than it does for:

	if (variable == magic_constant)
	    return variable;

even though the two have the same result.  Switch to the form which
generates slightly better code.
2016-10-29 23:16:15 +00:00
Kp 3081e69536 Pass grs_main_bitmap to gr_init_bitmap_alloc 2016-10-29 23:16:15 +00:00
Kp 19fd79d8ae Shrink cockpit_decode_alpha::cockpitbuf 2016-10-29 23:16:15 +00:00
Kp 499d0fbe6c Remove excess Players elements
This was present in the Descent 2 source release with no explanation and
no apparent purpose.  Its presence complicates various loops, so remove
it.
2016-10-29 23:16:14 +00:00
Chris Taylor 7ac820248c Use new event_process_all() for event loops that check for window_event_result::deleted (which is most of them) 2016-10-29 20:06:01 +08:00
Chris Taylor a62ca93498 Use a tracking variable for newmenu_do2 (and simpler) polling loop
Add 'track' method to dcx::window, which takes a bool and will set it to 'false' when the window closes. Use for newmenu_do2 and simpler newmenu_do's, since there's the possibility of another window without its own polling loop opening on top - meaning window_event_result::deleted would be returned for that window, not the one we're polling on.
2016-10-28 16:49:53 +08:00
Chris Taylor 54dbe586ee Check for window_event_result::deleted for do_briefing_screens polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:45:40 +08:00
Chris Taylor f1548e075e Check for window_event_result::deleted for show_title_screen polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:40:50 +08:00
Chris Taylor 49ce8dbb99 Check for window_event_result::deleted for gamebitmaps_viewer polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:30:58 +08:00
Chris Taylor 731777476f Check for window_event_result::deleted for polygon_models_viewer polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:29:14 +08:00
Chris Taylor b2513ab9a0 Check for window_event_result::deleted for kmatrix_view polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:27:45 +08:00
Chris Taylor 7f7047063a Check for window_event_result::deleted for credits polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:23:36 +08:00
Kp 4faca3012c Pass player_info to do_cloak_invul_secret_stuff 2016-10-28 03:39:42 +00:00
Kp adaa596672 Cache player object in DoEndLevelScoreGlitz 2016-10-28 03:39:42 +00:00
Kp d5d4517712 Pass player object to init_ammo_and_energy 2016-10-28 03:39:42 +00:00
Kp df8f93d63e Cache player object in FinalCheats 2016-10-28 03:39:41 +00:00
Kp c8dda073ca Pass player object to transfer_energy_to_shield 2016-10-28 03:39:41 +00:00
Kp 98839d1af6 Pass player position to automap_apply_input 2016-10-28 03:39:41 +00:00
Kp 65b649bc75 Pass player_info to ai_do_actual_firing_stuff 2016-10-28 03:39:41 +00:00
Kp ca8fa9c3b6 Pass player_info to ai_move_relative_to_player 2016-10-28 03:39:41 +00:00
Kp c31424dd3b Pass player_info to do_invulnerable_stuff 2016-10-28 03:39:41 +00:00
Kp c8801f73ad Fold piggy_new_pigfile calls to gr_remap_bitmap_good 2016-10-28 03:39:40 +00:00
Kp 1c5718ba11 Fold read_extra_bitmap_iff call to gr_remap_bitmap_good 2016-10-28 03:39:40 +00:00