X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fmonsters%2Flib%2Fdefs.qh;h=f6f03ddc285068bf32719a63235ce32f7b0833c3;hb=7a7d2ac932dc4fd051e6f26f206f04c9f4f70f7e;hp=eca1d73403d26fd11fbf2bd56d70c8af8ace1689;hpb=49f862e3de34ebd45b97f346feece776401166ae;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/monsters/lib/defs.qh b/qcsrc/server/monsters/lib/defs.qh index eca1d7340..f6f03ddc2 100644 --- a/qcsrc/server/monsters/lib/defs.qh +++ b/qcsrc/server/monsters/lib/defs.qh @@ -1,12 +1,16 @@ -.float sprite_height; - .void() attack_melee; .float() attack_ranged; .float() checkattack; -entity(entity ent) FindTarget; +.float candrop; + +.float spawn_time; // stop monster from moving around right after spawning + +.string oldtarget2; +.float lastshielded; -.float spawner_monstercount; +const float MONSTER_RESPAWN_SPAWNPOINT = 10; // re-spawn at original spawn point +const float MONSTER_RESPAWN_DEATHPOINT = 11; // re-spawn where we died .float monster_respawned; // used to make sure we're not recounting respawned monster stats @@ -18,18 +22,26 @@ const float MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill 4 const float MONSTERSKILL_NOTINSANE = 2048; // monster will not spawn on skill 5 const float MONSTERSKILL_NOTNIGHTMARE = 4096; // monster will not spawn on skill >= 6 +// legacy flags const float MONSTERFLAG_NORESPAWN = 2; const float MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one) const float MONSTERFLAG_NOWANDER = 128; // disable wandering around (currently unused) const float MONSTERFLAG_APPEAR = 256; // delay spawn until triggered -const float MONSTERFLAG_GIANT = 512; // experimental giant monsters feature -const float MONSTERFLAG_SPAWNED = 1024; // flag for spawned monsters +const float MONSTERFLAG_SPAWNED = 512; // flag for spawned monsters + +.float msound_delay; // restricts some monster sounds +.string msound_idle; +.string msound_death; +.string msound_attack_melee; +.string msound_attack_ranged; +.string msound_spawn; +.string msound_sight; +.string msound_pain; .void() monster_spawnfunc; .void() monster_die; .void() monster_delayedattack; -.float monster_moveflags; // checks where to move when not attacking .float monster_movestate; // used to tell what the monster is currently doing const float MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still const float MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around @@ -37,6 +49,5 @@ const float MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn locatio const float MONSTER_MOVE_NOMOVE = 4; // monster simply stands still const float MONSTER_MOVE_ENEMY = 5; // used only as a movestate -float enemy_range () { return vlen(self.enemy.origin - self.origin); } - -float MONSTER_STATE_ATTACK_LEAP = 1; // the start of something big? +const float MONSTER_STATE_ATTACK_LEAP = 1; +const float MONSTER_STATE_ATTACK_MELEE = 2;