Update serversettings.

Set level.gameForfeited to false.
This commit is contained in:
efinst0rm 2023-04-13 18:18:07 -05:00
parent 729901c428
commit 788d7e72e2
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;
}