2019-09-01 02:18:15 +00:00
|
|
|
/*
|
2020-04-07 12:46:23 +00:00
|
|
|
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
2019-09-01 02:18:15 +00:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
2019-01-19 04:50:25 +00:00
|
|
|
|
2020-05-03 03:26:06 +00:00
|
|
|
#include "gamerules.h"
|
|
|
|
#include "sentences.h"
|
|
|
|
#include "skill.h"
|
|
|
|
#include "logging.h"
|
|
|
|
#include "vox.h"
|
|
|
|
#include "nodes.h"
|
|
|
|
#include "spawn.h"
|
|
|
|
#include "weapons.h"
|
2020-08-14 20:13:03 +00:00
|
|
|
#include "plugins.h"
|
2020-09-04 19:28:06 +00:00
|
|
|
#include "vehicles.h"
|
2020-05-03 03:26:06 +00:00
|
|
|
|
2020-04-12 13:50:42 +00:00
|
|
|
#define CLASSEXPORT(classname,classa) void classname(void) { spawnfunc_##classa(); }
|
2019-01-19 04:50:25 +00:00
|
|
|
|
2020-10-17 23:10:21 +00:00
|
|
|
#define AREAPORTAL_CLOSED 0
|
|
|
|
#define AREAPORTAL_OPEN 1
|
|
|
|
|
2019-03-01 22:35:28 +00:00
|
|
|
var int autocvar_mp_flashlight = TRUE;
|
|
|
|
|
2020-05-03 03:26:06 +00:00
|
|
|
void FX_Impact(int, vector, vector);
|
|
|
|
void FX_Explosion(vector);
|
|
|
|
void FX_GibHuman(vector);
|
2020-04-12 13:50:42 +00:00
|
|
|
void Footsteps_Update(void);
|
2019-03-12 00:22:50 +00:00
|
|
|
void Vox_Broadcast(string sMessage);
|
2020-04-23 04:51:39 +00:00
|
|
|
|
2020-05-03 03:26:06 +00:00
|
|
|
void TraceAttack_FireBullets(int, vector, int, vector, int);
|
2020-04-23 04:51:39 +00:00
|
|
|
#ifdef BULLETPENETRATION
|
|
|
|
void TraceAttack_SetPenetrationPower(int);
|
|
|
|
#endif
|
|
|
|
|
2020-04-12 13:50:42 +00:00
|
|
|
void Damage_Radius(vector, entity, float, float, int, int);
|
|
|
|
void Damage_Apply(entity, entity, float, int, int);
|
2020-05-03 03:26:06 +00:00
|
|
|
void Client_TriggerCamera(entity, vector, vector, float);
|
2020-04-03 22:52:45 +00:00
|
|
|
void Client_FixAngle(entity, vector);
|
2019-02-28 23:04:33 +00:00
|
|
|
void Game_Input(void);
|
2020-03-08 09:59:46 +00:00
|
|
|
int Rules_IsTeamPlay(void);
|
2019-01-19 04:50:25 +00:00
|
|
|
|
|
|
|
entity eActivator;
|
2020-03-24 07:20:43 +00:00
|
|
|
entity g_eAttacker;
|
2019-01-19 04:50:25 +00:00
|
|
|
|
2020-03-24 07:41:06 +00:00
|
|
|
/* Generic entity fields */
|
2020-04-12 13:50:42 +00:00
|
|
|
.void(void) PlayerUse;
|
2019-01-19 04:50:25 +00:00
|
|
|
.int iBleeds;
|
|
|
|
.entity eUser;
|
|
|
|
.float material;
|
2019-03-19 19:01:24 +00:00
|
|
|
.float deaths;
|
2019-01-19 04:50:25 +00:00
|
|
|
.float fStepTime;
|
2020-10-22 14:30:37 +00:00
|
|
|
.float identity;
|
2019-01-19 04:50:25 +00:00
|
|
|
|
2020-03-24 07:41:06 +00:00
|
|
|
/* in idTech the .owner field causes collisions to fail against set entity,
|
|
|
|
* we don't want this all of the time. so use this as a fallback */
|
|
|
|
.entity real_owner;
|
|
|
|
|
2020-04-19 10:01:20 +00:00
|
|
|
int trace_surfaceflagsi;
|
2019-01-19 04:50:25 +00:00
|
|
|
string startspot;
|
|
|
|
string __fullspawndata;
|
|
|
|
hashtable hashMaterials;
|
2019-09-28 23:54:29 +00:00
|
|
|
|
2020-04-26 11:17:19 +00:00
|
|
|
/* damage related tempglobals, like trace_* */
|
|
|
|
entity g_dmg_eAttacker;
|
|
|
|
entity g_dmg_eTarget;
|
|
|
|
int g_dmg_iDamage;
|
|
|
|
int g_dmg_iHitBody;
|
|
|
|
int g_dmg_iFlags;
|
|
|
|
int g_dmg_iWeapon;
|