mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-10 14:42:05 +00:00
SERVER: Fix bleedout time being inconsistent and ticking while being revived
This commit is contained in:
parent
9001cf050e
commit
8e0aa1056f
3 changed files with 16 additions and 4 deletions
|
@ -155,8 +155,12 @@ void() EndGameSetup =
|
|||
// if they aren't dead, we keep looping until our OWN death (45 seconds, so 300 loops)
|
||||
void() rec_downed =
|
||||
{
|
||||
self.downedloop++;
|
||||
if (self.downedloop >= 300) {
|
||||
if (!self.beingrevived)
|
||||
self.downedloop += 1;
|
||||
|
||||
bprint(PRINT_HIGH, strcat(ftos(self.downedloop), "\n"));
|
||||
|
||||
if (self.downedloop >= 30) {
|
||||
DisableReviveIcon(self.electro_targeted);
|
||||
startspectate();
|
||||
return;
|
||||
|
@ -170,7 +174,7 @@ void() rec_downed =
|
|||
}
|
||||
|
||||
self.think = rec_downed;
|
||||
self.nextthink = time + 0.1;
|
||||
self.nextthink = time + 1;
|
||||
}
|
||||
|
||||
float() push_away_zombies;
|
||||
|
|
|
@ -410,7 +410,7 @@ void() PlayerPreThink =
|
|||
}
|
||||
if(self.isspec != 0 && !self.downed)
|
||||
{
|
||||
if(self.button0)
|
||||
if(self.button0 && self.fire_delay < time)
|
||||
{
|
||||
self.aiment = find(self.aiment, classname, "player");
|
||||
if(self.aiment != world)
|
||||
|
@ -427,6 +427,7 @@ void() PlayerPreThink =
|
|||
sprint(self, PRINT_HIGH, "Freefly spectate\n");
|
||||
self.movetype = MOVETYPE_FLY;
|
||||
}
|
||||
self.fire_delay = time + 0.25;
|
||||
}
|
||||
if(self.aiment != world)
|
||||
{
|
||||
|
|
|
@ -129,6 +129,13 @@ float(string params) Command_noclip =
|
|||
return COMMAND_FAILURE;
|
||||
}
|
||||
|
||||
if (self.model == "") {
|
||||
setmodel(self, "models/player.mdl");
|
||||
setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
} else {
|
||||
setmodel(self, "");
|
||||
}
|
||||
|
||||
client_parse_override = false;
|
||||
return COMMAND_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue