SERVER: Disallow clients to pick up another's upgraded Weapon

This commit is contained in:
cypress 2024-06-16 14:11:07 -07:00
parent 4fcfa400b3
commit cbe69fc269

View file

@ -106,7 +106,7 @@ void() PAP_Reset =
{
self.weapon = 0;
self.usedent = 0;
self.host = world;
if (self.goaldummy) {
remove(self.goaldummy);
@ -218,6 +218,8 @@ void(entity pap, entity buyer) PAP_UpgradeWeapon =
pap.usedent = self;
pap.goaldummy = floating_weapon;
pap.host = buyer;
// Upgrade Timer
pap.think = PAP_SendWeaponOut;
pap.nextthink = time + 3.5;
@ -287,7 +289,7 @@ void() PAP_Touch =
}
// Claiming upgraded Weapon
else if (self.papState == 2) {
else if (self.papState == 2 && self.host == other) {
#ifndef FTE