Skip to content

Commit

Permalink
fix: allow anyone to fire death ray
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanger committed Jun 24, 2023
1 parent a8a80b1 commit 9eabf9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/inventory/gunItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class GunItem extends InventoryItem {
this._shots = 0;
return;
}
if (this.ammo <= 0) {
if (this.ammo <= 0 && this.type.idString !== "deathray") {
if (owner.inventory.items[definition.ammoType] <= 0) {
owner.animation.type = AnimationType.GunClick;
owner.animation.seq = !owner.animation.seq;
Expand Down Expand Up @@ -114,7 +114,7 @@ export class GunItem extends InventoryItem {
owner.recoil.time = owner.game.now + definition.recoilDuration;
owner.recoil.multiplier = definition.recoilMultiplier;

if (this.ammo <= 0) {
if (this.ammo <= 0 && this.type.idString !== "deathray") {
this.reload();
this._shots = 0;
return;
Expand Down

0 comments on commit 9eabf9d

Please sign in to comment.