Одержимость от первого лица: руки как у игрока, серые, только у гуманоидов обычной комплекции

FpArms собирает руки для первого лица по шагам игры (baseRigFPPrefab + голая кожа basePartsFP, аниматор FPPlayerController), пол по зомби (BaseMale/BaseFemale), кожа серая через _Tint, без одежды. ~/ё работает только у списка гуманоидов; подсказка - только им. Коллайдеры рук выключены. Ударов пока нет.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AlexCube
2026-10-13 15:32:33 +03:00
co-authored by Claude Opus 5.5
parent eb540bd500
commit f5f4d92cef
4 changed files with 157 additions and 3 deletions
+15 -3
View File
@@ -356,6 +356,7 @@ namespace NecromancerTome
Active = false;
FirstPerson = false;
HideBody(null);
FpArms.Hide(_player);
RatLoot.CloseIfViewing();
WolfBag.CloseWindow();
RatPhase.Stop(GameManager.Instance?.World, Zombie, "выход из одержимости");
@@ -574,13 +575,20 @@ namespace NecromancerTome
// кнопка геймпада (тест 03.10: «подрыва нету»).
detonate = input.Activate.WasPressed || input.PermanentActions.Activate.WasPressed;
}
if (input != null && !gui && (input.CameraChange.WasPressed || input.QuickMenu.WasPressed || input.PermanentActions.QuickMenu.WasPressed))
// Только гуманоиды обычной комплекции (указание 13.10, FpArms.Allows) - у остальных ~/ё ничего не делает.
if (input != null && !gui && FpArms.Allows(z) &&
(input.CameraChange.WasPressed || input.QuickMenu.WasPressed || input.PermanentActions.QuickMenu.WasPressed))
{
FirstPerson = !FirstPerson;
_fpEye = Vector3.zero;
if (!FirstPerson)
if (FirstPerson)
{
FpArms.Show(_player, z);
}
else
{
HideBody(null);
FpArms.Hide(_player);
}
Debug.Log("[NecromancerTome] Possession: вид от " + (FirstPerson ? "первого" : "третьего") + " лица");
}
@@ -1494,7 +1502,11 @@ namespace NecromancerTome
/// <summary>Подсказка при вселении: что умеет этот зомби.</summary>
static void Hint(EntityPlayerLocal _p, EntityAlive _z)
{
string text = Localization.Get("necroPossessHintBase") + ", " + Localization.Get("necroPossessHintView");
string text = Localization.Get("necroPossessHintBase");
if (FpArms.Allows(_z))
{
text += ", " + Localization.Get("necroPossessHintView");
}
if (Flying)
{
text += ", " + Localization.Get("necroPossessHintFly");