diff --git a/HarmonySrc/Possession.cs b/HarmonySrc/Possession.cs
index 049e7b3..1d05cb0 100644
--- a/HarmonySrc/Possession.cs
+++ b/HarmonySrc/Possession.cs
@@ -1359,6 +1359,27 @@ namespace NecromancerTome
public const float GroundAimRange = 30f; // зрение зомби, как TauntRange
public const float GroundAimRadius = 0.6f;
+ /// Девианты и питомцы мода не бьют одержимого (13.10: «девианты не должны нападать на
+ /// одержимого»). Новую цель им гасят заплатки на выборе и присвоении (CharmPatch), но зомби, на которого
+ /// девиант или питомец уже шёл до вселения, оставался его целью - SetAttackTarget больше не звался.
+ /// Такую цель снимаем здесь, раз в полсекунды (из CheckBody).
+ static void DropAllyTargets(World _world, EntityAlive _z)
+ {
+ for (int i = 0; i < _world.EntityAlives.Count; i++)
+ {
+ EntityAlive e = _world.EntityAlives[i];
+ if (e == null || e == _z || e.IsDead() ||
+ e.GetAttackTarget() != _z && e.GetRevengeTarget() != _z ||
+ !NecroCharmSide.IsCharmed(e) && !SnakeControl.IsNecroEntity(e))
+ {
+ continue;
+ }
+ e.SetRevengeTarget(null);
+ e.SetAttackTarget(null, 0);
+ Debug.Log("[NecromancerTome] Possession: " + e.EntityName + " (" + e.entityId + ") больше не нападает на одержимого");
+ }
+ }
+
/// Раз в полсекунды: есть ли живой враг ближе BodyDangerRange к телу (как у змеи).
static void CheckBody(World _world, EntityAlive _z, float _dt)
{
@@ -1368,6 +1389,7 @@ namespace NecromancerTome
return;
}
_bodyCheck = 0.5f;
+ DropAllyTargets(_world, _z);
bool danger = false;
Vector3 body = _player.position;
float r2 = SnakeControl.BodyDangerRange * SnakeControl.BodyDangerRange;
diff --git a/NecromancerHarmony.dll b/NecromancerHarmony.dll
index 36ce62d..5346806 100644
Binary files a/NecromancerHarmony.dll and b/NecromancerHarmony.dll differ
diff --git a/NecromancerHarmony.pdb b/NecromancerHarmony.pdb
index 4bbaf38..167ff1f 100644
Binary files a/NecromancerHarmony.pdb and b/NecromancerHarmony.pdb differ