Server: Misc. Co-Op fixes

This commit is contained in:
Steam Deck User 2022-12-28 19:32:21 -05:00
parent 89742dc652
commit 54d8572321
3 changed files with 13 additions and 14 deletions

View file

@ -88,7 +88,7 @@ entity(entity blarg) find_new_enemy =
while(targets != world) {
// Don't target downed players.
if (targets.downed == true) {
if (targets.downed == true || targets.isspec == true) {
targets = find(targets, classname, "player");
continue;
}

View file

@ -176,7 +176,7 @@ void() EndGameSetup =
void() rec_downed =
{
self.downedloop++;
if (self.downedloop == 300) {
if (self.downedloop >= 300) {
startspectate();
return;
}

View file

@ -121,6 +121,17 @@ void() updateDogRound =
void() EndRound =
{
entity who = find(world,classname,"spectator");
while(who != world)
{
if(who.isspec)
{
self = who;
PlayerSpawn();
}
who = find(who, classname, "spectator");
}
rounds_change = 4;
SetUpdate(self, UT_ROUNDS_CHANGE, rounds_change, 0, 0);
if (gotdog && rounds == dogRound) {
@ -153,18 +164,6 @@ void() PlayerSpawn;
void() NewRound =
{
entity who = find(world,classname,"spectator");
while(who != world)
{
if(who.isspec)
{
self = who;
PlayerSpawn();
break;
}
}
entity tempe;
round_changetime = 0;
spawn_time = time + 5;