commit
4b64c65750
Binary file not shown.
@ -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;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user