Commit graph

8223 commits

Author SHA1 Message Date
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
Kp 85129248c9 Combine gr_internal_string0_template VideoOffset updates 2016-02-12 04:02:28 +00:00
Kp 938032e51d Unify gauges draw paths 2016-02-12 04:02:28 +00:00
Kp cc18ad2b68 Fix some -Wshadow warnings 2016-02-12 04:02:28 +00:00
Kp 08de1bbff0 Remove cv_color
It is only ever set to 0 or copied from other canvases.  Set it to zero
everywhere.
2016-02-12 04:02:28 +00:00
Kp f4e1ebb576 Remove unnecessary gr_setcolor calls 2016-02-12 04:02:28 +00:00
Kp 5f073b6546 Avoid reloading cv_color in reticle drawer 2016-02-12 04:02:28 +00:00
Kp 972654c140 Pass color to draw_listed_segments 2016-02-12 04:02:28 +00:00
Kp 9d2659ab26 Pass color to draw_wall_side 2016-02-12 04:02:28 +00:00
Kp 12bd8bce35 Pass color to draw_trigger_side 2016-02-12 04:02:28 +00:00
Kp cc8bed5b95 Pass color to draw_side_edge 2016-02-12 04:02:28 +00:00
Kp 7694fff456 Pass color to draw_seg_side 2016-02-12 04:02:28 +00:00
Kp fd834f0924 Pass color to draw_segment 2016-02-12 04:02:28 +00:00
Kp 8066361076 Pass color to draw_player 2016-02-12 04:02:28 +00:00
Kp 68cf7939a2 Pass color to draw_line 2016-02-12 04:02:28 +00:00
Kp e09a590e6f Pass color to Vline 2016-02-12 04:02:28 +00:00
Kp 76d0e01b6e Pass color to Hline 2016-02-12 04:02:28 +00:00
Kp d08bfc3170 Pass color to g3_draw_sphere 2016-02-12 04:02:28 +00:00
Kp 1b4b6673ee Pass color to g3_draw_poly 2016-02-12 04:02:28 +00:00
Kp a98d553f3e Pass color to must_clip_flat_face 2016-02-12 04:02:28 +00:00
Kp 8c24eaa721 Pass color to g3_draw_line 2016-02-12 04:02:28 +00:00
Kp 6b9a03cf2d Pass color to gr_upoly_tmap 2016-02-12 04:02:28 +00:00
Kp 61821d0b42 Pass color to gr_upoly_tmap_ylr 2016-02-12 04:02:28 +00:00
Kp 36bd39babe Pass color to gr_line 2016-02-12 04:02:28 +00:00
Kp 3c73d44771 Pass color to gr_disk 2016-02-12 04:02:28 +00:00