Skip to content

Commit

Permalink
fix: fix compile error caused by my forgetting to edit something
Browse files Browse the repository at this point in the history
  • Loading branch information
Picoseconds committed Jul 28, 2020
1 parent 21690b0 commit 1e4d737
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/moomoo/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ export default class Game {
);

for (let hitPlayer of hitPlayers) {
hitPlayer.health -= getWeaponDamage(player.weapon, player.weaponVariant);
let dmg = getWeaponDamage(player.weapon, player.weaponVariant);

hitPlayer.health -= dmg;
if (hitPlayer.health <= 0 && hitPlayer.client) {
this.killPlayer(hitPlayer);
} else {
Expand All @@ -388,7 +390,7 @@ export default class Game {

player.client?.socket.send(
packetFactory.serializePacket(
new Packet(PacketType.HEALTH_CHANGE, [hitPlayer.location.x, hitPlayer.location.y, getWeaponDamage(player.weapon), 1])
new Packet(PacketType.HEALTH_CHANGE, [hitPlayer.location.x, hitPlayer.location.y, dmg, 1])
)
);
}
Expand Down

0 comments on commit 1e4d737

Please sign in to comment.