2019-01-16 16:43:50 +00:00
|
|
|
/***
|
|
|
|
*
|
|
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
|
|
*
|
|
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
|
|
*
|
|
|
|
****/
|
2016-12-01 17:50:48 +00:00
|
|
|
|
2018-12-31 01:00:38 +00:00
|
|
|
|
2017-03-04 20:08:59 +00:00
|
|
|
#define VEC_PLAYER_VIEWPOS '0 0 20'
|
2016-12-05 00:22:52 +00:00
|
|
|
#define VEC_PLAYER_CVIEWPOS '0 0 12'
|
|
|
|
|
2016-12-18 09:09:01 +00:00
|
|
|
// Server cvars
|
2018-01-29 17:03:22 +00:00
|
|
|
var int autocvar_mp_winlimit = 0;
|
|
|
|
var int autocvar_mp_halftime = 0;
|
|
|
|
var int autocvar_mp_startmoney = 800;
|
2016-12-18 09:09:01 +00:00
|
|
|
var float autocvar_mp_buytime = 90;
|
|
|
|
var float autocvar_mp_freezetime = 6;
|
|
|
|
var float autocvar_mp_c4timer = 45;
|
|
|
|
var float autocvar_mp_roundtime = 5;
|
2017-11-16 02:25:20 +00:00
|
|
|
var float autocvar_mp_timelimit = 60;
|
2017-11-15 21:36:55 +00:00
|
|
|
var string autocvar_motdfile = "motd.txt";
|
2018-09-20 20:38:01 +00:00
|
|
|
var int autocvar_mp_friendlyfire = FALSE;
|
2017-11-16 02:25:20 +00:00
|
|
|
|
2017-12-01 19:02:58 +00:00
|
|
|
// New, FreeCS exclusive variables
|
2019-01-05 15:33:39 +00:00
|
|
|
var int autocvar_fcs_voxannounce = FALSE;
|
2019-03-24 15:28:19 +00:00
|
|
|
var int autocvar_fcs_knifeonly = FALSE; /* Disallows buying and spawning with weps */
|
|
|
|
var int autocvar_fcs_swapteams = FALSE; /* Swaps spawnpoints */
|
|
|
|
var int autocvar_fcs_nopickups = FALSE; /* Disable weapon items */
|
2017-12-01 19:02:58 +00:00
|
|
|
var int autocvar_fcs_reward_kill = 300;
|
|
|
|
var int autocvar_fcs_penalty_pain = -150;
|
|
|
|
var int autocvar_fcs_penalty_kill = -1500;
|
|
|
|
var int autocvar_fcs_maxmoney = 16000;
|
2019-03-24 15:28:19 +00:00
|
|
|
var int autocvar_fcs_fillweapons = FALSE; /* This will automatically get ammo for the weapon you buy */
|
|
|
|
var int autocvar_fcs_fix_bombtimer = FALSE; /* If true, the bomb-timer will dictate the round-end */
|
|
|
|
var int autocvar_fcs_bombaltthrow = FALSE; /* Randomize the bomb-throw every time ever so slightly */
|
2017-12-01 19:02:58 +00:00
|
|
|
|
2017-11-16 02:25:20 +00:00
|
|
|
// Mapcycle features
|
|
|
|
var string autocvar_mapcyclefile = "mapcycle.txt";
|
|
|
|
var int iMapCycleCount;
|
|
|
|
string *sMapCycle;
|
|
|
|
|
2017-01-03 01:02:00 +00:00
|
|
|
// Hit Group standards
|
|
|
|
enum {
|
|
|
|
BODY_DEFAULT,
|
|
|
|
BODY_HEAD,
|
|
|
|
BODY_CHEST,
|
|
|
|
BODY_STOMACH,
|
|
|
|
BODY_ARMLEFT,
|
|
|
|
BODY_ARMRIGHT,
|
|
|
|
BODY_LEGLEFT,
|
|
|
|
BODY_LEGRIGHT
|
|
|
|
};
|
|
|
|
|
2017-06-21 12:50:02 +00:00
|
|
|
// Grenade states
|
|
|
|
enum {
|
|
|
|
GRENADE_UNREADY,
|
|
|
|
GRENADE_PULLING,
|
|
|
|
GRENADE_READY
|
|
|
|
};
|
|
|
|
|
2016-12-04 14:04:30 +00:00
|
|
|
// Match specific fields
|
2018-01-29 18:14:30 +00:00
|
|
|
int iRounds;
|
2016-12-04 14:04:30 +00:00
|
|
|
int iWon_T;
|
|
|
|
int iWon_CT;
|
2016-12-05 18:06:24 +00:00
|
|
|
int iAlivePlayers_T;
|
|
|
|
int iAlivePlayers_CT;
|
2016-12-13 19:15:09 +00:00
|
|
|
|
2016-12-01 17:50:48 +00:00
|
|
|
float fGameState;
|
|
|
|
float fGameTime;
|
|
|
|
|
|
|
|
// Game specific fields
|
2016-12-02 16:54:40 +00:00
|
|
|
int iHostagesMax;
|
2016-12-04 14:04:30 +00:00
|
|
|
int iBombZones;
|
2016-12-04 14:56:41 +00:00
|
|
|
int iRescueZones;
|
2016-12-07 00:05:06 +00:00
|
|
|
int iBuyZones;
|
2016-12-08 20:24:09 +00:00
|
|
|
int iVIPZones;
|
2017-01-10 17:24:43 +00:00
|
|
|
int iEscapeZones;
|
2016-12-07 00:05:06 +00:00
|
|
|
int iBuyRestriction; // For info_map_parameters
|
2017-01-10 15:45:41 +00:00
|
|
|
int iBombRadius; // For info_map_parameters
|
2016-12-04 14:04:30 +00:00
|
|
|
|
2016-12-07 23:09:50 +00:00
|
|
|
int iHostagesRescued;
|
|
|
|
int iBombPlanted;
|
|
|
|
|
2019-03-21 19:32:45 +00:00
|
|
|
void Rules_RoundOver(int iTeamWon, int iMoneyReward, float fSilent);
|
|
|
|
float Rules_BuyingPossible(void);
|
|
|
|
void Timer_Begin(float fTime, float fMode);
|
|
|
|
void Spawn_RespawnClient(float fTeam);
|
|
|
|
void Spawn_CreateClient(float fTeam);
|
|
|
|
void Spawn_MakeSpectator(void);
|
|
|
|
void Client_SendEvent(entity eClient, float fEVType);
|
|
|
|
|
|
|
|
void Weapon_Draw(float fWeapon);
|
|
|
|
void Weapon_SwitchBest(void);
|
|
|
|
void Weapon_UpdateCurrents(void);
|
|
|
|
void Weapon_DropWeapon(int iSlot);
|
|
|
|
float Weapon_GetAnimType(float fWeapon);
|
|
|
|
float Weapon_GetFireRate(float fWeapon);
|
|
|
|
float Weapon_GetReloadTime(float fWeapon);
|
|
|
|
void Weapon_Reload(float fWeapon);
|
|
|
|
|
|
|
|
void BaseGun_AccuracyCalc(void);
|
|
|
|
void BaseGun_Draw(void);
|
|
|
|
float BaseGun_PrimaryFire(void);
|
|
|
|
float BaseGun_Reload(void);
|
2019-01-19 04:50:25 +00:00
|
|
|
void Effect_CreateFlash(entity targ);
|
2019-03-21 19:32:45 +00:00
|
|
|
void BaseMelee_Draw(void);
|
|
|
|
int BaseMelee_Attack(void);
|
2017-07-02 20:49:22 +00:00
|
|
|
|
2018-12-05 16:02:49 +00:00
|
|
|
void Ammo_AutoFill(float fWeapon);
|
|
|
|
void Ammo_BuyPrimary(void);
|
|
|
|
void Ammo_BuySecondary(void);
|
2017-01-03 01:02:00 +00:00
|
|
|
|
2019-03-21 19:32:45 +00:00
|
|
|
void Animation_PlayerTop(float fFrame);
|
|
|
|
void Animation_PlayerTopTemp(float fFrame, float fTime);
|
2017-01-03 22:25:27 +00:00
|
|
|
|
2019-03-21 19:32:45 +00:00
|
|
|
void Damage_Apply(entity eTarget, entity eAttacker, float iDamage, vector vHitPos, int iSkipArmor);
|
2019-01-29 02:40:14 +00:00
|
|
|
|
2017-01-03 22:25:27 +00:00
|
|
|
#define NULL __NULL__
|