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

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