]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/monsters/sv_monsters.qh
Merge branch 'master' into terencehill/music_player
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / sv_monsters.qh
1 .string spawnmob;
2 .float monster_attack;
3
4 .entity monster_owner; // new monster owner entity, fixes non-solid monsters
5
6 .float stat_monsters_killed; // stats
7 .float stat_monsters_total;
8 float monsters_total;
9 float monsters_killed;
10 void monsters_setstatus(); // monsters.qc
11 .float monster_moveflags; // checks where to move when not attacking
12
13 .float wander_delay;
14 .float wander_distance;
15
16 .float monster_lifetime;
17
18 .float spider_slowness; // special spider timer
19
20 void monster_remove(entity mon); // removes a monster
21
22 .float(float attack_type) monster_attackfunc;
23 const float MONSTER_ATTACK_MELEE = 1;
24 const float MONSTER_ATTACK_RANGED = 2;
25
26 .float monster_skill;
27 const float MONSTER_SKILL_EASY = 1;
28 const float MONSTER_SKILL_MEDIUM = 3;
29 const float MONSTER_SKILL_HARD = 5;
30 const float MONSTER_SKILL_INSANE = 7;
31 const float MONSTER_SKILL_NIGHTMARE = 10;
32
33 .float fish_wasdrowning; // used to reset a drowning fish's angles if it reaches water again
34
35 .float candrop;
36
37 .float attack_range;
38
39 .float spawn_time; // stop monster from moving around right after spawning
40
41 .string oldtarget2;
42 .float lastshielded;
43
44 .vector oldangles;
45
46 .float m_armor_blockpercent;
47
48 // monster sounds
49 // copied from player sounds
50 .float msound_delay; // temporary antilag system
51 #define ALLMONSTERSOUNDS \
52                 _MSOUND(death) \
53                 _MSOUND(sight) \
54                 _MSOUND(ranged) \
55                 _MSOUND(melee) \
56                 _MSOUND(pain) \
57                 _MSOUND(spawn) \
58                 _MSOUND(idle)
59
60 #define _MSOUND(m) .string monstersound_##m;
61 ALLMONSTERSOUNDS
62 #undef _MSOUND
63
64 float GetMonsterSoundSampleField_notFound;
65
66 const float MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
67 const float MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
68 const float MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
69
70 // new flags
71 const float MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
72 const float MONSTERFLAG_NORESPAWN = 4;
73 const float MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
74 const float MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
75 const float MONSTERFLAG_MINIBOSS = 64;  // monster spawns as mini-boss (also has a chance of naturally becoming one)
76 const float MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
77 const float MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
78 const float MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
79
80 .float monster_movestate; // used to tell what the monster is currently doing
81 const float MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
82 const float MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
83 const float MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
84 const float MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
85 const float MONSTER_MOVE_ENEMY = 5; // used only as a movestate
86
87 const float MONSTER_STATE_ATTACK_LEAP = 1;
88 const float MONSTER_STATE_ATTACK_MELEE = 2;