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