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
|
|
|
#define CLASSEXPORT(classname,classa) void classname ( void ) { spawnfunc_##classa(); }
|
|
|
|
|
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;
|
2017-12-01 19:02:58 +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
|
|
|
|
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;
|
2018-12-05 16:02:49 +00:00
|
|
|
var int autocvar_fcs_fillweapons = FALSE; // This will automatically get ammo for the weapon you buy
|
2018-12-23 08:12:12 +00:00
|
|
|
var int autocvar_fcs_fix_bombtimer = FALSE;
|
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;
|
|
|
|
|
2018-12-09 04:58:28 +00:00
|
|
|
entity eActivator;
|
2016-12-01 17:50:48 +00:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
2016-12-11 10:10:03 +00:00
|
|
|
void Rules_RoundOver( int iTeamWon, int iMoneyReward, float fSilent );
|
2016-12-05 00:22:52 +00:00
|
|
|
float Rules_BuyingPossible( void );
|
2016-12-04 14:04:30 +00:00
|
|
|
void Timer_Begin( float fTime, float fMode);
|
2016-12-05 00:22:52 +00:00
|
|
|
void Spawn_RespawnClient( float fTeam );
|
|
|
|
void Spawn_CreateClient( float fTeam );
|
2016-12-04 14:04:30 +00:00
|
|
|
void Spawn_MakeSpectator( void );
|
2016-12-01 17:50:48 +00:00
|
|
|
void Client_SendEvent( entity eClient, float fEVType );
|
2016-12-07 00:05:06 +00:00
|
|
|
void Client_TriggerCamera( entity eTarget, vector vPos, vector vEndPos, float fResetTime );
|
2017-01-11 23:31:19 +00:00
|
|
|
|
2017-07-02 20:49:22 +00:00
|
|
|
void Weapon_Draw( float fWeapon );
|
2016-12-05 18:06:24 +00:00
|
|
|
void Weapon_SwitchBest( void );
|
2016-12-11 13:17:00 +00:00
|
|
|
void Weapon_UpdateCurrents( void );
|
2017-01-11 23:31:19 +00:00
|
|
|
void Weapon_DropWeapon( int iSlot );
|
2017-01-10 21:55:12 +00:00
|
|
|
float Weapon_GetAnimType( float fWeapon );
|
|
|
|
float Weapon_GetFireRate( float fWeapon );
|
|
|
|
float Weapon_GetReloadTime( float fWeapon );
|
2017-11-21 05:51:19 +00:00
|
|
|
void Weapon_Reload( float fWeapon );
|
2016-12-01 17:50:48 +00:00
|
|
|
|
2017-07-03 11:55:11 +00:00
|
|
|
void BaseGun_AccuracyCalc( void );
|
|
|
|
void BaseGun_Draw( void );
|
|
|
|
float BaseGun_PrimaryFire( void );
|
|
|
|
float BaseGun_Reload( void );
|
2017-01-03 01:02:00 +00:00
|
|
|
|
|
|
|
void BaseMelee_Draw( void );
|
2017-01-08 15:12:02 +00:00
|
|
|
int BaseMelee_Attack( void );
|
2017-01-07 16:29:27 +00:00
|
|
|
void Effect_Impact( int iType, vector vPos, vector vNormal );
|
2017-07-02 20:49:22 +00:00
|
|
|
void Effect_CreateSmoke( vector vPos );
|
|
|
|
void Effect_CreateExplosion( vector vPos );
|
|
|
|
void Effect_CreateFlash( entity eTarget );
|
|
|
|
|
2017-01-07 17:01:44 +00:00
|
|
|
void TraceAttack_FireBullets( int iShots, vector vPos );
|
2017-12-01 19:02:58 +00:00
|
|
|
void Damage_Radius( vector vOrigin, entity eAttacker, float fDamage, float fRadius, int iCheckClip );
|
2017-11-11 21:46:04 +00:00
|
|
|
void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos, int iSkipArmor );
|
2016-12-04 01:27:15 +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
|
|
|
|
|
|
|
void Input_Handle( void );
|
2017-01-03 22:25:27 +00:00
|
|
|
|
2017-01-10 21:55:12 +00:00
|
|
|
void Animation_PlayerTop( float fFrame );
|
|
|
|
void Animation_PlayerTopTemp( float fFrame, float fTime );
|
2017-03-04 20:08:59 +00:00
|
|
|
void Footsteps_Update( void );
|
2017-01-10 21:55:12 +00:00
|
|
|
|
2018-12-31 01:00:38 +00:00
|
|
|
string startspot;
|
2016-12-04 01:27:15 +00:00
|
|
|
string __fullspawndata;
|
2017-01-03 22:25:27 +00:00
|
|
|
hashtable hashMaterials;
|
|
|
|
|
|
|
|
#define NULL __NULL__
|