2006-03-20 17:12:09 +00:00
|
|
|
/*
|
2014-06-01 17:55:23 +00:00
|
|
|
* Portions of this file are copyright Rebirth contributors and licensed as
|
|
|
|
* described in COPYING.txt.
|
|
|
|
* Portions of this file are copyright Parallax Software and licensed
|
|
|
|
* according to the Parallax license below.
|
|
|
|
* See COPYING.txt for license details.
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
|
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
|
|
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
|
|
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
|
|
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
|
|
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
|
|
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
|
|
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|
|
|
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Header file for multiplayer robot support.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-11-26 02:56:55 +00:00
|
|
|
#pragma once
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-10-26 03:40:50 +00:00
|
|
|
#include "pstypes.h"
|
|
|
|
|
2013-10-09 03:12:09 +00:00
|
|
|
#ifdef __cplusplus
|
2015-07-25 23:10:45 +00:00
|
|
|
#include "fwd-player.h" // playernum_t
|
2015-12-05 22:57:24 +00:00
|
|
|
#include "fwd-vecmat.h"
|
2013-10-26 03:40:50 +00:00
|
|
|
|
2014-09-20 23:47:27 +00:00
|
|
|
static const std::size_t MAX_ROBOTS_CONTROLLED = 5;
|
2015-05-23 16:18:20 +00:00
|
|
|
static const std::size_t HANDS_OFF_PERIOD = MAX_ROBOTS_CONTROLLED; // i.e. one slow above max
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2015-04-02 02:36:52 +00:00
|
|
|
extern array<objnum_t, MAX_ROBOTS_CONTROLLED> robot_controlled;
|
|
|
|
extern array<int, MAX_ROBOTS_CONTROLLED> robot_agitation, robot_fired;
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2015-11-26 02:56:55 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
2014-08-16 23:18:17 +00:00
|
|
|
int multi_can_move_robot(vobjptridx_t objnum, int agitation);
|
|
|
|
void multi_send_robot_position(vobjptridx_t objnum, int fired);
|
2014-10-30 03:37:22 +00:00
|
|
|
void multi_send_robot_fire(vobjptridx_t objnum, int gun_num, const vms_vector &fire);
|
2014-08-16 23:18:17 +00:00
|
|
|
void multi_send_claim_robot(vobjptridx_t objnum);
|
2014-09-14 01:14:33 +00:00
|
|
|
void multi_send_robot_explode(objptridx_t objnum, objnum_t killer);
|
2013-12-29 04:28:07 +00:00
|
|
|
void multi_send_create_robot(int robotcen, objnum_t objnum, int type);
|
2014-08-16 23:18:17 +00:00
|
|
|
void multi_send_boss_teleport(vobjptridx_t bossobjnum, segnum_t where);
|
2014-05-24 00:20:30 +00:00
|
|
|
void multi_send_boss_cloak(objnum_t bossobjnum);
|
|
|
|
void multi_send_boss_start_gate(objnum_t bossobjnum);
|
|
|
|
void multi_send_boss_stop_gate(objnum_t bossobjnum);
|
2014-08-16 23:18:17 +00:00
|
|
|
void multi_send_boss_create_robot(objnum_t bossobjnum, int robot_type, vobjptridx_t objnum);
|
2015-11-26 02:56:55 +00:00
|
|
|
int multi_explode_robot_sub(vobjptridx_t botnum);
|
|
|
|
void multi_drop_robot_powerups(vobjptridx_t objnum);
|
2006-03-20 17:12:09 +00:00
|
|
|
int multi_send_robot_frame(int sent);
|
2015-11-26 02:56:55 +00:00
|
|
|
void multi_robot_request_change(vobjptridx_t robot, int playernum);
|
2015-09-03 13:13:56 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_II)
|
|
|
|
void multi_send_thief_frame();
|
|
|
|
#endif
|
2015-11-26 02:56:55 +00:00
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-03-30 19:41:33 +00:00
|
|
|
void multi_do_robot_explode(const ubyte *buf);
|
2014-09-21 22:10:12 +00:00
|
|
|
void multi_do_robot_position(playernum_t pnum, const ubyte *buf);
|
|
|
|
void multi_do_claim_robot(playernum_t pnum, const ubyte *buf);
|
|
|
|
void multi_do_release_robot(playernum_t pnum, const ubyte *buf);
|
2013-03-30 19:41:33 +00:00
|
|
|
void multi_do_robot_fire(const ubyte *buf);
|
2014-09-21 22:10:12 +00:00
|
|
|
void multi_do_create_robot(playernum_t pnum, const ubyte *buf);
|
|
|
|
void multi_do_create_robot_powerups(playernum_t pnum, const ubyte *buf);
|
|
|
|
void multi_do_boss_teleport(playernum_t pnum, const ubyte *buf);
|
2015-01-18 01:58:33 +00:00
|
|
|
void multi_do_boss_cloak(const ubyte *buf);
|
|
|
|
void multi_do_boss_start_gate(const ubyte *buf);
|
|
|
|
void multi_do_boss_stop_gate(const ubyte *buf);
|
2014-09-21 22:10:12 +00:00
|
|
|
void multi_do_boss_create_robot(playernum_t pnum, const ubyte *buf);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
void multi_strip_robots(int playernum);
|
|
|
|
void multi_check_robot_timeout(void);
|
|
|
|
|
2013-10-09 03:12:09 +00:00
|
|
|
#endif
|