Fixed crash in Turfwar for players that are not logged in
This commit is contained in:
@@ -240,7 +240,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
|||||||
{
|
{
|
||||||
List<Client> clientsInGangwar = new List<Client>();
|
List<Client> clientsInGangwar = new List<Client>();
|
||||||
|
|
||||||
Client[] usersInGangwar = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == getOwner() || c.GetUser().Faction.Name == getAttacker()).ToArray();
|
Client[] usersInGangwar = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && (c.GetUser().Faction.Name == getOwner() || c.GetUser().Faction.Name == getAttacker())).ToArray();
|
||||||
foreach (var u in usersInGangwar)
|
foreach (var u in usersInGangwar)
|
||||||
{
|
{
|
||||||
u.TriggerEvent("CLIENT:setAttackBlip", true, TurfID);
|
u.TriggerEvent("CLIENT:setAttackBlip", true, TurfID);
|
||||||
|
|||||||
Reference in New Issue
Block a user