// Copyright (C) 1999-2000 Id Software, Inc. // // bg_public.h -- definitions shared by both the server game and client game modules // are we compiling for rpgxEF? #define XTRA 1 // 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 "2.2 Beta 8.4.7 wc1" #define RPGX_COMPILEDATE "20/05/11" #define RPGX_COMPILEDBY "GSIO01" //const char GAME_VERSION[] = strcat("RPG-X v",RPGX_VERSION); //ehem why not: #define GAME_VERSION "RPG-X v" RPGX_VERSION #define INJURED_MODE_HEALTH 20 //! MAX_CONFIGSTRINGS #error overflow: (CS_MAX) > MAX_CONFIGSTRINGS #endif typedef enum { GT_FFA, //!< free for all GT_TOURNAMENT, //!< one on one tournament GT_SINGLE_PLAYER, //!< single player tournament //-- team games go after this -- GT_TEAM, //!< team deathmatch GT_CTF, //!< capture the flag GT_MAX_GAME_TYPE } gametype_t; typedef enum { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER } gender_t; //TiM - Global variables for the player weight/height system #define BASE_HEIGHT 185.0 #define BASE_WEIGHT 90.0 #define FEMALE_OFFSET 0.73 #define MAX_HEIGHT 1.15 #define MIN_HEIGHT 0.9 #define MAX_WEIGHT 1.1 #define MIN_WEIGHT 0.9 #define HEIGHT_UNIT "cm" #define WEIGHT_UNIT "kg" /* =================================================================================== PMOVE MODULE The pmove code takes a player_state_t and a usercmd_t and generates a new player_state_t and some other output data. Used for local prediction on the client game and true movement on the server game. =================================================================================== */ //RPG-X - Player Model System. Anim on or off states /*typedef enum { ANIM_ONLADDER, ANIM_OFFLADDER, ANIM_DIDFLY } animtype_t;*/ /** \enum pmtype_t * */ typedef enum { PM_NORMAL, //!< can accelerate and turn PM_NOCLIP, //!< noclip movement PM_SPECTATOR, //!< still run into walls PM_DEAD, //!< no acceleration or turning, but free falling PM_FREEZE, //!< stuck in place with no control PM_INTERMISSION,//!< no movement or status bar PM_CCAM //!< cinematic cam mode } pmtype_t; /** \enum weaponstate_t * */ typedef enum { WEAPON_READY, WEAPON_RAISING, WEAPON_DROPPING, WEAPON_FIRING } weaponstate_t; // pmove->pm_flags #define PMF_DUCKED 1 //1 //2 #define PMF_JUMP_HELD 2 //2 //4 #define PMF_BACKWARDS_JUMP 8 //!< go into backwards land #define PMF_BACKWARDS_RUN 16 //!< coast down to backwards run #define PMF_TIME_LAND 32 //!< pm_time is time before rejump #define PMF_TIME_KNOCKBACK 64 //!< pm_time is an air-accelerate only time #define PMF_TIME_WATERJUMP 256 //!< pm_time is waterjump #define PMF_RESPAWNED 512 //!< clear after attack and jump buttons come up #define PMF_USE_ITEM_HELD 1024 //#define PMF_GRAPPLE_PULL 2048 //!< pull towards grapple location #define PMF_FOLLOW 4096 //!< spectate following another player #define PMF_SCOREBOARD 8192 //!< spectate as a scoreboard #define ANIM_ONLADDER 16384 #define ANIM_DIDFLY 32768 #define ANIM_ALERT 128 //TiM: How was this missed!? #define ANIM_ALERT2 2048 //TiM: This makes it full I think //#define ANIM_LOWER_LOOPING 2048 #define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK) #define MAXTOUCH 32 /** * \struct pmove_t */ typedef struct { // state (in / out) playerState_t *ps; // command (in) usercmd_t cmd; int tracemask; //!< collide against these types of surfaces int debugLevel; //!< if set, diagnostic output will be printed qboolean noFootsteps; //!< if the game is setup for no footsteps by the server qboolean pModDisintegration; //!< true if the Disintegration playerMod is on // results (out) int numtouch; int touchents[MAXTOUCH]; int useEvent; vec3_t mins, maxs; //!< bounding box size int watertype; int waterlevel; float xyspeed; float xyzspeed; //TiM : in case body is falling as well qboolean admin; qboolean medic; qboolean borg; //RPG-X - J2J - Adding a last fire timer for weapon animations ///int LastFireTime; // callbacks to test the world // these will be different functions during game and cgame void (*trace)( trace_t *results, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int passEntityNum, int contentMask ); int (*pointcontents)( const vec3_t point, int passEntityNum ); } pmove_t; // if a full pmove isn't done on the client, you can just update the angles void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd ); void Pmove (pmove_t *pmove); //RPG-X: J2J - Emote Vars (shared for server and client) //int CurrentEmote[MAX_CLIENTS]; //QVM HACK! //=================================================================================== // player_state->stats[] indexes // // maximum of MAX_STATS...currently 16 //TiM: Ooohhh! Usable space! /** \enum statIndex_t * Each of these array cells can store data up to 2^16 bits of data! * This is good in the fact that we are capable of using this place to store data * that is larger for its previous cells, for example, animation data. */ typedef enum { STAT_HEALTH, STAT_HOLDABLE_ITEM, STAT_WEAPONS, //!< 16 bit fields STAT_ARMOR, STAT_DEAD_YAW, //!< look this direction when dead (FIXME: get rid of?) STAT_CLIENTS_READY, //!< bit mask of clients wishing to exit the intermission (FIXME: configstring?) STAT_MAX_HEALTH, //!< health / armor limit, changable by handicap STAT_USEABLE_PLACED, //!< have we placed the detpack yet? //TiM : Placeholder for emotes data and anim holding TORSOTIMER, //!