mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-25 21:31:28 +00:00
SERVER: Only allow one player to revive teammate in last stand
This commit is contained in:
parent
efc577410e
commit
c16629e04a
2 changed files with 7 additions and 1 deletions
|
@ -377,6 +377,7 @@ void(entity ent) CheckRevive =
|
||||||
DisableReviveIcon(self.electro_targeted);
|
DisableReviveIcon(self.electro_targeted);
|
||||||
revive_index--;
|
revive_index--;
|
||||||
self.invoke_revive = 0;
|
self.invoke_revive = 0;
|
||||||
|
self.firer = world;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2254,14 +2254,18 @@ void() CheckPlayer =
|
||||||
{
|
{
|
||||||
if(ent.classname == "player" && ent != self && ent.downed && !self.downed)
|
if(ent.classname == "player" && ent != self && ent.downed && !self.downed)
|
||||||
{
|
{
|
||||||
|
if (ent.beingrevived == false)
|
||||||
useprint (self, 13, 0, 0);
|
useprint (self, 13, 0, 0);
|
||||||
|
|
||||||
if (self.button7 && !ent.invoke_revive) {
|
if (self.button7 && !ent.invoke_revive) {
|
||||||
|
if (ent.beingrevived == true && ent.firer != self)
|
||||||
|
return;
|
||||||
|
|
||||||
// Broadcast that they're being revived
|
// Broadcast that they're being revived
|
||||||
BroadcastMessageToClient(ent, time + 0.1, 3, self.netname);
|
BroadcastMessageToClient(ent, time + 0.1, 3, self.netname);
|
||||||
|
|
||||||
ent.beingrevived = true;
|
ent.beingrevived = true;
|
||||||
|
ent.firer = self;
|
||||||
|
|
||||||
if (!self.progress_bar_percent) {
|
if (!self.progress_bar_percent) {
|
||||||
ChangeReviveIconState(ent.electro_targeted, 2);
|
ChangeReviveIconState(ent.electro_targeted, 2);
|
||||||
|
@ -2295,6 +2299,7 @@ void() CheckPlayer =
|
||||||
ChangeReviveIconState(ent.electro_targeted, 1);
|
ChangeReviveIconState(ent.electro_targeted, 1);
|
||||||
self.movetype = MOVETYPE_WALK;
|
self.movetype = MOVETYPE_WALK;
|
||||||
ent.beingrevived = false;
|
ent.beingrevived = false;
|
||||||
|
ent.firer = world;
|
||||||
W_TakeOut();
|
W_TakeOut();
|
||||||
self.progress_bar = 0;
|
self.progress_bar = 0;
|
||||||
self.progress_bar_time = 0;
|
self.progress_bar_time = 0;
|
||||||
|
|
Loading…
Reference in a new issue