Nuclide
Software Development Kit for id Tech
mapC.h
Go to the documentation of this file.
1#pragma target fte_5768
2#define QWSSQC
3
4/* MapProgs are map specific QuakeC progs.
5 Include this file with YOUR MapProgs! */
6
7#include "../shared/fteextensions.qc"
8#include "../shared/global.h"
9#include "../shared/math.h"
10#include "../shared/math_vector.h"
11
12#define entity_def(x, ...) const string x[] = { __VA_ARGS__ }
13
15#define thread(x) if (fork()) { x; abort(); }
16
29spawnClass(string className, vector desiredPos)
30{
31 entity(string, vector) spawnFunc = externvalue(0, "MapC_CreateEntityClass");
32 return spawnFunc(className, desiredPos);
33}
34
45void
46sendInput(entity target, string inputName, string dataString, entity activator)
47{
48 void(entity, entity, string, string) inputFunc = externvalue(0, "MapC_SendEntityInput");
49 inputFunc(target, activator, inputName, setValue);
50}
51
59void
60radiusDamage(vector position, float radius, int maxDamage, int minDamage, optional entity attacker)
61{
62 void(vector, float, int, int, entity) damageFunc = externvalue(0, "MapC_RadiusDamage");
63 damageFunc(position, radius, maxDamage, minDamage, attacker);
64}
65
69bool
70isAI(entity entityToCheck)
71{
72 bool(entity) checkFunc = externvalue(0, "MapC_IsAI");
73 return checkFunc(entityToCheck);
74}
75
79bool
80isAlive(entity entityToCheck)
81{
82 bool(entity) checkFunc = externvalue(0, "MapC_IsAlive");
83 return checkFunc(entityToCheck);
84}
85
89bool
90isGodMode(entity entityToCheck)
91{
92 bool(entity) checkFunc = externvalue(0, "MapC_IsGodMode");
93 return checkFunc(entityToCheck);
94}
95
99bool
100isPlayer(entity entityToCheck)
101{
102 bool(entity) checkFunc = externvalue(0, "MapC_IsPlayer");
103 return checkFunc(entityToCheck);
104}
105
109bool
110isSentient(entity entityToCheck)
111{
112 bool(entity) checkFunc = externvalue(0, "MapC_IsSentient");
113 return checkFunc(entityToCheck);
114}
vector(vector) normalize
entity() spawn
bool
Definition: fteextensions.qc:3838
string target
Definition: defs.h:23
bool isGodMode(entity entityToCheck)
Returns true/false depending on if the entity is in "god" mode.
Definition: mapC.h:90
bool isAI(entity entityToCheck)
Returns true/false depending on if the entity is an AI character.
Definition: mapC.h:70
void sendInput(entity target, string inputName, string dataString, entity activator)
Sends an input (See NSIO::Input) to an entity.
Definition: mapC.h:46
bool isAlive(entity entityToCheck)
Returns true/false depending on if the entity is alive.
Definition: mapC.h:80
void radiusDamage(vector position, float radius, int maxDamage, int minDamage, optional entity attacker)
Does damage to all entities within a specified radius with a linear falloff.
Definition: mapC.h:60
bool isSentient(entity entityToCheck)
Returns true/false depending on if the entity is either a player, or AI character.
Definition: mapC.h:110
bool isPlayer(entity entityToCheck)
Returns true/false depending on if the entity is a player.
Definition: mapC.h:100
entity spawnClass(string className, vector desiredPos)
Spawns an entity of a specific class.
Definition: mapC.h:29
void(float radius, vector texcoordbias) R_EndPolygonRibbon