Commit graph

86 commits

Author SHA1 Message Date
Kp e8c34be843 Use v*ptr* factories with highest_valid 2015-12-22 04:18:51 +00:00
Kp d479819931 Use absolute_sibling to reduce global references for ptridx 2015-12-22 04:18:51 +00:00
Kp 708dc0a7e1 Use vobjptr/vcobjptr for more Objects[] access 2015-12-03 03:26:49 +00:00
Kp b683b4cc68 Scope weapon type 2015-12-03 03:26:49 +00:00
Kp 31d538ebe2 Use helper for robot weapon type 2015-12-03 03:26:48 +00:00
Kp 0c75aecc45 Check most uses of object id 2015-11-27 03:56:13 +00:00
Kp edc4015c97 Compute Boss_cloak_end_time as needed 2015-11-19 03:23:34 +00:00
Kp 1cdd4ac2ce Pass object & to [gs]et_*_id 2015-09-15 02:48:04 +00:00
zico 6ba89b5abd If sending robot fire of a non-controlled robot, send fire packet immediately (as the comment suggests); also reformatted robot fire send/do functions to improve readability a bit 2015-09-10 13:05:10 +02:00
zico 4a562bf098 Added multi_send_theif_frame() function to update thief bot more frequently (by PPS) and even if it is not controlled by a player to counter discrepancies caused by client side AI movement of the bot 2015-09-03 15:13:56 +02:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp f00725f740 Use forward-declaration header for player.h 2015-07-25 23:10:45 +00:00
Kp 09f095a225 Use valptr for multibot.cpp 2015-07-12 01:04:21 +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 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 71e7432290 Use valptr for multibot highest_valid 2015-06-13 22:42:18 +00:00
Kp 9125ae32cd Make objnum unsigned 2015-06-13 22:42:15 +00:00
Kp 5124c510f8 Fix serial endian_access -fno-inline build 2015-06-11 03:06:58 +00:00
Kp 850853326c Pass vsegptridx to gate_in_robot 2015-05-28 03:08:39 +00:00
Kp 1b0e3f4aa5 Pass vsegptr to multibot compute_segment_center 2015-05-28 03:08:39 +00:00
zico 1f6ae58f52 Added HANDS_OFF_PERIOD define for multibot to make sure code will not break if MAX_ROBOTS_CONTROLLED changes 2015-05-23 18:18:20 +02:00
Kp 1cdc43d71a Split object_create_egg 2015-05-09 17:39:01 +00:00
Kp ba4fdd8a0e Prevent debugger trap for hands-off multi_robot_request_change 2015-04-19 19:12:33 +00:00
Kp bb9930bf5b multi_robot_request_change: check robot_controlled[slot] for object_none 2015-04-19 04:18:54 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp da3cb31a0e Refactor powerup allow code 2015-03-28 17:18:02 +00:00
Kp d63be36fb3 Fix bogus trap on remote_owner check
Some call sites pass a uint8_t to objnum_remote_to_local, which is
zero-extended up to an int.  The check for owner==-1 then fails, causing
the sanity check to trap to the debugger, even though the situation is
normal and harmless.  Switch the type to int8_t to ensure that the value
is not sign/zero-extended.
2015-03-22 22:48:47 +00:00
Kp c5f6a115ec Add <stdexcept> for files that throw std::runtime_error 2015-03-22 04:16:49 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp f2fb31a120 Merge 'D1 emulation issues' into unification/master
Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/38
2015-02-20 03:00:46 +00:00
Kp dc8b88eed4 Convert various loops to range_for 2015-02-14 22:48:27 +00:00
Bradley Bell 28bd4c1650 Enable D1 boss behavior in d2x build.
So we get correct boss behavior when emulating D1, and 3rd party mn2s can include D1 bosses.
2015-02-08 12:26:36 -08:00
Kp 99a4a0ed62 Capture range_for by-value temporaries as const
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug.  Require use of a by-reference
capture when modification is desired.

sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp 84e3a03451 Remove unused parameters 2015-01-18 01:58:33 +00:00
Kp fbac119095 Propagate use of objptridx_t 2014-12-23 04:20:27 +00:00
Kp a17cf6f808 Avoid slicing into objnum_t local 2014-11-20 03:00:41 +00:00
Kp 2c349136cc Avoid slicing into segnum_t local 2014-11-20 03:00:36 +00:00
Kp 164ea2dc10 Pass calc_gun_point vector by & 2014-11-02 03:41:01 +00:00
Kp 5f9b06cce9 Pass multi_send_robot_fire vector by const & 2014-10-30 03:37:22 +00:00
Kp 6d61198130 Pass compute_segment_center vector by & 2014-10-30 03:32:51 +00:00
Kp a09fcd7753 Add vm_vec_add that returns result 2014-10-30 03:11:06 +00:00
Kp 5bb9c88979 Add vm_vec_sub that returns result 2014-10-29 03:24:31 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp b871228f92 Pass create_morph_robot vector by const & 2014-10-28 01:47:18 +00:00
Kp ad717e59e8 Pass laser vectors as const & 2014-10-26 21:37:27 +00:00
Kp 7e955c2c7b Pass object_create_explosion_sub position by & 2014-10-26 21:36:25 +00:00
Kp 9dea4b4d88 Pass sound vms_vector arg by & 2014-10-26 21:33:50 +00:00
Kp fb641b3250 Wrap object iteration idiom 2014-10-12 23:05:46 +00:00