Server: Target player when running god

This commit is contained in:
moto 2022-05-09 13:49:56 -04:00
parent f11f58b84d
commit 0ccb6357f0

View file

@ -733,6 +733,24 @@ void(string com) SV_ParseClientCommand =
self = benis; self = benis;
#endif #endif
} }
else if (com == "god")
{
#ifndef PC
entity benis2 = self;
other = find(world, classname, "player");
self = other;
#endif
if (!(self.flags & FL_GODMODE))
self.flags = self.flags | FL_GODMODE;
else
self.flags = self.flags & (~FL_GODMODE);
#ifndef PC
localcmd(com);
self = benis2;
#endif
}
else else
{ {
tokenize(com); tokenize(com);
@ -778,12 +796,6 @@ void(string com) SV_ParseClientCommand =
#endif #endif
} }
break; break;
case "god":
if (!(self.flags & FL_GODMODE))
self.flags = self.flags | FL_GODMODE;
else
self.flags = self.flags & (~FL_GODMODE);
break;
case "nextround": case "nextround":
rounds++; rounds++;
break; break;