openmultiplayer / openmultiplayer/open.mp
NPC_Respawn(): NPC cannot die after respawn
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 641
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
Версия: open.mp v1.5.8.3079
После вызова NPC_Respawn() NPC перестает умирать.
Шаги для воспроизведения:
- Создать NPC через NPC_Create() и NPC_Spawn().
- Убить NPC.
- Вызвать NPC_Respawn().
- Снова нанести NPC смертельный урон.
Ожидаемое поведение:
NPC должен умереть, должен вызваться OnNPCDeath().
Фактическое поведение:
- OnNPCTakeDamage() продолжает вызываться.
- HP уменьшается с 100 до 0.
- NPC_GetHealth() возвращает:
100.0 -> 53.7 -> 7.5 -> 0.0 - После достижения 0 HP OnNPCDeath() больше не вызывается.
- NPC остается живым и продолжает принимать урон с HP = 0.0.
создаём - /create
убиваем
респавним - /respawn
npc бессмертен!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction steps in the issue and inspect test.txt for the NPC_Create(), NPC_Spawn(), and NPC_Respawn() setup. Reproduce the sequence, then trace the NPC damage and death callbacks, especially OnNPCTakeDamage() and OnNPCDeath(). Done means a respawned NPC can die again and OnNPCDeath() is called when its health reaches zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100