Merge pull request #529 from efinst0rm/main

Update _serversettings.gsc
This commit is contained in:
Maurice Heumann 2023-04-14 14:46:23 +02:00 committed by GitHub
commit 4b64c65750
2 changed files with 23 additions and 5 deletions

View File

@ -18,26 +18,32 @@ function init()
{
level.hostname = GetDvarString( "sv_hostname");
if (level.hostname == "")
{
level.hostname = "CoDHost";
}
SetDvar("sv_hostname", level.hostname);
SetDvar("ui_hostname", level.hostname);
level.motd = GetDvarString( "scr_motd" );
if(level.motd == "")
{
level.motd = "";
}
SetDvar("scr_motd", level.motd);
SetDvar("ui_motd", level.motd);
level.allowvote = GetDvarString( "g_allowvote" );
if(level.allowvote == "")
{
level.allowvote = "1";
}
SetDvar("g_allowvote", level.allowvote);
SetDvar("ui_allowvote", level.allowvote);
level.allow_teamchange = "1";
SetDvar("ui_allow_teamchange", level.allow_teamchange);
level.friendlyfire = GetGametypeSetting( "friendlyfiretype" );
SetDvar("ui_friendlyfire", level.friendlyfire);
@ -57,6 +63,8 @@ function init()
constrain_gametype(GetDvarString( "g_gametype"));
constrain_map_size(level.mapsize);
thread setup_callbacks();
for(;;)
{
update();
@ -194,3 +202,13 @@ function constrain_map_size(mapsize)
}
}
}
function setup_callbacks()
{
level.onForfeit = &default_onForfeit;
}
function default_onForfeit()
{
level.gameForfeited = false;
}