Game Development Community

Update: fixed! Allowing new client connections

by Martin "Founder" Hoover · in RTS Starter Kit · 11/20/2004 (6:17 pm) · 3 replies

A moderate bug in that all it requires is a small script addition.

As it stands, once a game launches the server doesn't allow new connections, which isn't a bad thing, but once the players drop it's not reset so it still doesn't allow any new connections. so it simply needs an additional line in resetServerDefaults to allow new connections....

function resetServerDefaults()
{
    echo( "Resetting server defaults..." );
    exec( "~/defaults.cs" );
    exec( "~/prefs.cs" );
    allowConnections(true); // ZOD: Open up the server for connections again.
    loadMission( $Server::MissionFile );
}

#1
11/21/2004 (2:24 am)
Just to note, the server not allowing new connections was by design. But really, we should've made it optional, since many game designs might not care if new clients join mid-game. In any case, thanks for the post.

Btw, I see "ZOD" in your comments... is that ZOD from T1 and T2 scripting fame?
#2
11/21/2004 (5:38 am)
Yeah, we knew the reason is to not allow new players to connect mid-game, but once the allowConnections is set to false, we couldn't find anywhere that it is reset to true. So if it's a dedicated server, once the original players leave the game, no one else can join the server.

Yeah, that's the Zod alright. We've been working together since T2 came out, I wouldn't want to make a game without him :)
#3
11/21/2004 (11:46 am)
Ah, good ol' Zod... Thanks for the fix, this is definitely a bug on our end. I've put it on my todo list.