X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fsv_monsters.qc;h=a4f7e6acaace738772fd366d81f499b57a4cdf7c;hb=4ee2807b2d8f808928ef14b3e814945b3edb4350;hp=ea46be5f12e7343152b8920cc2f7089d9f6253bf;hpb=9185b58da6fe5f2b095d7066577e1e024b4d2798;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index ea46be5f1..a4f7e6aca 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -1,29 +1,27 @@ -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include - #include "../constants.qh" - #include "../teams.qh" - #include "../util.qh" - #include "all.qh" - #include "sv_monsters.qh" - #include "../physics/movelib.qh" - #include "../weapons/all.qh" - #include - #include - #include "../deathtypes/all.qh" - #include - #include - #include "../turrets/sv_turrets.qh" - #include "../turrets/util.qh" - #include "../vehicles/all.qh" - #include - #include - #include - #include "../triggers/triggers.qh" - #include - #include -#endif +#include "sv_monsters.qh" + +#include +#include +#include "../constants.qh" +#include "../teams.qh" +#include "../util.qh" +#include "all.qh" +#include "../physics/movelib.qh" +#include "../weapons/_mod.qh" +#include +#include +#include "../deathtypes/all.qh" +#include +#include +#include "../turrets/sv_turrets.qh" +#include "../turrets/util.qh" +#include "../vehicles/all.qh" +#include +#include +#include "../triggers/triggers.qh" +#include +#include +#include void monsters_setstatus(entity this) { @@ -94,6 +92,7 @@ bool Monster_ValidTarget(entity this, entity targ) || (SAME_TEAM(targ, this)) || (STAT(FROZEN, targ)) || (targ.alpha != 0 && targ.alpha < 0.5) + || (MUTATOR_CALLHOOK(MonsterValidTarget, this, targ)) ) { // if any of the above checks fail, target is not valid @@ -508,6 +507,8 @@ bool Monster_Respawn_Check(entity this) void Monster_Respawn(entity this) { Monster_Spawn(this, this.monsterid); } +.vector pos1, pos2; + void Monster_Dead_Fade(entity this) { if(Monster_Respawn_Check(this)) @@ -543,6 +544,7 @@ void Monster_Use(entity this, entity actor, entity trigger) if(Monster_ValidTarget(this, actor)) { this.enemy = actor; } } +.float pass_distance; vector Monster_Move_Target(entity this, entity targ) { // enemy is always preferred target @@ -686,6 +688,7 @@ void Monster_CalculateVelocity(entity this, vector to, vector from, float turnra } .entity draggedby; +.entity target2; void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed) {