]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/sv_monsters.qh
Merge branch 'terencehill/arc_suicide_message' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / sv_monsters.qh
index acf94eb7d78ad9f35b80ed1d9777cc0292889439..6a3fdd1c491dc54ba641da4b3b2738533539b7a9 100644 (file)
@@ -1,9 +1,38 @@
-#ifndef SV_MONSTERS_H
-#define SV_MONSTERS_H
+#pragma once
+
+#include "all.qh"
+
+float autocvar_g_monsters;
+bool autocvar_g_monsters_edit;
+bool autocvar_g_monsters_sounds;
+float autocvar_g_monsters_think_delay;
+int autocvar_g_monsters_max;
+int autocvar_g_monsters_max_perplayer;
+float autocvar_g_monsters_damageforcescale = 0.8;
+float autocvar_g_monsters_target_range;
+bool autocvar_g_monsters_target_infront;
+float autocvar_g_monsters_target_infront_range = 0.3;
+bool autocvar_g_monsters_target_infront_2d = true;
+float autocvar_g_monsters_attack_range;
+int autocvar_g_monsters_score_kill;
+int autocvar_g_monsters_score_spawned;
+bool autocvar_g_monsters_typefrag;
+bool autocvar_g_monsters_owners;
+bool autocvar_g_monsters_playerclip_collisions;
+float autocvar_g_monsters_miniboss_chance;
+float autocvar_g_monsters_miniboss_healthboost;
+float autocvar_g_monsters_drop_time;
+float autocvar_g_monsters_spawnshieldtime;
+bool autocvar_g_monsters_quake_resize = true;
+bool autocvar_g_monsters_teams;
+float autocvar_g_monsters_respawn_delay;
+bool autocvar_g_monsters_respawn;
+float autocvar_g_monsters_armor_blockpercent;
+float autocvar_g_monsters_healthbars;
+bool autocvar_g_monsters_lineofsight = true;
+//bool autocvar_g_monsters_ignoretraces = true;
 
 // stats networking
-.int stat_monsters_killed;
-.int stat_monsters_total;
 int monsters_total;
 int monsters_killed;
 
@@ -33,7 +62,6 @@ int monsters_killed;
 
 // other properties
 .bool monster_attack; // indicates whether an entity can be attacked by monsters
-.float spider_slowness; // effect time of slowness inflicted by spiders
 
 // monster state declarations
 const int MONSTER_MOVE_FOLLOW = 1; // monster will follow if in range, or stand still
@@ -70,29 +98,29 @@ const int MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
 .int monster_skill;
 
 // functions used elsewhere
-void Monster_Remove(entity mon);
+void Monster_Remove(entity this);
 
-void monsters_setstatus();
+void monsters_setstatus(entity this);
 
-bool Monster_Spawn(int mon_id);
+bool Monster_Spawn(entity this, bool check_appear, Monster mon);
 
-void monster_setupcolors(entity mon);
+void monster_setupcolors(entity this);
 
-void Monster_Touch();
+void Monster_Touch(entity this, entity toucher);
 
-void Monster_Move_2D(float mspeed, float allow_jumpoff);
+void Monster_Move_2D(entity this, float mspeed, float allow_jumpoff);
 
-void Monster_Delay(float repeat_count, float repeat_defer, float defer_amnt, void() func);
+void Monster_Delay(entity this, int repeat_count, float defer_amnt, void(entity) func);
 
-float Monster_Attack_Melee(entity targ, float damg, vector anim, float er, float animtime, int deathtype, float dostop);
+float Monster_Attack_Melee(entity this, entity targ, float damg, vector anim, float er, float animtime, int deathtype, float dostop);
 
-bool Monster_Attack_Leap(vector anm, void() touchfunc, vector vel, float animtime);
+bool Monster_Attack_Leap(entity this, vector anm, void(entity this, entity toucher) touchfunc, vector vel, float animtime);
 
-entity Monster_FindTarget(entity mon);
+entity Monster_FindTarget(entity this);
 
-void monster_makevectors(entity e);
+void monster_makevectors(entity this, entity targ);
 
-void Monster_Sound(.string samplefield, float sound_delay, float delaytoo, float chan);
+void Monster_Sound(entity this, .string samplefield, float sound_delay, float delaytoo, float chan);
 
 /** number of monsters spawned with mobspawn command */
 int totalspawned;
@@ -115,4 +143,8 @@ ALLMONSTERSOUNDS
 
 float GetMonsterSoundSampleField_notFound;
 
-#endif
+IntrusiveList g_monsters;
+STATIC_INIT(g_monsters) { g_monsters = IL_NEW(); }
+
+IntrusiveList g_monster_targets;
+STATIC_INIT(g_monster_targets) { g_monster_targets = IL_NEW(); }