[B42.13.2] FixMeleeHitbox Fix
О материале
«[B42.13.2] FixMeleeHitbox Fix» — материал мастерской Project Zomboid. Карты, транспорт, оружие и моды для выживания. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
🔧 Correção de “Intangibilidade” e Falhas de Hit em Armas Melee
O problema de intangibilidade e das falhas de acerto com armas melee acontecia porque as modificações no hitcone da arma nem sempre eram persistentes. O próprio jogo pode resetar os atributos da arma em várias situações, como:
- Trocar de arma 🔁
- Carregar o jogo 💾
- Início da sessão 🚪
- Em alguns casos, até durante ataques ⚔️
Quando isso ocorria, os valores corrigidos do ângulo de ataque eram perdidos, fazendo os zumbis parecerem “imunes” ou fora do alcance do golpe.
🛠️ Nova Abordagem: Active Enforcement (Reforço Ativo)
Para mitigar esse problema de forma drástica, o arquivo FixMeleeHitbox.lua foi reescrito utilizando uma abordagem de reforço ativo, garantindo que o fix nunca se perca.
📌 O que mudou
🔄 Verificação Contínua (OnPlayerUpdate)
Agora, a cada tick/frame, o script verifica se a arma melee na mão do jogador está com os valores corretos de ângulo:
MinAngle = 0.0
MaxAngle = 1.2
Nota técnica: Essa verificação é extremamente leve (apenas leitura de dois valores), mas garante que, se o jogo recriar o objeto Java da arma ou resetar seus stats, o fix seja reaplicado instantaneamente.
🚪 Verificação ao Carregar o Jogo (OnGameStart)
Foi adicionado um evento para forçar a aplicação do fix assim que o jogador entra no jogo, cobrindo o caso em que a arma melee já está equipada no momento do load.
⚡ OnEquipPrimary Mantido
O evento de equipar arma foi mantido para garantir resposta imediata ao trocar de arma melee.
🔧 Fix for “Intangibility” and Hit Failures with Melee Weapons
The issue of intangibility and missed hits with melee weapons occurred because hitcone modifications were not always persistent. The game itself can reset weapon attributes in several situations, such as:
- Switching weapons 🔁
- Loading a save 💾
- Session start 🚪
- In some cases, even during attacks ⚔️
When this happened, the corrected attack angle values were lost, making zombies appear “immune” or out of the weapon’s reach.
🛠️ New Approach: Active Enforcement
To drastically mitigate this problem, the FixMeleeHitbox.lua file was rewritten using an Active Enforcement approach, ensuring that the fix is never lost.
📌 What Changed
🔄 Continuous Verification (OnPlayerUpdate)
Every tick/frame, the script checks whether the melee weapon currently held by the player has the correct angle values:
MinAngle = 0.0
MaxAngle = 1.2
Technical note: This check is extremely lightweight (only reading two values), but it guarantees that if the game recreates the weapon’s Java object or resets its stats, the fix is reapplied instantly.
🚪 Verification on Game Load (OnGameStart)
An event was added to force the fix to be applied as soon as the player enters the game, covering cases where a melee weapon is already equipped at load time.
⚡ OnEquipPrimary Kept
The weapon equip event was kept to ensure an immediate response whenever a melee weapon is equipped.
Workshop ID: 3650882276 Mod ID: FixMeleeHitbox
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.