Author Topic: Host only command?  (Read 2719 times)

Or you could just completely remove the brackets because you can do that
Code: [Select]
function GameConnection::isHost(%client)
{
    if($Server::Dedicated)
    {
        if($Server::LAN)
            return %client.isSuperAdmin;
        else
            return %client.bl_id == getNumKeyID();
    }
    else
        return %client.isLocalConnection();
}
I like this one just plenty. However, this is an opinion thing and there's nothing to be gained by dragging it out further

Or you could just completely remove the brackets because you can do that
Code: [Select]
function GameConnection::isHost(%client)
{
    if($Server::Dedicated)
    {
        if($Server::LAN)
            return %client.isSuperAdmin;
        else
            return %client.bl_id == getNumKeyID();
    }
    else
        return %client.isLocalConnection();
}
I like this one just plenty. However, this is an opinion thing and there's nothing to be gained by dragging it out further
That one is okay too in my book, but doesn't work for multi-statement stuff.