Commit graph

8047 commits

Author SHA1 Message Date
Kp 27cef20eb3 Move namespace dsx handling to dsx-ns.h 2016-03-19 19:08:10 +00:00
Kp b8f39b024a Move DoMenu into dsx 2016-03-19 19:08:10 +00:00
Kp 797c8b47b2 Move segment_object_iterator_t into segment_object_range_t 2016-03-19 19:08:10 +00:00
Kp fcf59268c9 Use range_for for state.cpp 2016-03-19 19:08:09 +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
Kp 8a09513934 Cache get_local_player in init_player_stats_level 2016-03-18 02:05:16 +00:00
Kp be17cc929d Combine count_number_of_{robots,hostages} into template 2016-03-17 03:34:24 +00:00
Kp 0f35160d55 Shorten gameseq_init_network_players 2016-03-17 03:34:23 +00:00
Kp aaaabfeb31 Fix count of hostages lost
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/186>
Fixes: c0ca1248fd ("Simplify hostage lost message")
2016-03-09 02:18:52 +00:00
Kp 4b4077bab9 Fix template/helper confusion
Sync non-template types to make helper a better match.  Rename helper to
clarify code flow for readers.

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/183>
Fixes: ff67afd440 ("Propagate partial_range up into PHYSFSX_findFiles family")
2016-03-06 18:11:20 +00:00
Chris Taylor 3a6bda287b Update Xcode project file listing (for editing purposes) 2016-03-06 13:05:37 +08:00
Chris Taylor e7c437f7fb Address Clang name lookup issues: lookup descent_version_type enumerations against 'Mission' type instead of from Mission/Mission_path instances 2016-03-06 13:01:41 +08:00
Kp 06ed8865b7 Use ={} for init_all_vertices Vertex_active 2016-03-05 17:26:24 +00:00
Kp 97219697a7 Make check_warn_object_type work without gcc ({}) extension 2016-03-05 17:26:24 +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
Kp 4a5b2c0999 Remove morphing model stub glow_num support
Simplify the code by removing the dead path.
2016-03-04 04:12:35 +00:00
Kp 195c589e3f Move file-local classes into anonymous namespace 2016-03-04 04:12:35 +00:00
Kp 0ff78c5475 Fix incorrect index in MultiLevelInv_Count Stolen_items loop
Fixes: cf512cd368 ("In MultiLevelInv_Count, use range_for for powerup-object and StolenItems loops. Also do not set unwanted objects to 0 in switch cases as this is redundant due to initialization at the beginning of the function.")
2016-03-04 04:12:35 +00:00
zico 49a336b263 Reintroduced the lost HOMING_TURN_TIME division for homing missile acceleration 2016-03-03 19:39:29 +01:00
Kp 254feabd3a Tabs are 4 spaces 2016-03-02 02:52:44 +00:00
Kp 217357711f Move some argument processing to dcx 2016-03-02 02:52:44 +00:00
zico 7cce4e292d Fixed up non-NEWHOMER code for testing purposes 2016-02-29 16:42:49 +01:00
zico 36d22a3998 Added more specific comment on why RespawnTimer is necessary for MultiLevelInv_Repopulate() 2016-02-29 16:35:00 +01:00
zico 8d69b1924b Added a failsafe to randomized player selection in maybe_drop_net_powerup() that will prevent the loop to hang and go with Player_num instead 2016-02-29 16:31:20 +01:00
zico cf512cd368 In MultiLevelInv_Count, use range_for for powerup-object and StolenItems loops. Also do not set unwanted objects to 0 in switch cases as this is redundant due to initialization at the beginning of the function. 2016-02-29 16:13:48 +01:00
zico d5c11c42e4 In multi_prep_level_player() declared i as loop-local 2016-02-29 16:04:44 +01:00
zico e47a1f3d91 Turned drop_playerobj in chrose_drop_segment() into reference 2016-02-29 15:58:36 +01:00
Kp 95ab6076a4 Move FakingInvul to player_info
Every player can fake invulnerability independently.  In preparation for
host tracking, store FakingInvul as a player property, not a static
global.
2016-02-27 19:02:21 +00:00
Kp 788ed1bd70 Compact laser firing code 2016-02-27 19:02:21 +00: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
Kp ea8ca1d1e2 Pass update_flicker timer as argument
Clang fails to compile update_flicker<0x80000000>(...); gcc handles it
properly.  A template is not necessary here, so switch to passing the
value as an argument.  Both compilers accept this.

Reported-by: kreatordxx <private mail>
Fixes: 5b9ccda8e8 ("Simplify update_flicker")
2016-02-25 02:36:40 +00: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 401f5581c8 Remove guessed -lSDL on OS X
OS X handles linking differently than other platforms.  Asking to link
to SDL breaks the test.
2016-02-23 04:18:13 +00:00
Kp 42ef6b2e72 Add applelink to Darwin tools 2016-02-23 04:18:13 +00:00
Kp c26a688af5 Unify tmap storage branches 2016-02-20 17:28:11 +00:00
Kp d5a12ba5af Cache afterburner bar temporaries 2016-02-20 17:28:11 +00:00
Kp 0bf60e5661 Hide bogus demo cloak/invul timers
Demo files do not record cloak/invulnerability times, so the playback
code sets a fake time of "50% elapsed" for the entire time that the
effect is active.  This causes two problems in playback.  The first,
which always applied, but was mostly ignored, is that the viewer does
not get the blinking warning that the effect will expire soon.  The
second, which became visible with the addition of cloak/invulnerability
digital timers, is that demos always report "15" as the time remaining,
for the entire time that the effect is active.  Old demos cannot be
fixed, so hide the problem by forcing the timers to be hidden when
viewing a demo.
2016-02-20 17:28:11 +00:00
Kp c3003fbb22 Fix vulcan ammo display
Do not abuse `f2i` to shift an unsigned quantity.  `f2i` is defined to
work on `fix`, which is `int`.
2016-02-20 17:28:11 +00:00
Kp 3c20c24ac0 Disable piggy_bitmap_page_out_all 2016-02-20 17:28:11 +00:00
Kp 1a4290002e Revert partial_const_range for HMP get_event
Fixes: b57f08c798 ("Use partial_const_range")
2016-02-17 03:34:30 +00:00
zico 0215759746 Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master 2016-02-15 13:05:38 +01:00
zico 4ef50976ed Revised a055aecee5. Removed secondaries cap for Multiplayer but restared for Singleplayer (for gameplay/balance). Limit could be restored for Multiplayer if levels were otherwise properly repopulated (planned) 2016-02-15 13:05:17 +01:00
Kp 90de22b2a5 Fix invalid access reading demos
Fixes: 74dfa29d31 ("Convert most Trigger references to valptridx")
2016-02-14 18:40:57 +00:00
Kp e36abb25cb Fix invalid access reading demos
Casting the address of a short to `sbyte*` invites trouble.  In this
case, it allows uninitialized garbage to be used as the high bits of the
wall index.

Fixes: 553b313099 ("Use vwallptr")
2016-02-14 18:40:57 +00:00
zico 081e5d5e3c Removed rounding offset of x starting coordinate in ogl_ulinec which should hopefully unwanted horizontal offsets in Status Bar energy and afterburner gauges (without causing more problems) if Multisampling is applied 2016-02-14 13:59:02 +01:00
zico a055aecee5 Apply count cap in maybe_drop_secondary_weapon_egg to bombs only 2016-02-14 12:49:45 +01:00
zico ed25a5c38d Eliminate frame dependent damage with blast weapons - as seen in DXX-Retro 532f271af26d6341563d3763d5bb2dce33de7582 2016-02-14 12:15:30 +01:00
Kp 6091b65707 Move score to screen edge for CM_FULL_SCREEN
The score is moved in from the edge to avoid overlapping the cockpit
graphic, but the move was applied even when no cockpit was shown.
Change it to align the score when running without the cockpit graphic.

Reported-by: roncli <https://github.com/dxx-rebirth/dxx-rebirth/issues/175>
2016-02-12 04:02:28 +00:00
Kp 6edab5ca0a Pass cv_font to get_centered_x 2016-02-12 04:02:28 +00:00
Kp a92ab4079f Cache font extent while drawing 2016-02-12 04:02:28 +00:00