Commit graph

8067 commits

Author SHA1 Message Date
Kp 443b1f2915 Add file/line to valptridx output when available 2016-04-06 03:34:13 +00:00
Kp 5b3a36e6b8 Remove valptridx operator-(P *, A &) 2016-04-06 03:34:13 +00:00
Kp 5dae1e9080 Use range_for for kill_stuck_objects 2016-04-05 01:10:18 +00:00
Kp 6b5bf5a549 Always check for valid cside for wall1
Previously, if the wall0 test failed, the short-circuit effect of
boolean AND allowed the code to skip initializing wall1, even when cside
and its wall_num should have caused wall1 to be non-NULL.  Swap the
order of the tests so that the short-circuit only skips statements that
have no side effects.

Fixes: 0635dbf108 ("Pass trigger &")
2016-04-05 01:10:18 +00:00
Kp f091ffad39 Factor out ogl_draw_vertex_reticle conditional calls 2016-04-05 01:10:18 +00:00
Kp ae722cbb8b Shorten maybe_send_z_move 2016-04-03 17:50:42 +00:00
Kp 1789643480 Remove UserError on unknown MED function
Jayman2000 reports that users who do not update their MED.MNU after
updating to 8b61b9f ("Remove unused symbols") receive an "editor crash"
on startup.  This is not a crash, but instead is poor error handling in
menubar.cpp, which calls UserError instead of ignoring the offending
line.  Calls to UserError are fatal, but do not crash the program.
Replace that call with a con_printf(CON_URGENT) and ignore the line.

Additionally, change the handling for excess menus and for excess menu
items to con_printf+ignore instead of UserError.

Reported-by: Jayman2000 <https://github.com/dxx-rebirth/dxx-rebirth/pull/190>
Fixes: 8b61b9f0db ("Remove unused symbols")
2016-04-03 17:50:42 +00:00
Kp fb6db67d94 Include file+line in UserError output 2016-04-03 17:50:42 +00:00
Kp 34e608e14c Cache kconfig fspacx/fspacy values 2016-04-02 21:26:00 +00:00
Kp f319882e40 Factor out kc_drawinput BM_XRGB usage 2016-04-02 21:26:00 +00:00
Kp 1787a4c2c5 Fix color saturation in kconfig boxes
BM_XRGB doubles its inputs.  35a4736 doubled the inputs explicitly, but
passed them back to BM_XRGB, which doubled them again.  Switch to a
direct call to gr_find_closest_color to skip the second double pass.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/192>
Fixes: 35a4736df0 ("Pass color to gr_urect")
2016-04-02 21:25:59 +00:00
zico ab89dcd366 Reworked 586ba9ff6db85b976f074589c5dd7e2d6ff40cd1: Show player ping along with player kills/scores and made it a toggle for HUD configuration so the player can enable it permanently 2016-03-30 20:09:46 +02:00
zico 649475e3bc Removed subtraction of lifeleft for external_explosion in do_endlevel_sequence as it is already happening in object_mode_one() making the explosion animation play too fast 2016-03-30 14:31:13 +02:00
zico 586ba9ff6d Added ability to show ping on HUD player list (to cycle via F7) 2016-03-30 13:54:21 +02:00
zico 7d83eb1e62 Long overdue update for README files considering officially supported Windows versions 2016-03-30 13:30:47 +02:00
Kp dd3cedff3d Add get_ghost_id for multi_do_reappear
Ghosts use the same ID space as players, so reuse function get_player_id
to fetch the ID after checking.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/182>
Fixes: 9f26e2211e ("Warn on invalid object ID access")
2016-03-20 20:38:54 +00:00
Kp c1503d0e0f Widen scope of player_info preservation 2016-03-19 19:08:11 +00:00
Kp dc70dd61a5 Move gameseq_init_network_players call into LoadLevel
gameseq_init_network_players updates the Players array after loading a
level.  This should always be done, since players may change their
object number across levels.  Move the call into LoadLevel since some
callers failed to do it.
2016-03-19 19:08:10 +00:00
Kp daaad3b049 Factor out 3d interpreter functions 2016-03-19 19:08:10 +00:00
Kp 34417e9b7a Simplify track_goal setup
Fixes: 7cce4e292d ("Fixed up non-NEWHOMER code for testing purposes")
2016-03-19 19:08:10 +00:00
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