Skip to content

Commit 1b35074

Browse files
committed
Fix bad mappings for PlayerHurtEvent
1 parent db29e6c commit 1b35074

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packet_handlers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ func (p *Parser) handleGameEvent(ge *msg.CSVCMsg_GameEvent) {
212212
e := events.PlayerHurtEvent{
213213
Player: p.connectedPlayers[int(data["userid"].GetValShort())],
214214
Attacker: p.connectedPlayers[int(data["attacker"].GetValShort())],
215-
Health: int(data["health"].GetValShort()),
216-
Armor: int(data["armor"].GetValShort()),
215+
Health: int(data["health"].GetValByte()),
216+
Armor: int(data["armor"].GetValByte()),
217217
HealthDamage: int(data["dmg_health"].GetValShort()),
218-
ArmorDamage: int(data["dmg_armor"].GetValShort()),
219-
HitGroup: common.HitGroup(data["penetrated"].GetValByte()),
218+
ArmorDamage: int(data["dmg_armor"].GetValByte()),
219+
HitGroup: common.HitGroup(data["hitgroup"].GetValByte()),
220220
}
221221

222222
wep := common.NewEquipment(data["weapon"].GetValString())

0 commit comments

Comments
 (0)