Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Commit

Permalink
temporarily disable dropping melee weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanger committed Mar 29, 2023
1 parent b70921c commit 1825481
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/game/objects/loot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class Loot extends GameObject {
if(p.activeWeapon.ammo === 0 && this.typeString === p.activeWeaponInfo.ammo) p.reload();
} else if(Weapons[this.typeString]?.type === "melee") {
if(p.weapons[2].typeString !== "fists") {
p.dropItemInSlot(2, p.weapons[2].typeString, true);
//p.dropItemInSlot(2, p.weapons[2].typeString, true);
} // TODO Do item type check in drop item packet, not in drop item method
p.weapons[2].typeString = this.typeString;
p.weapons[2].typeId = this.typeId;
Expand Down
2 changes: 1 addition & 1 deletion src/game/objects/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ export class Player extends GameObject {
// Drop loot
this.dropItemInSlot(0, this.weapons[0].typeString, true);
this.dropItemInSlot(1, this.weapons[1].typeString, true);
if(this.weapons[2].typeString !== "fists") this.dropItemInSlot(2, this.weapons[2].typeString, true);
//if(this.weapons[2].typeString !== "fists") this.dropItemInSlot(2, this.weapons[2].typeString, true);
for(const item in this.inventory) {
if(item === "1xscope") continue;
if(this.inventory[item] > 0) this.dropLoot(item);
Expand Down
2 changes: 1 addition & 1 deletion src/packets/receiving/dropItemPacket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class DropItemPacket extends ReceivingPacket {
break;
case ItemSlot.Melee:
if(item === "fists") break;
this.p.dropItemInSlot(2, item);
//this.p.dropItemInSlot(2, item);
break;
default:
break;
Expand Down

0 comments on commit 1825481

Please sign in to comment.