|
|
|
@ -422,6 +422,19 @@ public final function bool IsAdmin()
|
|
|
|
|
return (GetAdminStatus() != AS_None); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Checks if player is a spectator, i.e. observes game without actively |
|
|
|
|
/// participating. |
|
|
|
|
public final function bool IsSpectator() |
|
|
|
|
{ |
|
|
|
|
local PlayerReplicationInfo myReplicationInfo; |
|
|
|
|
|
|
|
|
|
myReplicationInfo = GetRI(); |
|
|
|
|
if (myReplicationInfo == none) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return myReplicationInfo.bOnlySpectator; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Changes admin status of the caller `EPlayer`. |
|
|
|
|
* Can only fail if caller `EPlayer` has already disconnected. |
|
|
|
|