mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 11:51:11 +00:00
Server: Award Points for reviving player
This commit is contained in:
parent
a1f07c75f0
commit
a1583120f3
2 changed files with 15 additions and 10 deletions
|
@ -213,6 +213,16 @@ void() GetDown =
|
|||
// Get Rid of Mule Kick Weapon (FIXME -- this just obliterates the third slot)
|
||||
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
|
||||
self.velocity = self.zoom = 0;
|
||||
self.downed = true;
|
||||
|
@ -235,16 +245,6 @@ void() GetDown =
|
|||
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
|
||||
self.perks = 0;
|
||||
SetPerk(self, self.perks);
|
||||
|
@ -372,6 +372,10 @@ void () GetUp =
|
|||
}
|
||||
self.teslacount = 0;
|
||||
|
||||
if (!coop) {
|
||||
addmoney(self, self.requirespower, false);
|
||||
}
|
||||
|
||||
if (self.weaponbk)
|
||||
{
|
||||
self.weapon = self.weaponbk;
|
||||
|
|
|
@ -2328,6 +2328,7 @@ void() CheckPlayer =
|
|||
self.progress_bar_time = 0;
|
||||
self.progress_bar_percent = 0;
|
||||
self.revived = 0;
|
||||
addmoney(self, ent.requirespower, false);
|
||||
}
|
||||
}
|
||||
else if (!self.button7 && self.reviving) {
|
||||
|
|
Loading…
Reference in a new issue