SERVER: Explicitly use SUB_UseTargets() for buy_weapon

This commit is contained in:
cypress 2024-11-03 09:54:14 -08:00
parent 01e95c4dab
commit 35d887fb55

View file

@ -202,10 +202,7 @@ void () WallWeapon_TouchTrigger =
Player_RemoveScore(other, wcost); Player_RemoveScore(other, wcost);
if (self.enemy) { if (self.enemy) {
oldent = self; SUB_UseTargets();
self = self.enemy;
self.use();
self = oldent;
} }
} }
} else } else
@ -247,10 +244,7 @@ void () WallWeapon_TouchTrigger =
Player_RemoveScore(other, wcost); Player_RemoveScore(other, wcost);
if (self.enemy) { if (self.enemy) {
oldent = self; SUB_UseTargets();
self = self.enemy;
self.use();
self = oldent;
} }
} }
} }
@ -282,10 +276,7 @@ void () WallWeapon_TouchTrigger =
nzp_bettyprompt(other); nzp_bettyprompt(other);
if (self.enemy) if (self.enemy)
{ {
oldent = self; SUB_UseTargets();
self = self.enemy;
self.use();
self = oldent;
} }
} }
other.semi_actions |= SEMIACTION_USE; other.semi_actions |= SEMIACTION_USE;
@ -315,10 +306,7 @@ void () WallWeapon_TouchTrigger =
other.primary_grenades = 4; other.primary_grenades = 4;
if (self.enemy) if (self.enemy)
{ {
oldent = self; SUB_UseTargets();
self = self.enemy;
self.use();
self = oldent;
} }
} }
other.semi_actions |= SEMIACTION_USE; other.semi_actions |= SEMIACTION_USE;
@ -341,10 +329,7 @@ void () WallWeapon_TouchTrigger =
other.ach_tracker_coll++; other.ach_tracker_coll++;
if (self.enemy) if (self.enemy)
{ {
oldent = self; SUB_UseTargets();
self = self.enemy;
self.use();
self = oldent;
} }
entity tempz; entity tempz;
tempz = self; tempz = self;
@ -378,10 +363,7 @@ void () WallWeapon_TouchTrigger =
other.reload_delay = 0; other.reload_delay = 0;
Player_RemoveScore(other, self.cost); Player_RemoveScore(other, self.cost);
if (self.enemy) { if (self.enemy) {
oldent = self; SUB_UseTargets();
self = self.enemy;
self.use();
self = oldent;
} }
tempe = self; tempe = self;
self = other; self = other;