Skip to content

Commit bde213b

Browse files
committed
Merge remote-tracking branch 'upstream/amir/NPCs' into npc-features
2 parents 874baea + d0c0a87 commit bde213b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
jobs:
3434
build-windows:
3535
name: Windows build
36-
runs-on: windows-2019
36+
runs-on: windows-latest
3737

3838
strategy:
3939
matrix:

Server/Components/NPCs/npcs_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ void NPCComponent::onPlayerGiveDamage(IPlayer& player, IPlayer& to, float amount
121121
auto npc = static_cast<NPC*>(get(to.getID()));
122122
if (npc && npc->getPlayer()->getID() == to.getID())
123123
{
124-
shouldCallCustomEvents = true;
124+
shouldCallCustomEvents = false;
125125
bool eventResult = emulatePlayerGiveDamageToNPCEvent(player, *npc, amount, weapon, part, false);
126126
npc->processDamage(&player, amount, weapon, part, eventResult);
127+
shouldCallCustomEvents = true;
127128
}
128-
shouldCallCustomEvents = false;
129129
}
130130
}
131131

0 commit comments

Comments
 (0)