mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-19 07:21:12 +00:00
various updates
This commit is contained in:
parent
4aa814c636
commit
0fa4ad3d22
9 changed files with 287 additions and 212 deletions
|
@ -1,51 +1,54 @@
|
|||
// Copyright (C) 1999-2000 Id Software, Inc.
|
||||
//
|
||||
|
||||
/*****************************************************************************
|
||||
* name: ai_chat.h
|
||||
*
|
||||
* desc: Quake3 bot AI
|
||||
*
|
||||
* $Archive: /StarTrek/Code-DM/game/ai_chat.h $
|
||||
* $Author: Jmonroe $
|
||||
* $Revision: 1 $
|
||||
* $Modtime: 1/21/00 10:12p $
|
||||
* $Date: 1/25/00 6:26p $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef AI_CHAT_H_
|
||||
#define AI_CHAT_H_
|
||||
|
||||
//
|
||||
int32_t BotChat_EnterGame(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_ExitGame(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_StartLevel(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_EndLevel(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_HitTalking(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_HitNoDeath(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_HitNoKill(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_Death(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_Kill(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_EnemySuicide(bot_state_t* bs);
|
||||
//
|
||||
int32_t BotChat_Random(bot_state_t* bs);
|
||||
//! time the selected chat takes to type in
|
||||
double BotChatTime(bot_state_t* bs);
|
||||
//! returns true if the bot can chat at the current position
|
||||
int32_t BotValidChatPosition(bot_state_t* bs);
|
||||
//! test the initial bot chats
|
||||
void BotChatTest(bot_state_t* bs);
|
||||
|
||||
#endif /* AI_CHAT_H_ */
|
||||
|
||||
|
||||
// Copyright (C) 1999-2000 Id Software, Inc.
|
||||
//
|
||||
|
||||
/*****************************************************************************
|
||||
* name: ai_chat.h
|
||||
*
|
||||
* desc: Quake3 bot AI
|
||||
*
|
||||
* $Archive: /StarTrek/Code-DM/game/ai_chat.h $
|
||||
* $Author: Jmonroe $
|
||||
* $Revision: 1 $
|
||||
* $Modtime: 1/21/00 10:12p $
|
||||
* $Date: 1/25/00 6:26p $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef AI_CHAT_H_
|
||||
#define AI_CHAT_H_
|
||||
|
||||
|
||||
int32_t BotChat_EnterGame(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_ExitGame(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_StartLevel(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_EndLevel(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_HitTalking(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_HitNoDeath(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_HitNoKill(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_Death(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_Kill(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_EnemySuicide(bot_state_t* bs);
|
||||
|
||||
int32_t BotChat_Random(bot_state_t* bs);
|
||||
|
||||
//! time the selected chat takes to type in
|
||||
double BotChatTime(bot_state_t* bs);
|
||||
|
||||
//! returns true if the bot can chat at the current position
|
||||
int32_t BotValidChatPosition(bot_state_t* bs);
|
||||
|
||||
//! test the initial bot chats
|
||||
void BotChatTest(bot_state_t* bs);
|
||||
|
||||
#endif /* AI_CHAT_H_ */
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "g_local.h"
|
||||
|
||||
int32_t BotMatchMessage(bot_state_t* bs, char* message);
|
||||
|
||||
void BotPrintTeamGoal(bot_state_t* bs);
|
||||
|
||||
#endif /* AI_CMD_H_ */
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef AI_DMNET_H_
|
||||
#define AI_DMNET_H_
|
||||
|
||||
#define MAX_NODESWITCHES 50
|
||||
#define MAX_NODESWITCHES 50
|
||||
|
||||
void AI_dmnet_AIEnter_Stand(bot_state_t* bs);
|
||||
void AI_dmnet_AIEnter_Seek_ActivateEntity(bot_state_t* bs);
|
||||
|
|
|
@ -17,113 +17,170 @@
|
|||
#ifndef AI_DMQ3_H_
|
||||
#define AI_DMQ3_H_
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
//!setup the deathmatch AI
|
||||
void BotSetupDeathmatchAI(void);
|
||||
|
||||
//!shutdown the deathmatch AI
|
||||
void BotShutdownDeathmatchAI(void);
|
||||
|
||||
//!let the bot live within it's deathmatch AI net
|
||||
void BotDeathmatchAI(bot_state_t *bs, float thinktime);
|
||||
|
||||
//!free waypoints
|
||||
void BotFreeWaypoints(bot_waypoint_t *wp);
|
||||
|
||||
//!choose a weapon
|
||||
void BotChooseWeapon(bot_state_t *bs);
|
||||
|
||||
//!setup movement stuff
|
||||
void BotSetupForMovement(bot_state_t *bs);
|
||||
|
||||
//!update the inventory
|
||||
void BotUpdateInventory(bot_state_t *bs);
|
||||
|
||||
//!update the inventory during battle
|
||||
void BotUpdateBattleInventory(bot_state_t *bs, int enemy);
|
||||
|
||||
//! should I detonate the detpack now
|
||||
qboolean BotShouldDetonateDetPack(bot_state_t *bs);
|
||||
|
||||
//!use holdable items during battle
|
||||
void BotBattleUseItems(bot_state_t *bs);
|
||||
|
||||
//!return true if the bot is dead
|
||||
qboolean BotIsDead(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot is in observer mode
|
||||
qboolean BotIsObserver(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot is in the intermission
|
||||
qboolean BotIntermission(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot is in lava or slime
|
||||
qboolean BotInLavaOrSlime(bot_state_t *bs);
|
||||
|
||||
//!returns true if the entity is dead
|
||||
qboolean EntityIsDead(aas_entityinfo_t *entinfo);
|
||||
|
||||
//!returns true if the entity is invisible
|
||||
qboolean EntityIsInvisible(aas_entityinfo_t *entinfo);
|
||||
|
||||
//!returns true if the entity is shooting
|
||||
qboolean EntityIsShooting(aas_entityinfo_t *entinfo);
|
||||
|
||||
//!returns the name of the client
|
||||
char *ClientName(int client, char *name, int size);
|
||||
|
||||
//!returns an simplyfied client name
|
||||
char *EasyClientName(int client, char *name, int size);
|
||||
|
||||
//!returns the skin used by the client
|
||||
char *ClientSkin(int client, char *skin, int size);
|
||||
|
||||
//!returns the aggression of the bot in the range [0, 100]
|
||||
float BotAggression(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot wants to retreat
|
||||
int BotWantsToRetreat(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot wants to chase
|
||||
int BotWantsToChase(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot wants to help
|
||||
int BotWantsToHelp(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot can and wants to rocketjump
|
||||
int BotCanAndWantsToRocketJump(bot_state_t *bs);
|
||||
|
||||
//!returns true if the bot wants to and goes camping
|
||||
int BotWantsToCamp(bot_state_t *bs);
|
||||
|
||||
//!the bot will perform attack movements
|
||||
bot_moveresult_t BotAttackMove(bot_state_t *bs, int tfl);
|
||||
|
||||
//!returns true if the bot and the entity are in the same team
|
||||
int BotSameTeam(bot_state_t *bs, int entnum);
|
||||
|
||||
//!returns true if teamplay is on
|
||||
int TeamPlayIsOn(void);
|
||||
|
||||
//!returns visible team mate flag carrier if available
|
||||
int BotTeamFlagCarrierVisible(bot_state_t *bs);
|
||||
|
||||
//!returns true and sets the .enemy field when an enemy is found
|
||||
int BotFindEnemy(bot_state_t *bs, int curenemy);
|
||||
|
||||
//!returns a roam goal
|
||||
void BotRoamGoal(bot_state_t *bs, vec3_t goal);
|
||||
|
||||
//!returns entity visibility in the range [0, 1]
|
||||
float BotEntityVisible(int viewer, vec3_t eye, vec3_t viewangles, float fov, int ent);
|
||||
|
||||
//!the bot will aim at the current enemy
|
||||
void BotAimAtEnemy(bot_state_t *bs);
|
||||
|
||||
//!check if the bot should attack
|
||||
void BotCheckAttack(bot_state_t *bs);
|
||||
|
||||
//!AI when the bot is blocked
|
||||
void BotAIBlocked(bot_state_t *bs, bot_moveresult_t *moveresult, int activate);
|
||||
|
||||
//!returns the CTF team the bot is in
|
||||
int BotCTFTeam(bot_state_t *bs);
|
||||
|
||||
//!returns the flag the bot is carrying (CTFFLAG_?)
|
||||
int BotCTFCarryingFlag(bot_state_t *bs);
|
||||
|
||||
//!set ctf goals (defend base, get enemy flag) during seek
|
||||
void BotCTFSeekGoals(bot_state_t *bs);
|
||||
|
||||
//!set ctf goals (defend base, get enemy flag) during retreat
|
||||
void BotCTFRetreatGoals(bot_state_t *bs);
|
||||
|
||||
//!create a new waypoint
|
||||
bot_waypoint_t *BotCreateWayPoint(char *name, vec3_t origin, int areanum);
|
||||
|
||||
//!find a waypoint with the given name
|
||||
bot_waypoint_t *BotFindWayPoint(bot_waypoint_t *waypoints, char *name);
|
||||
|
||||
//!strstr but case insensitive
|
||||
char *stristr(char *str, char *charset);
|
||||
|
||||
//!returns the number of the client with the given name
|
||||
int ClientFromName(char *name);
|
||||
//
|
||||
|
||||
|
||||
int BotPointAreaNum(vec3_t origin);
|
||||
//
|
||||
|
||||
|
||||
void BotMapScripts(bot_state_t *bs);
|
||||
|
||||
//ctf flags
|
||||
#define CTF_FLAG_NONE 0
|
||||
#define CTF_FLAG_RED 1
|
||||
#define CTF_FLAG_BLUE 2
|
||||
typedef enum {
|
||||
CTF_FLAG_NONE,
|
||||
CTF_FLAG_RED,
|
||||
CTF_FLAG_BLUE
|
||||
} ai_ctfTeamFlagFlag;
|
||||
//CTF skins
|
||||
#define CTF_SKIN_REDTEAM "red"
|
||||
#define CTF_SKIN_BLUETEAM "blue"
|
||||
static const char CTF_SKIN_REDTEAM[] = "red";
|
||||
static const char CTF_SKIN_BLUETEAM[] = "blue";
|
||||
//CTF teams
|
||||
#define CTF_TEAM_NONE 0
|
||||
#define CTF_TEAM_RED 1
|
||||
#define CTF_TEAM_BLUE 2
|
||||
typedef enum {
|
||||
CTF_TEAM_NONE,
|
||||
CTF_TEAM_RED,
|
||||
CTF_TEAM_BLUE
|
||||
} ai_ctfTeamFlag;
|
||||
|
||||
extern int gametype; //!<game type
|
||||
extern int maxclients; //!<maximum number of clients
|
||||
|
||||
extern int32_t gametype; //!<game type
|
||||
extern int32_t maxclients; //!<maximum number of clients
|
||||
|
||||
extern vmCvar_t bot_grapple;
|
||||
extern vmCvar_t bot_rocketjump;
|
||||
|
|
|
@ -58,31 +58,35 @@ typedef enum {
|
|||
} AI_main_LTG;
|
||||
|
||||
//some goal dedication times
|
||||
#define TEAM_HELP_TIME 10 //!<1 minute teamplay help time
|
||||
#define TEAM_ACCOMPANY_TIME 10 //!<10 minutes teamplay accompany time
|
||||
#define TEAM_DEFENDKEYAREA_TIME 600 //!<5 minutes ctf defend base time
|
||||
#define TEAM_CAMP_TIME 10 //!<10 minutes camping time
|
||||
#define TEAM_PATROL_TIME 600 //!<10 minutes patrolling time
|
||||
#define TEAM_LEAD_TIME 600 //!<10 minutes taking the lead
|
||||
#define TEAM_GETITEM_TIME 10 //!<1 minute
|
||||
#define TEAM_KILL_SOMEONE 10 //!<3 minute to kill someone
|
||||
#define CTF_GETFLAG_TIME 600 //!<5 minutes ctf get flag time
|
||||
#define CTF_RUSHBASE_TIME 600 //!<2 minutes ctf rush base time
|
||||
#define CTF_RETURNFLAG_TIME 600 //!<3 minutes to return the flag
|
||||
#define CTF_ROAM_TIME 600 //!<1 minute ctf roam time
|
||||
static const uint32_t TEAM_HELP_TIME = 10; //!<1 minute teamplay help time
|
||||
static const uint32_t TEAM_ACCOMPANY_TIME = 10; //!<10 minutes teamplay accompany time
|
||||
static const uint32_t TEAM_DEFENDKEYAREA_TIME = 600; //!<5 minutes ctf defend base time
|
||||
static const uint32_t TEAM_CAMP_TIME = 10; //!<10 minutes camping time
|
||||
static const uint32_t TEAM_PATROL_TIME = 600; //!<10 minutes patrolling time
|
||||
static const uint32_t TEAM_LEAD_TIME = 600; //!<10 minutes taking the lead
|
||||
static const uint32_t TEAM_GETITEM_TIME = 10; //!<1 minute
|
||||
static const uint32_t TEAM_KILL_SOMEONE = 10; //!<3 minute to kill someone
|
||||
static const uint32_t CTF_GETFLAG_TIME = 600; //!<5 minutes ctf get flag time
|
||||
static const uint32_t CTF_RUSHBASE_TIME = 600; //!<2 minutes ctf rush base time
|
||||
static const uint32_t CTF_RETURNFLAG_TIME = 600; //!<3 minutes to return the flag
|
||||
static const uint32_t CTF_ROAM_TIME = 600; //!<1 minute ctf roam time
|
||||
|
||||
//patrol flags
|
||||
#define PATROL_LOOP 1
|
||||
#define PATROL_REVERSE 2
|
||||
#define PATROL_BACK 4
|
||||
static const uint32_t PATROL_LOOP = 1;
|
||||
static const uint32_t PATROL_REVERSE = 2;
|
||||
static const uint32_t PATROL_BACK = 4;
|
||||
|
||||
//CTF task preference
|
||||
#define CTFTP_DEFENDER 1
|
||||
#define CTFTP_ATTACKER 2
|
||||
static const uint32_t CTFTP_DEFENDER = 1;
|
||||
static const uint32_t CTFTP_ATTACKER = 2;
|
||||
|
||||
//CTF strategy
|
||||
#define CTFS_PASSIVE 1
|
||||
static const uint32_t CTFS_PASSIVE = 1;
|
||||
|
||||
//copied from the aas file header
|
||||
#define PRESENCE_NONE 1
|
||||
#define PRESENCE_NORMAL 2
|
||||
#define PRESENCE_CROUCH 4
|
||||
static const uint32_t PRESENCE_NONE = 1;
|
||||
static const uint32_t PRESENCE_NORMAL = 2;
|
||||
static const uint32_t PRESENCE_CROUCH = 4;
|
||||
|
||||
//!check points
|
||||
typedef struct bot_waypoint_s {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* desc: Area Awareness System, stuff exported to the AI
|
||||
*
|
||||
* $Archive: /StarTrek/Code-DM/game/be_aas.h $
|
||||
* $Author: Jmonroe $
|
||||
* $Author: Jmonroe $
|
||||
* $Revision: 1 $
|
||||
* $Modtime: 1/21/00 10:12p $
|
||||
* $Date: 1/25/00 6:26p $
|
||||
|
@ -22,41 +22,42 @@
|
|||
#endif
|
||||
|
||||
//travel flags
|
||||
#define TFL_INVALID 0x0000001 //!<traveling temporary not possible
|
||||
#define TFL_WALK 0x0000002 //!<walking
|
||||
#define TFL_CROUCH 0x0000004 //!<crouching
|
||||
#define TFL_BARRIERJUMP 0x0000008 //!<jumping onto a barrier
|
||||
#define TFL_JUMP 0x0000010 //!<jumping
|
||||
#define TFL_LADDER 0x0000020 //!<climbing a ladder
|
||||
#define TFL_WALKOFFLEDGE 0x0000080 //!<walking of a ledge
|
||||
#define TFL_SWIM 0x0000100 //!<swimming
|
||||
#define TFL_WATERJUMP 0x0000200 //!<jumping out of the water
|
||||
#define TFL_TELEPORT 0x0000400 //!<teleporting
|
||||
#define TFL_ELEVATOR 0x0000800 //!<elevator
|
||||
#define TFL_ROCKETJUMP 0x0001000 //!<rocket jumping
|
||||
#define TFL_BFGJUMP 0x0002000 //!<bfg jumping
|
||||
#define TFL_GRAPPLEHOOK 0x0004000 //!<grappling hook
|
||||
#define TFL_DOUBLEJUMP 0x0008000 //!<double jump
|
||||
#define TFL_RAMPJUMP 0x0010000 //!<ramp jump
|
||||
#define TFL_STRAFEJUMP 0x0020000 //!<strafe jump
|
||||
#define TFL_JUMPPAD 0x0040000 //!<jump pad
|
||||
#define TFL_AIR 0x0080000 //!<travel through air
|
||||
#define TFL_WATER 0x0100000 //!<travel through water
|
||||
#define TFL_SLIME 0x0200000 //!<travel through slime
|
||||
#define TFL_LAVA 0x0400000 //!<travel through lava
|
||||
#define TFL_DONOTENTER 0x0800000 //!<travel through donotenter area
|
||||
#define TFL_FUNCBOB 0x1000000 //!<func bobbing
|
||||
#define TFL_FLIGHT 0x2000000 //!<flight
|
||||
typedef enum {
|
||||
TFL_INVALID = 0x0000001, //!<traveling temporary not possible
|
||||
TFL_WALK = 0x0000002, //!<walking
|
||||
TFL_CROUCH = 0x0000004, //!<crouching
|
||||
TFL_BARRIERJUMP = 0x0000008, //!<jumping onto a barrier
|
||||
TFL_JUMP = 0x0000010, //!<jumping
|
||||
TFL_LADDER = 0x0000020, //!<climbing a ladder
|
||||
TFL_WALKOFFLEDGE = 0x0000080, //!<walking of a ledge
|
||||
TFL_SWIM = 0x0000100, //!<swimming
|
||||
TFL_WATERJUMP = 0x0000200, //!<jumping out of the water
|
||||
TFL_TELEPORT = 0x0000400, //!<teleporting
|
||||
TFL_ELEVATOR = 0x0000800, //!<elevator
|
||||
TFL_ROCKETJUMP = 0x0001000, //!<rocket jumping
|
||||
TFL_BFGJUMP = 0x0002000, //!<bfg jumping
|
||||
TFL_GRAPPLEHOOK = 0x0004000, //!<grappling hook
|
||||
TFL_DOUBLEJUMP = 0x0008000, //!<double jump
|
||||
TFL_RAMPJUMP = 0x0010000, //!<ramp jump
|
||||
TFL_STRAFEJUMP = 0x0020000, //!<strafe jump
|
||||
TFL_JUMPPAD = 0x0040000, //!<jump pad
|
||||
TFL_AIR = 0x0080000, //!<travel through air
|
||||
TFL_WATER = 0x0100000, //!<travel through water
|
||||
TFL_SLIME = 0x0200000, //!<travel through slime
|
||||
TFL_LAVA = 0x0400000, //!<travel through lava
|
||||
TFL_DONOTENTER = 0x0800000, //!<travel through donotenter area
|
||||
TFL_FUNCBOB = 0x1000000, //!<func bobbing
|
||||
TFL_FLIGHT = 0x2000000 //!<flight
|
||||
} aas_travelFlags;
|
||||
|
||||
//default travel flags
|
||||
#define TFL_DEFAULT TFL_WALK|TFL_CROUCH|TFL_BARRIERJUMP|\
|
||||
TFL_JUMP|TFL_LADDER|\
|
||||
TFL_WALKOFFLEDGE|TFL_SWIM|TFL_WATERJUMP|\
|
||||
TFL_TELEPORT|TFL_ELEVATOR|\
|
||||
TFL_AIR|TFL_WATER|TFL_JUMPPAD|TFL_FUNCBOB
|
||||
static const uint32_t TFL_DEFAULT = TFL_WALK | TFL_CROUCH | TFL_BARRIERJUMP | \
|
||||
TFL_JUMP | TFL_LADDER | \
|
||||
TFL_WALKOFFLEDGE | TFL_SWIM | TFL_WATERJUMP | \
|
||||
TFL_TELEPORT | TFL_ELEVATOR | \
|
||||
TFL_AIR | TFL_WATER | TFL_JUMPPAD | TFL_FUNCBOB;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
SOLID_NOT, //!< no interaction with other objects
|
||||
SOLID_TRIGGER, //!< only touch when inside, after moving
|
||||
SOLID_BBOX, //!< touch on edge
|
||||
|
@ -64,8 +65,7 @@ typedef enum
|
|||
} solid_t;
|
||||
|
||||
//!a trace is returned when a box is swept through the AAS world
|
||||
typedef struct aas_trace_s
|
||||
{
|
||||
typedef struct aas_trace_s {
|
||||
qboolean startsolid; //!< if true, the initial point was in a solid area
|
||||
float fraction; //!< time completed, 1.0 = didn't hit anything
|
||||
vec3_t endpos; //!< final position
|
||||
|
@ -80,30 +80,29 @@ typedef struct aas_trace_s
|
|||
//bsp_trace_t hit surface
|
||||
typedef struct bsp_surface_s
|
||||
{
|
||||
char name[16];
|
||||
int flags;
|
||||
int value;
|
||||
char name[16];
|
||||
int flags;
|
||||
int value;
|
||||
} bsp_surface_t;
|
||||
|
||||
//a trace is returned when a box is swept through the BSP world
|
||||
typedef struct bsp_trace_s
|
||||
{
|
||||
qboolean allsolid; // if true, plane is not valid
|
||||
qboolean startsolid; // if true, the initial point was in a solid area
|
||||
float fraction; // time completed, 1.0 = didn't hit anything
|
||||
vec3_t endpos; // final position
|
||||
cplane_t plane; // surface normal at impact
|
||||
float exp_dist; // expanded plane distance
|
||||
int sidenum; // number of the brush side hit
|
||||
bsp_surface_t surface; // hit surface
|
||||
int contents; // contents on other side of surface hit
|
||||
int ent; // number of entity hit
|
||||
qboolean allsolid; // if true, plane is not valid
|
||||
qboolean startsolid; // if true, the initial point was in a solid area
|
||||
float fraction; // time completed, 1.0 = didn't hit anything
|
||||
vec3_t endpos; // final position
|
||||
cplane_t plane; // surface normal at impact
|
||||
float exp_dist; // expanded plane distance
|
||||
int sidenum; // number of the brush side hit
|
||||
bsp_surface_t surface; // hit surface
|
||||
int contents; // contents on other side of surface hit
|
||||
int ent; // number of entity hit
|
||||
} bsp_trace_t;
|
||||
*/
|
||||
|
||||
//!entity info
|
||||
typedef struct aas_entityinfo_s
|
||||
{
|
||||
typedef struct aas_entityinfo_s {
|
||||
int valid; //!< true if updated this frame
|
||||
int type; //!< entity type
|
||||
int flags; //!< entity flags
|
||||
|
@ -131,22 +130,23 @@ typedef struct aas_entityinfo_s
|
|||
|
||||
|
||||
//client movement prediction stop events, stop as soon as:
|
||||
#define SE_NONE 0
|
||||
#define SE_HITGROUND 1 //!< the ground is hit
|
||||
#define SE_LEAVEGROUND 2 //!< there's no ground
|
||||
#define SE_ENTERWATER 4 //!< water is entered
|
||||
#define SE_ENTERSLIME 8 //!< slime is entered
|
||||
#define SE_ENTERLAVA 16 //!< lava is entered
|
||||
#define SE_HITGROUNDDAMAGE 32 //!< the ground is hit with damage
|
||||
#define SE_GAP 64 //!< there's a gap
|
||||
#define SE_TOUCHJUMPPAD 128 //!< touching a jump pad area
|
||||
#define SE_TOUCHTELEPORTER 256 //!< touching teleporter
|
||||
#define SE_ENTERAREA 512 //!< the given stoparea is entered
|
||||
#define SE_HITGROUNDAREA 1024 //!< a ground face in the area is hit
|
||||
#define SE_HITBOUNDINGBOX 2048 //!< hit the specified bounding box
|
||||
typedef enum {
|
||||
SE_NONE = 0,
|
||||
SE_HITGROUND = 1, //!< the ground is hit
|
||||
SE_LEAVEGROUND = 2, //!< there's no ground
|
||||
SE_ENTERWATER = 4, //!< water is entered
|
||||
SE_ENTERSLIME = 8, //!< slime is entered
|
||||
SE_ENTERLAVA = 16, //!< lava is entered
|
||||
SE_HITGROUNDDAMAGE = 32, //!< the ground is hit with damage
|
||||
SE_GAP = 64, //!< there's a gap
|
||||
SE_TOUCHJUMPPAD = 128, //!< touching a jump pad area
|
||||
SE_TOUCHTELEPORTER = 256, //!< touching teleporter
|
||||
SE_ENTERAREA = 512, //!< the given stoparea is entered
|
||||
SE_HITGROUNDAREA = 1024, //!< a ground face in the area is hit
|
||||
SE_HITBOUNDINGBOX = 2048 //!< hit the specified bounding box
|
||||
} aas_stopEvents;
|
||||
|
||||
typedef struct aas_clientmove_s
|
||||
{
|
||||
typedef struct aas_clientmove_s {
|
||||
vec3_t endpos; //!<position at the end of movement prediction
|
||||
int endarea; //!<area at end of movement prediction
|
||||
vec3_t velocity; //!<velocity at the end of movement prediction
|
||||
|
@ -158,8 +158,7 @@ typedef struct aas_clientmove_s
|
|||
int frames; //!<number of frames predicted ahead
|
||||
} aas_clientmove_t;
|
||||
|
||||
typedef struct aas_altroutegoal_s
|
||||
{
|
||||
typedef struct aas_altroutegoal_s {
|
||||
vec3_t origin;
|
||||
int areanum;
|
||||
unsigned short starttraveltime;
|
||||
|
|
|
@ -5,49 +5,56 @@
|
|||
#ifndef BG_LOCAL_H_
|
||||
#define BG_LOCAL_H_
|
||||
|
||||
#define MIN_WALK_NORMAL 0.7 // can't walk on very steep slopes
|
||||
#ifdef _MSC_VER
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#define STEPSIZE 18
|
||||
static const double MIN_WALK_NORMAL = 0.7; // can't walk on very steep slopes
|
||||
|
||||
#define JUMP_VELOCITY 270
|
||||
static const uint32_t STEPSIZE = 18;
|
||||
|
||||
#define TIMER_LAND 130
|
||||
#define TIMER_GESTURE (34*66+50)
|
||||
static const uint32_t JUMP_VELOCITY = 270;
|
||||
|
||||
static const uint32_t TIMER_LAND = 130;
|
||||
static const uint32_t TIMER_GESTURE = (34 * 66 + 50);
|
||||
|
||||
|
||||
#define OVERCLIP 1.001
|
||||
static const double OVERCLIP = 1.001;
|
||||
|
||||
// all of the locals will be zeroed before each
|
||||
// pmove, just to make damn sure we don't have
|
||||
// any differences when running on client or server
|
||||
typedef struct {
|
||||
vec3_t forward, right, up;
|
||||
float frametime;
|
||||
double frametime;
|
||||
|
||||
int msec;
|
||||
int32_t msec;
|
||||
|
||||
qboolean walking;
|
||||
qboolean groundPlane;
|
||||
trace_t groundTrace;
|
||||
|
||||
float impactSpeed;
|
||||
double impactSpeed;
|
||||
|
||||
vec3_t previous_origin;
|
||||
vec3_t previous_velocity;
|
||||
int previous_waterlevel;
|
||||
int32_t previous_waterlevel;
|
||||
} pml_t;
|
||||
|
||||
extern pmove_t *pm;
|
||||
extern pml_t pml;
|
||||
extern pmove_t* pm;
|
||||
extern pml_t pml;
|
||||
|
||||
extern int c_pmove;
|
||||
extern int32_t c_pmove;
|
||||
|
||||
void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce );
|
||||
void PM_AddTouchEnt( int entityNum );
|
||||
void PM_AddEvent( int newEvent );
|
||||
void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, double overbounce );
|
||||
void PM_AddTouchEnt( int32_t entityNum );
|
||||
void PM_AddEvent( int32_t newEvent );
|
||||
|
||||
qboolean PM_SlideMove( qboolean gravity );
|
||||
void PM_StepSlideMove( qboolean gravity );
|
||||
qboolean PM_SlideMove( qboolean gravity );
|
||||
void PM_StepSlideMove( qboolean gravity );
|
||||
|
||||
#endif /* BG_LOCAL_H_ */
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ const float pm_waterfriction = 1;
|
|||
const float pm_flightfriction = 3;
|
||||
const float pm_evosuitfriction = 0.25; //RPG-X | Phenix | 8/8/2004
|
||||
|
||||
int c_pmove = 0;
|
||||
int32_t c_pmove = 0;
|
||||
|
||||
#define PHASER_RECHARGE_TIME 100
|
||||
|
||||
|
@ -691,7 +691,7 @@ int PM_GetAnim ( int anim, int weapon, qboolean injured, qboolean upper )
|
|||
/**
|
||||
* Adds a predictable event to playerstate
|
||||
*/
|
||||
void PM_AddEvent( int newEvent ) {
|
||||
void PM_AddEvent( int32_t newEvent ) {
|
||||
BG_AddPredictableEventToPlayerstate( newEvent, 0, pm->ps );
|
||||
}
|
||||
|
||||
|
@ -738,7 +738,7 @@ PM_AddTouchEnt
|
|||
/**
|
||||
* Adds a touchEnt event.
|
||||
*/
|
||||
void PM_AddTouchEnt( int entityNum ) {
|
||||
void PM_AddTouchEnt( int32_t entityNum ) {
|
||||
int i;
|
||||
|
||||
if ( entityNum == ENTITYNUM_WORLD ) {
|
||||
|
@ -890,7 +890,7 @@ PM_ClipVelocity
|
|||
/**
|
||||
* Slide off of the impacting surface
|
||||
*/
|
||||
void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce ) {
|
||||
void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, double overbounce ) {
|
||||
float backoff;
|
||||
float change;
|
||||
int i;
|
||||
|
|
|
@ -5,50 +5,65 @@
|
|||
#ifndef BG_PUBLIC_H_
|
||||
#define BG_PUBLIC_H_
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
// meh somehow preprocessor G_LUA won't work for me
|
||||
#define G_LUA 1
|
||||
#define CG_LUA 1
|
||||
|
||||
// because games can change separately from the main system version, we need a
|
||||
// second version that must match between game and cgame
|
||||
#define RPGX_VERSION "RPG-X V 2.4.1ua"
|
||||
#define RPGX_COMPILEDATE __DATE__ " " __TIME__
|
||||
#define RPGX_COMPILEDBY "Jenkins Buildserver"
|
||||
#define GAME_VERSION "RPG-X v" RPGX_VERSION
|
||||
#define RPGX_VERSION "RPG-X V 2.4.1ua"
|
||||
static const char RPGX_COMPILEDATE[] = __DATE__ " " __TIME__;
|
||||
static const char RPGX_COMPILEDBY[] = "Jenkins Buildserver";
|
||||
#define GAME_VERSION "RPG-X v" RPGX_VERSION
|
||||
|
||||
#define INJURED_MODE_HEALTH 20 //!<For the injured mode health system.
|
||||
static const uint32_t INJURED_MODE_HEALTH = 20; //!<For the injured mode health system.
|
||||
|
||||
#define DEFAULT_GRAVITY 800
|
||||
#define GIB_HEALTH -40//RPG-X: RedTechie - If rpg_medicsrevive is off use this
|
||||
#define GIB_HEALTH_IMPOSSIBLE -100000//RPG-X: RedTechie - If rpg_medicsrevive is on use this
|
||||
#define ARMOR_PROTECTION 1.0//0.66
|
||||
#define PIERCED_ARMOR_PROTECTION 0.50 //!< trek: shields only stop 50% of armor-piercing dmg
|
||||
static const uint32_t DEFAULT_GRAVITY = 800;
|
||||
static const int32_t GIB_HEALTH = -40; //RPG-X: RedTechie - If rpg_medicsrevive is off use this
|
||||
static const int32_t GIB_HEALTH_IMPOSSIBLE = -100000; //RPG-X: RedTechie - If rpg_medicsrevive is on use this
|
||||
static const double ARMOR_PROTECTION = 1.0; //0.66
|
||||
static const double PIERCED_ARMOR_PROTECTION = 0.50; //!< trek: shields only stop 50% of armor-piercing dmg
|
||||
|
||||
#define MAX_ITEMS 256
|
||||
static const uint32_t RANK_TIED_FLAG = 0x4000;
|
||||
|
||||
#define RANK_TIED_FLAG 0x4000
|
||||
static const uint32_t ITEM_RADIUS = 15; //!< item sizes are needed for client side pickup detection
|
||||
|
||||
#define ITEM_RADIUS 15 //!< item sizes are needed for client side pickup detection
|
||||
static const uint32_t LIGHTNING_RANGE = 768;
|
||||
|
||||
#define LIGHTNING_RANGE 768
|
||||
static const int32_t SCORE_NOT_PRESENT = -9999; //!< for the CS_SCORES[12] when only one player is present
|
||||
|
||||
#define SCORE_NOT_PRESENT -9999 //!< for the CS_SCORES[12] when only one player is present
|
||||
static const uint32_t VOTE_TIME = 30000;
|
||||
|
||||
#define VOTE_TIME 30000
|
||||
static const int32_t MINS_Z = -24;
|
||||
|
||||
#define MINS_Z -24
|
||||
#define DEFAULT_VIEWHEIGHT 34 // TIM - 26//32
|
||||
#define CROUCH_VIEWHEIGHT 12
|
||||
#define DEAD_VIEWHEIGHT -16
|
||||
typedef enum {
|
||||
DEAD_VIEWHEIGHT = -16,
|
||||
DEFAULT_VIEWHEIGHT = 34, // TIM - 26//32
|
||||
CROUCH_VIEWHEIGHT = 12
|
||||
} bg_viewHeights;
|
||||
|
||||
//TiM : New Rank Definitions
|
||||
#define MAX_RANKS 128 //32 - see how this goes
|
||||
typedef enum {
|
||||
MAX_DECKS = 16, //TiM - Turbolift Decks
|
||||
NUM_CVAR_STORES = 16, //If we ever change the number of CVARS, we can change it here easily
|
||||
MAX_CLASSES = 32, //!< the maximum ammount of classes
|
||||
MAXTOUCH = 32,
|
||||
MAX_RANKS = 128, //TiM : New Rank Definitions //32 - see how this goes
|
||||
MAX_ITEMS = 256,
|
||||
MAX_SCANNABLES = 256, //scannable entities
|
||||
MAX_ENTSCANNABLES = 256,//scannable entities
|
||||
MAX_ARENAS = 1024,
|
||||
MAX_BOTS = 1024,
|
||||
MAX_ARENAS_TEXT = 8192,
|
||||
MAX_BOTS_TEXT = 8192
|
||||
} bg_limits;;
|
||||
|
||||
#define NUM_CVAR_STORES 16 //If we ever change the number of CVARS, we can change it here easily
|
||||
|
||||
//scannable entities
|
||||
#define MAX_SCANNABLES 256
|
||||
#define MAX_ENTSCANNABLES 256
|
||||
|
||||
/** \struct rankNames_t
|
||||
* Struct that hold rank names.
|
||||
|
@ -61,7 +76,6 @@ typedef struct {
|
|||
#define RANKSET_DEFAULT "rpgx_default" //!< name of the default rankset
|
||||
|
||||
//TiM : Class script info
|
||||
#define MAX_CLASSES 32 //!< the maximum ammount of classes
|
||||
#define CLASS_DEFAULT "rpgx_default" //!< the default classset
|
||||
|
||||
//RPG-X: Marcin: I'm lazy sorry
|
||||
|
@ -93,9 +107,6 @@ do { \
|
|||
|
||||
#define DEFAULT_PLAYER "munro/main/default"
|
||||
|
||||
//TiM - Turbolift Decks
|
||||
#define MAX_DECKS 16
|
||||
|
||||
/** \struct widescreen_t
|
||||
* variables used for widescreen drawing, used in both UI and CG
|
||||
*
|
||||
|
@ -257,8 +268,6 @@ typedef enum {
|
|||
|
||||
#define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK)
|
||||
|
||||
#define MAXTOUCH 32
|
||||
|
||||
/**
|
||||
* \struct pmove_t
|
||||
*/
|
||||
|
@ -1067,11 +1076,6 @@ char *NextWordEndsHere(char *pos);
|
|||
char *EndWord(char *pos);
|
||||
|
||||
#define ARENAS_PER_TIER 4
|
||||
#define MAX_ARENAS 1024
|
||||
#define MAX_ARENAS_TEXT 8192
|
||||
|
||||
#define MAX_BOTS 1024
|
||||
#define MAX_BOTS_TEXT 8192
|
||||
|
||||
//make this match Max_Ammo in g_items please;
|
||||
#define PHASER_AMMO_MAX 50
|
||||
|
|
Loading…
Reference in a new issue