]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/monsters/sv_monsters.qh
Rename defs to qh
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / sv_monsters.qh
1 #ifndef SV_MONSTERS_H
2 #define SV_MONSTERS_H
3
4 #if defined(CSQC)
5 #elif defined(MENUQC)
6 #elif defined(SVQC)
7         #include "../util-pre.qh"
8     #include "../../server/sys-pre.qh"
9     #include "../../dpdefs/progsdefs.qh"
10     #include "../../dpdefs/dpextensions.qh"
11     #include "../../server/sys-post.qh"
12     #include "../../warpzonelib/anglestransform.qh"
13     #include "../../warpzonelib/mathlib.qh"
14     #include "../../warpzonelib/common.qh"
15     #include "../../warpzonelib/util_server.qh"
16     #include "../../warpzonelib/server.qh"
17     #include "../constants.qh"
18     #include "../stats.qh"
19     #include "../teams.qh"
20     #include "../util.qh"
21     #include "../nades.qh"
22     #include "../buffs.qh"
23     #include "../test.qh"
24     #include "../counting.qh"
25     #include "../urllib.qh"
26     #include "../command/markup.qh"
27     #include "../command/rpn.qh"
28     #include "../command/generic.qh"
29     #include "../command/shared_defs.qh"
30     #include "../net_notice.qh"
31     #include "../animdecide.qh"
32     #include "monsters.qh"
33 #endif
34
35 .string spawnmob;
36 .float monster_attack;
37
38 .entity monster_owner; // new monster owner entity, fixes non-solid monsters
39
40 .float stat_monsters_killed; // stats
41 .float stat_monsters_total;
42 float monsters_total;
43 float monsters_killed;
44 void monsters_setstatus(); // monsters.qc
45 .float monster_moveflags; // checks where to move when not attacking
46
47 .float wander_delay;
48 .float wander_distance;
49
50 .float monster_lifetime;
51
52 .float spider_slowness; // special spider timer
53
54 void monster_remove(entity mon); // removes a monster
55
56 .float(float attack_type) monster_attackfunc;
57 const int MONSTER_ATTACK_MELEE = 1;
58 const int MONSTER_ATTACK_RANGED = 2;
59
60 .float monster_skill;
61 const float MONSTER_SKILL_EASY = 1;
62 const float MONSTER_SKILL_MEDIUM = 3;
63 const float MONSTER_SKILL_HARD = 5;
64 const float MONSTER_SKILL_INSANE = 7;
65 const float MONSTER_SKILL_NIGHTMARE = 10;
66
67 .float fish_wasdrowning; // used to reset a drowning fish's angles if it reaches water again
68
69 .float candrop;
70
71 .float attack_range;
72
73 .float spawn_time; // stop monster from moving around right after spawning
74
75 .string oldtarget2;
76 .float lastshielded;
77
78 .vector oldangles;
79
80 .float m_armor_blockpercent;
81
82 // monster sounds
83 // copied from player sounds
84 .float msound_delay; // temporary antilag system
85 #define ALLMONSTERSOUNDS \
86                 _MSOUND(death) \
87                 _MSOUND(sight) \
88                 _MSOUND(ranged) \
89                 _MSOUND(melee) \
90                 _MSOUND(pain) \
91                 _MSOUND(spawn) \
92                 _MSOUND(idle)
93
94 #define _MSOUND(m) .string monstersound_##m;
95 ALLMONSTERSOUNDS
96 #undef _MSOUND
97
98 float GetMonsterSoundSampleField_notFound;
99
100 const int MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
101 const int MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
102 const int MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
103
104 // new flags
105 const int MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
106 const int MONSTERFLAG_NORESPAWN = 4;
107 const int MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
108 const int MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
109 const int MONSTERFLAG_MINIBOSS = 64;    // monster spawns as mini-boss (also has a chance of naturally becoming one)
110 const int MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
111 const int MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
112 const int MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
113
114 .int monster_movestate; // used to tell what the monster is currently doing
115 const int MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
116 const int MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
117 const int MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
118 const int MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
119 const int MONSTER_MOVE_ENEMY = 5; // used only as a movestate
120
121 const int MONSTER_STATE_ATTACK_LEAP = 1;
122 const int MONSTER_STATE_ATTACK_MELEE = 2;
123 #endif