7 .entity monster_owner; // new monster owner entity, fixes non-solid monsters
9 .float stat_monsters_killed; // stats
10 .float stat_monsters_total;
12 float monsters_killed;
13 void monsters_setstatus(); // monsters.qc
14 .float monster_moveflags; // checks where to move when not attacking
17 .float wander_distance;
19 .float monster_lifetime;
21 .float spider_slowness; // special spider timer
23 void monster_remove(entity mon); // removes a monster
25 .float(float attack_type) monster_attackfunc;
26 const int MONSTER_ATTACK_MELEE = 1;
27 const int MONSTER_ATTACK_RANGED = 2;
30 const float MONSTER_SKILL_EASY = 1;
31 const float MONSTER_SKILL_MEDIUM = 3;
32 const float MONSTER_SKILL_HARD = 5;
33 const float MONSTER_SKILL_INSANE = 7;
34 const float MONSTER_SKILL_NIGHTMARE = 10;
36 .float fish_wasdrowning; // used to reset a drowning fish's angles if it reaches water again
42 .float spawn_time; // stop monster from moving around right after spawning
49 .float m_armor_blockpercent;
52 // copied from player sounds
53 .float msound_delay; // temporary antilag system
54 #define ALLMONSTERSOUNDS \
63 #define _MSOUND(m) .string monstersound_##m;
67 float GetMonsterSoundSampleField_notFound;
69 const int MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
70 const int MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
71 const int MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
74 const int MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
75 const int MONSTERFLAG_NORESPAWN = 4;
76 const int MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
77 const int MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
78 const int MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one)
79 const int MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
80 const int MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
81 const int MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
83 .int monster_movestate; // used to tell what the monster is currently doing
84 const int MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
85 const int MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
86 const int MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
87 const int MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
88 const int MONSTER_MOVE_ENEMY = 5; // used only as a movestate
90 const int MONSTER_STATE_ATTACK_LEAP = 1;
91 const int MONSTER_STATE_ATTACK_MELEE = 2;
93 float monster_initialize(float mon_id);
94 float monster_leap (float anm, void() touchfunc, vector vel, float anim_finished);
95 void monster_makevectors(entity e);
96 float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, float deathtype, float dostop);
97 void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_run, float manim_walk, float manim_idle);
98 void monster_setupcolors(entity mon);
99 float Monster_SkillModifier();
100 void MonsterTouch ();