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