Commit graph

225 commits

Author SHA1 Message Date
Kp 533f1cb3bb Qualify references to primary weapons 2015-10-18 21:01:18 +00:00
Kp 4585faa461 Cache reference to secondary_ammo 2015-10-10 03:44:14 +00:00
Kp 7034b68357 Manage world time automatically where possible
For all cases where world time nests, use automatic management.  Some
sites disable time in one function and enable it elsewhere.  These are
untouched.
2015-10-09 02:46:09 +00:00
Kp 75104b80f0 Fix operand ordering for team kills
Fixes: 4a0a2b7da5 ("Use team_kills in team games")
2015-10-04 22:30:02 +00:00
Kp 9da2a938d8 Make team_kills signed
Suicides can make kill counts negative.
2015-10-03 22:15:17 +00:00
Kp 4a0a2b7da5 Use team_kills in team games 2015-10-03 22:15:17 +00:00
Kp 9df40a86cb Use uint8 for secondary ammo counts
Maximum non-cheating is 40 missiles, which fits in a signed 8 bit value.
Maximum cheating is 200 missiles, which fits in an unsigned 8 bit value.
2015-10-03 17:17:49 +00:00
zico a96ceb2a46 Enabled multi_do_ranking() for D1X 2015-09-29 11:58:42 +02:00
Kp f9469ffe18 Fix clang warning for powerup caps 2015-09-22 02:28:38 +00:00
Kp 2f927c68f9 Improve support for using exact_type with valptridx 2015-09-15 02:48:04 +00:00
Kp c4a8432081 Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*
The cast provokes a warning on systems that require alignment, so remove
it.  memcpy takes const void* input, so the cast is unnecessary.

Reported-by: MattWatt <https://github.com/dxx-rebirth/dxx-rebirth/issues/119>
2015-09-13 21:02:19 +00:00
zico dcd91636d8 Do not duplicate objects for latecoming players as they will get dups from the host 2015-09-01 19:00:33 +02:00
zico 1aeb8505ee Rearranged some calls of start_time() and stop_time() (+ limited usage to single functions) to make sure time_paused does not go out of balance 2015-08-30 14:04:59 +02:00
Kp fd5d7b800d Move reactor gun loop into calc_controlcen_gun_point 2015-08-26 03:15:10 +00:00
Kp c4118ee014 Improve caching when duplicating items 2015-08-13 03:15:52 +00:00
Kp f15116f2cb Simplify multiplayer sound handling 2015-08-05 02:59:02 +00:00
Kp 2fb03da475 Inline multi_send_endlevel_start secret for D2 2015-08-03 03:11:25 +00:00
Kp 4d8ae44794 Add helper macro DXX_CONSTANT_TRUE 2015-07-29 03:05:28 +00:00
Kp b8cc2f4172 Inline multi_i_am_master 2015-07-25 23:10:46 +00:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp f38e80c053 Use get_local_plrobj to compute reference to object of local player 2015-07-25 23:10:45 +00:00
Kp f00725f740 Use forward-declaration header for player.h 2015-07-25 23:10:45 +00:00
Kp 70c4cc87ab Use forward-declaration header for weapon.h 2015-07-25 23:10:45 +00:00
Kp 61d49de324 Reduce multi_do_effect_blowup stack usage 2015-07-18 21:01:57 +00:00
Kp 8887eeb1c2 Shorten multi_do_ranking 2015-07-18 21:01:57 +00:00
Kp 73fdd59225 Require exact type for valptridx factory 2015-07-13 01:09:36 +00:00
Kp 2e85ccebad Use valptr for multi.cpp 2015-07-12 01:04:21 +00:00
Kp e54b550c59 Pass only vobjptr_t to multi_reset_player_object 2015-07-12 01:04:17 +00:00
Kp 82410f4a8c Treat death by reactor as a suicide 2015-07-05 22:06:12 +00:00
Kp 3ce967ac3d Adjust kill goal progress on suicide
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/94>
2015-07-05 22:06:12 +00:00
Kp 06b453d617 Enable D1 weapon drops 2015-07-02 02:37:55 +00:00
zico cd27af9e41 Made MULTI_POSITION and MULTI_ROBOT_POSITION use quaternion packets to increase precision of powerup drops, robot movement and their firing; Also decreased priority of the first iteration of MULTI_POSITION from 2 to 1 as the first packet does not need to be protected but just serves as a convinient excuse to flush the multi data buffer 2015-06-28 19:20:46 +02:00
Kp fc730cb6b0 Cache multi_do_light side array 2015-06-13 22:42:22 +00:00
Kp 3905f1a668 Enable -Wcast-qual 2015-06-13 22:42:21 +00:00
Kp 1dc0e24f30 Propagate swap_bytes argument for create_shortpos
In every case but one, create_shortpos was called with a constant flag
equal to words_bigendian.  The demo system called it with a constant 0.
Split create_shortpos into create_shortpos_little and
create_shortpos_native.  Use create_shortpos_native for the demo system,
and create_shortpos_little everywhere else.
2015-06-13 22:42:21 +00:00
Kp ce72014e2e Always parse WORDS_BIGENDIAN and !WORDS_BIGENDIAN 2015-06-13 22:42:21 +00:00
Kp 546f361c5f Use valptr for multi highest_valid 2015-06-13 22:42:18 +00:00
Kp 9125ae32cd Make objnum unsigned 2015-06-13 22:42:15 +00:00
Kp 75b72dc8e9 Fix hoard_resources_type -fno-inline build
Fixes: e116e894b0 ("Fix invalid free when hoard data is missing")
2015-06-11 03:06:58 +00:00
zico b09703cd3f Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master 2015-05-30 18:29:59 +02:00
zico b04282e791 Using one global yet independent timeer for homing missiles similar to d_tick instead of having one in each missile object. Also decreased HOMING_TURNING_TIME to 25 FPS base 2015-05-30 18:29:41 +02:00
Kp 3f9d110502 Reverse score order
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/74>
2015-05-29 03:15:48 +00:00
zico 7ba3d1317b Isolated all of the homing code into time-depending condition determined by track_turn_time and added track_turn_tick to make target re-discovery dependent on the individual missile tracking instead of global d_tick_count 2015-05-28 15:22:40 +02:00
Kp 6eb724d872 Reorder flag drop
Suppress message if drop fails
2015-05-28 03:08:40 +00:00
Kp c0eb67a9f1 Use vsegptr in network messages 2015-05-28 03:08:39 +00:00
zico 74b66a7f5a Fixed regression (with kp's help) in multi_do_player_deres which made conditional check for map_objnum_local_to_remote fail for the wrong reasons 2015-05-25 11:48:05 +02:00
Kp 7e3bec43a0 Allow object_none as killer in multi_compute_kill 2015-05-23 22:38:15 +00:00
Kp d5cf0fcd6f Store hoard goal_eclip locally 2015-05-23 04:13:29 +00:00
Kp e116e894b0 Fix invalid free when hoard data is missing
If hoard data is not initialized, hoard_resources_type::reset frees
GameBitmaps[0].data, which is bogus_data instead of nullptr or a valid
pointer.

Fixes: d422e8656a ("Simplify HoardEquipped")
2015-05-23 04:13:29 +00:00
Kp 665a0de228 Fix gcc-4.6 multi build
gcc-4.6 chokes on implicitly converting objptridx_t to short; later gcc
accepts this.  Cast the objptridx_t directly to short to force gcc-4.6
to find the correct conversion operator.
2015-05-22 03:33:20 +00:00