]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/monsters/sv_monsters.qh
Merge remote-tracking branch 'origin/Mario/teamswitch_fix2'
[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 .float monstercount; // per player monster count
6
7 .float stat_monsters_killed; // stats
8 .float stat_monsters_total;
9 float monsters_total;
10 float monsters_killed;
11 void monsters_setstatus(); // monsters.qc
12 .float monster_moveflags; // checks where to move when not attacking
13
14 .float spider_slowness; // special spider timer
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 monster_skill;
23 const float MONSTER_SKILL_EASY = 1;
24 const float MONSTER_SKILL_MEDIUM = 3;
25 const float MONSTER_SKILL_HARD = 5;
26 const float MONSTER_SKILL_INSANE = 7;
27 const float MONSTER_SKILL_NIGHTMARE = 10;
28
29 .float fish_wasdrowning; // used to reset a drowning fish's angles if it reaches water again
30
31 .float candrop;
32
33 .float attack_range;
34
35 .float spawn_time; // stop monster from moving around right after spawning
36
37 .string oldtarget2;
38 .float lastshielded;
39
40 .vector oldangles;
41
42 .float m_armor_blockpercent;
43
44 // monster sounds
45 // copied from player sounds
46 .float msound_delay; // temporary antilag system
47 #define ALLMONSTERSOUNDS \
48                 _MSOUND(death) \
49                 _MSOUND(sight) \
50                 _MSOUND(ranged) \
51                 _MSOUND(melee) \
52                 _MSOUND(pain) \
53                 _MSOUND(spawn) \
54                 _MSOUND(idle)
55
56 #define _MSOUND(m) .string monstersound_##m;
57 ALLMONSTERSOUNDS
58 #undef _MSOUND
59
60 float GetMonsterSoundSampleField_notFound;
61
62 const float MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
63 const float MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
64 const float MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
65
66 // new flags
67 const float MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
68 const float MONSTERFLAG_NORESPAWN = 4;
69 const float MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
70 const float MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
71 const float MONSTERFLAG_MINIBOSS = 64;  // monster spawns as mini-boss (also has a chance of naturally becoming one)
72 const float MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
73 const float MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
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;