Commit graph

44 commits

Author SHA1 Message Date
Kp 6215ef8e06 Pass LevelSharedRobotInfoState to various functions that need it 2022-07-09 13:39:29 +00:00
Kp 60c5fc5dc4 Pass object& to multi_drop_robot_powerups 2022-02-05 13:30:56 +00:00
Kp 795b0e9111 Use enum class for station_number 2021-11-01 03:37:20 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp 30091902af Simplify valptridx types where possible
Switch valptridx::ptr to a reference type.
Switch valptridx::ptridx to a reference type or to ::ptr.

Fix up uses of operator-> accordingly.
2019-12-22 05:34:08 +00:00
Kp cfb481c74a Add experimental support for guidebot in multiplayer
This was requested by a user in early 2018.  However, the proposed
prototype was susceptible to various forms of desynchronization, and was
unsuitable for merging.  No further revisions were proposed, and the
feature languished.  This commit enables the guidebot in cooperative
games and addresses the known synchronization problems, as well as some
other bugs that were uncovered during light testing.  This is classified
as an experimental feature because it has not been heavily tested in
complicated games.

Requested-by: cfeuersaenger <https://github.com/dxx-rebirth/dxx-rebirth/issues/364>
2019-06-27 03:26:20 +00:00
Kp 1d550ec0df Fix check_header_includes=1 build 2018-12-13 02:31:38 +00:00
Kp a0ed5cb283 Pass Vclip as context 2018-10-21 00:24:07 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp 599ac9dee0 Always qualify valptridx type/factory
Previously, valptridx used PREFIX for allow-invalid+mutable, c#PREFIX
for allow-invalid+const, v#PREFIX for require-valid+mutable, vc#PREFIX
for require-valid+const.  Convert the types, factories, and all usage
sites to specify a qualifier for all four combinations:

	im#PREFIX -> allow-invalid+mutable
	ic#PREFIX -> allow-invalid+const
	vm#PREFIX -> require-valid+mutable
	vc#PREFIX -> require-valid+const

Changes to common/include/valptridx.h and common/include/fwd-valptridx.h
are manual.  All other changes are generated by:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\(v\?\)\(\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/\1m\2/g'

for the 'm' prefix and:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\([cm]\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/i&/g'

for the 'i' prefix.
2017-06-10 03:31:02 +00:00
Kp d7ea84aa36 Pass vcsegidx to multi_send_boss_teleport 2016-12-05 00:26:10 +00:00
Kp 57196e8f9f Look up robot type in multi_send_boss_create_robot 2016-10-29 23:16:16 +00:00
Kp ee1003f29f Move conditionally compiled code into namespace dsx 2016-08-25 04:05:32 +00:00
Kp c636dc4b98 Convert various static const expressions to constexpr 2016-07-16 16:52:04 +00:00
Kp 4126c6c910 Pass object &to multi_send_robot_position 2016-04-06 03:34:15 +00:00
Kp cfc35e819d Use inline namespace dcx for common/maths 2015-12-05 22:57:24 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00: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 f00725f740 Use forward-declaration header for player.h 2015-07-25 23:10:45 +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 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 84e3a03451 Remove unused parameters 2015-01-18 01:58:33 +00:00
Kp 5f9b06cce9 Pass multi_send_robot_fire vector by const & 2014-10-30 03:37:22 +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 e6b9f3f923 Use typedef for player number 2014-09-21 22:10:12 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00
Kp f0a1146b29 Unify MULTI_ROBOT_EXPLODE
Derive thief state locally.  Remove unused player number.  Use new
serializer.
2014-09-14 01:14:33 +00:00
Kp 66cb80c343 Propagate use of objptridx 2014-08-17 20:31:18 +00:00
Kp c3086f0875 Split out boss action messages 2014-08-13 03:19:13 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp 2764e3652a Propagate use of objptridx_t 2014-08-13 02:56:58 +00:00
Kp b2a7195643 Remove unused multi_dump_robots 2014-07-13 03:43:32 +00:00
Kp 6f9cdcd01c Pass player number to multibot functions 2014-06-08 00:05:33 +00:00
Kp e5673ae8ea Pass pnum to boss action 2014-06-08 00:05:33 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp a2427f58b5 Use special type to reduce pointer/index conversions 2014-01-12 19:32:12 +00:00
Kp 67741cf603 Remove unused multi_explode_robot_sub parameter killer 2014-01-04 22:04:34 +00:00
Kp 038bbad26a Rearrange headers to build under all test modes 2013-12-22 20:56:35 +00:00
Kp 9de54cfa74 Switch to C++ linkage
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
	if line == cxxguard:
		guard = 1
		continue
	if guard:
		if line == 'extern "C" {\n':
			guard = 2
			continue
		if line == '}\n':
			guard = 0
			continue
		if guard == 2:
			assert(line == '#endif\n')
			guard = 0
			print cxxguard,
			continue
	print line,
2013-12-06 03:35:32 +00:00
Kp 8ed99faf5c Make headers freestanding 2013-10-26 03:50:28 +00:00
Kp 1d073475e7 Mark various headers for C linkage 2013-10-20 22:49:11 +00:00
Kp 616a3a6b70 Merge branch d1x-rebirth into unification/master
Conflicts:
	SConstruct
	common/main/cntrlcen.h
	common/main/fuelcen.h
	common/main/fvi.h
	common/main/gameseq.h
	common/main/gauges.h
	common/main/multibot.h
	common/main/net_udp.h
	common/main/object.h
	common/main/player.h
	common/main/vers_id.h
	d1x-rebirth/main/hostage.c
	d1x-rebirth/main/multi.c
	main/controls.c
	main/hostage.h
	main/laser.h
	main/screens.h
	similar/arch/ogl/gr.c
	similar/editor/centers.c
	similar/main/inferno.c
	similar/main/lighting.c
	similar/main/multibot.c
	similar/main/paging.c
	similar/main/physics.c
	similar/main/player.c
	similar/main/robot.c
	similar/main/wall.c
2013-04-21 04:51:35 +00:00
Kp ed814d313e Move */main/multibot.h -> common/main/multibot.h 2013-03-03 01:03:33 +00:00
Renamed from d2x-rebirth/main/multibot.h (Browse further)