2016-12-01 17:50:48 +00:00
|
|
|
/*
|
|
|
|
OpenCS Project
|
2017-01-07 20:18:15 +00:00
|
|
|
Copyright (C) 2016, 2017 Marco "eukara" Hladik
|
2016-12-01 17:50:48 +00:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2016-12-05 00:22:52 +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
|
|
|
|
var float autocvar_mp_startmoney = 800;
|
|
|
|
var float autocvar_mp_buytime = 90;
|
|
|
|
var float autocvar_mp_freezetime = 6;
|
|
|
|
var float autocvar_mp_c4timer = 45;
|
|
|
|
var float autocvar_mp_roundtime = 5;
|
|
|
|
var float autocvar_mp_fillweapons = 0;
|
|
|
|
|
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
|
|
|
|
};
|
|
|
|
|
2016-12-01 17:50:48 +00:00
|
|
|
// Player specific fields
|
|
|
|
.float fInBuyZone;
|
|
|
|
.float fInHostageZone;
|
|
|
|
.float fInBombZone;
|
|
|
|
.float fMoney;
|
|
|
|
.float fStepTime;
|
2016-12-04 14:04:30 +00:00
|
|
|
.int iInGame;
|
2016-12-05 00:22:52 +00:00
|
|
|
.float fCharModel;
|
|
|
|
.int iCrouchAttempt;
|
2016-12-05 18:06:24 +00:00
|
|
|
.int iHasBomb;
|
2016-12-10 14:25:16 +00:00
|
|
|
.float fDeaths;
|
2016-12-11 10:10:03 +00:00
|
|
|
.int iEquipment;
|
|
|
|
.float armor;
|
|
|
|
.float fProgressBar;
|
|
|
|
|
2016-12-04 14:04:30 +00:00
|
|
|
// Match specific fields
|
|
|
|
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;
|
|
|
|
|
2016-12-07 00:05:06 +00:00
|
|
|
// Weapon specific fields
|
2016-12-13 19:15:09 +00:00
|
|
|
.int iCurrentMag;
|
2016-12-01 17:50:48 +00:00
|
|
|
.int iCurrentCaliber;
|
2016-12-11 13:17:00 +00:00
|
|
|
.float fSlotMelee, fSlotPrimary, fSlotSecondary, fSlotGrenade;
|
2016-12-01 17:50:48 +00:00
|
|
|
.float fAttackFinished;
|
2017-01-10 17:24:43 +00:00
|
|
|
.float fRadioFinished;
|
2016-12-02 23:12:10 +00:00
|
|
|
.float fAccuracy;
|
2017-01-03 01:02:00 +00:00
|
|
|
.float fFallVelocity;
|
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;
|
|
|
|
|
2017-04-19 22:04:47 +00:00
|
|
|
var float fGameFrametime;
|
|
|
|
|
2016-12-02 23:12:10 +00:00
|
|
|
// Generic entity fields
|
2016-12-02 16:54:40 +00:00
|
|
|
.int iUsable;
|
2016-12-02 23:12:10 +00:00
|
|
|
.int iBleeds;
|
2017-01-08 14:11:34 +00:00
|
|
|
.void( int iHitBody ) vPain;
|
|
|
|
.void( int iHitBody ) vDeath;
|
2016-12-07 19:38:26 +00:00
|
|
|
.float fRespawns;
|
2016-12-11 10:10:03 +00:00
|
|
|
.entity eUser;
|
2016-12-02 16:54:40 +00:00
|
|
|
|
|
|
|
// All about +use
|
|
|
|
entity eActivator;
|
|
|
|
.void() vUse;
|
|
|
|
.int iUsable;
|
2016-12-01 17:50:48 +00:00
|
|
|
|
|
|
|
// GoldSrc-Rendermode Fields
|
|
|
|
.vector rendercolor;
|
|
|
|
.float rendermode;
|
|
|
|
.float renderamt;
|
|
|
|
.float alpha;
|
|
|
|
|
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
|
|
|
|
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 );
|
2016-12-01 17:50:48 +00:00
|
|
|
|
2016-12-03 15:17:55 +00:00
|
|
|
void OpenCSGunBase_AccuracyCalc( void );
|
2016-12-01 17:50:48 +00:00
|
|
|
void OpenCSGunBase_Draw( void );
|
|
|
|
float OpenCSGunBase_PrimaryFire( void );
|
|
|
|
float OpenCSGunBase_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-03 01:02:00 +00:00
|
|
|
|
2016-12-05 18:06:24 +00:00
|
|
|
float Player_GetMaxSpeed( float fWeapon );
|
2016-12-02 23:12:10 +00:00
|
|
|
|
2017-01-07 16:29:27 +00:00
|
|
|
void Effect_Impact( int iType, vector vPos, vector vNormal );
|
2017-01-07 17:01:44 +00:00
|
|
|
void TraceAttack_FireBullets( int iShots, vector vPos );
|
2016-12-07 02:35:01 +00:00
|
|
|
void Damage_Radius( vector vOrigin, entity eAttacker, float fDamage, float fRadius );
|
2017-01-03 01:02:00 +00:00
|
|
|
void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos );
|
2016-12-04 01:27:15 +00:00
|
|
|
|
2017-01-10 15:45:41 +00:00
|
|
|
void Entities_UseTargets( void );
|
2016-12-07 19:38:26 +00:00
|
|
|
void Entities_InitRespawnable( void() vRespawnFunc );
|
|
|
|
void Entities_Respawn( void );
|
|
|
|
|
2016-12-17 19:02:24 +00:00
|
|
|
void Ammo_BuyPrimary( float fFree );
|
|
|
|
void Ammo_BuySecondary( float fFree );
|
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
|
|
|
|
2016-12-04 01:27:15 +00:00
|
|
|
// WIP
|
|
|
|
string __fullspawndata;
|
2017-01-03 22:25:27 +00:00
|
|
|
hashtable hashMaterials;
|
|
|
|
|
|
|
|
#define NULL __NULL__
|