Server: Award Points for reviving player

This commit is contained in:
Steam Deck User 2022-12-27 16:33:52 -05:00
parent a1f07c75f0
commit a1583120f3
2 changed files with 15 additions and 10 deletions

View file

@ -213,6 +213,16 @@ void() GetDown =
// Get Rid of Mule Kick Weapon (FIXME -- this just obliterates the third slot) // Get Rid of Mule Kick Weapon (FIXME -- this just obliterates the third slot)
self.thirdweapon = 0; self.thirdweapon = 0;
// Calculate the loss in points, take away points from downed Player.
float point_difference;
point_difference = self.points;
point_difference -= 10*rint((self.points*0.95)/10);
addmoney(self, point_difference * -1, false);
self.requirespower = point_difference;
// Broadcast that the player has downed.
BroadcastMessage(time + 3, 2);
// Reset state // Reset state
self.velocity = self.zoom = 0; self.velocity = self.zoom = 0;
self.downed = true; self.downed = true;
@ -235,16 +245,6 @@ void() GetDown =
self.progress_bar_percent = 1; self.progress_bar_percent = 1;
} }
// Calculate the loss in points, take away points from downed Player.
float point_difference;
point_difference = self.points;
point_difference -= 10*rint((self.points*0.95)/10);
addmoney(self, point_difference * -1, false);
self.requirespower = point_difference;
// Broadcast that the player has downed.
BroadcastMessage(time + 3, 2);
// Take away weapons and Perks // Take away weapons and Perks
self.perks = 0; self.perks = 0;
SetPerk(self, self.perks); SetPerk(self, self.perks);
@ -372,6 +372,10 @@ void () GetUp =
} }
self.teslacount = 0; self.teslacount = 0;
if (!coop) {
addmoney(self, self.requirespower, false);
}
if (self.weaponbk) if (self.weaponbk)
{ {
self.weapon = self.weaponbk; self.weapon = self.weaponbk;

View file

@ -2328,6 +2328,7 @@ void() CheckPlayer =
self.progress_bar_time = 0; self.progress_bar_time = 0;
self.progress_bar_percent = 0; self.progress_bar_percent = 0;
self.revived = 0; self.revived = 0;
addmoney(self, ent.requirespower, false);
} }
} }
else if (!self.button7 && self.reviving) { else if (!self.button7 && self.reviving) {