if(default_player_alpha == 0)
default_player_alpha = 1;
default_weapon_alpha = default_player_alpha;
if(default_player_alpha == 0)
default_player_alpha = 1;
default_weapon_alpha = default_player_alpha;
{
// cvar_set("_sv_init", "0");
// we do NOT set this to 0 any more, so someone "accidentally" changing
// to this "init" map on a dedicated server will cause no permanent
// harm
{
// cvar_set("_sv_init", "0");
// we do NOT set this to 0 any more, so someone "accidentally" changing
// to this "init" map on a dedicated server will cause no permanent
// harm
BADCVAR("leadlimit_and_fraglimit");
BADCVAR("leadlimit_override");
BADCVAR("sv_checkforpacketsduringsleep");
BADCVAR("leadlimit_and_fraglimit");
BADCVAR("leadlimit_override");
BADCVAR("sv_checkforpacketsduringsleep");
BADCVAR("g_nexball_goallimit");
BADCVAR("g_runematch_point_limit");
BADCVAR("g_start_delay");
BADCVAR("g_nexball_goallimit");
BADCVAR("g_runematch_point_limit");
BADCVAR("g_start_delay");
BADCVAR("sv_vote_master_password");
BADCVAR("sv_vote_simple_majority_factor");
BADCVAR("timelimit_override");
BADCVAR("sv_vote_master_password");
BADCVAR("sv_vote_simple_majority_factor");
BADCVAR("timelimit_override");
- /*
- TODO sound pack system
- // initialize sound pack system
- soundpack = cvar_string("g_soundpack");
- if(soundpack != "")
- soundpack = strcat(soundpack, "/");
- soundpack = strzone(soundpack);
- */
-
if(bot_waypoints_for_items == 1)
if(self.spawnflags & SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS)
bot_waypoints_for_items = 0;
// for setting by mapinfo
if(bot_waypoints_for_items == 1)
if(self.spawnflags & SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS)
bot_waypoints_for_items = 0;
// for setting by mapinfo
s = strcat(s, ":grappling_hook");
// initialiation stuff, not good in the mutator system
s = strcat(s, ":grappling_hook");
// initialiation stuff, not good in the mutator system
s = strcat(s, ":no_use_ammunition");
// initialiation stuff, not good in the mutator system
s = strcat(s, ":no_use_ammunition");
// initialiation stuff, not good in the mutator system
s = strcat(s, ":no_pickup_items");
// initialiation stuff, not good in the mutator system
s = strcat(s, ":no_pickup_items");
// initialiation stuff, not good in the mutator system
- if(cvar_string("g_weaponarena") != "0")
- s = strcat(s, ":", cvar_string("g_weaponarena"), " arena");
+ if(autocvar_g_weaponarena != "0")
+ s = strcat(s, ":", autocvar_g_weaponarena, " arena");
s = strcat(s, ":norecoil");
// TODO to mutator system
s = strcat(s, ":norecoil");
// TODO to mutator system
s = strcat(s, ":midair");
// TODO to mutator system
s = strcat(s, ":midair");
// TODO to mutator system
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
{
addstat(STAT_REDALIVE, AS_INT, redalive_stat);
addstat(STAT_BLUEALIVE, AS_INT, bluealive_stat);
{
addstat(STAT_REDALIVE, AS_INT, redalive_stat);
addstat(STAT_BLUEALIVE, AS_INT, bluealive_stat);
// g_movementspeed hack
addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed);
// g_movementspeed hack
addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed);
lsnewmaps_reply = strzone(strcat(lsnewmaps_reply, "\n"));
maplist_reply = "^7Maps in list: ";
lsnewmaps_reply = strzone(strcat(lsnewmaps_reply, "\n"));
maplist_reply = "^7Maps in list: ";
for(i = 0, j = 0; i < n; ++i)
{
if(MapInfo_CheckMap(argv(i)))
for(i = 0, j = 0; i < n; ++i)
{
if(MapInfo_CheckMap(argv(i)))
localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n");
// fill sv_curl_serverpackages from .serverpackage files
localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n");
// fill sv_curl_serverpackages from .serverpackage files
- if(currentbots || cvar("bot_number") || player_count < cvar("minplayers"))
- if(cvar("g_maplist_check_waypoints"))
+ if(currentbots || autocvar_bot_number || player_count < autocvar_minplayers)
+ if(autocvar_g_maplist_check_waypoints)
{
dprint("checkwp "); dprint(map);
fh = fopen(strcat("maps/", map, ".waypoints"), FILE_READ);
{
dprint("checkwp "); dprint(map);
fh = fopen(strcat("maps/", map, ".waypoints"), FILE_READ);
- cvar_set("g_maplist_mostrecent", strwords(strcat(m, " ", cvar_string("g_maplist_mostrecent")), max(0, cvar("g_maplist_mostrecent_count"))));
+ cvar_set("g_maplist_mostrecent", strwords(strcat(m, " ", autocvar_g_maplist_mostrecent), max(0, autocvar_g_maplist_mostrecent_count)));
newlist = strcat(newlist, " ", argv(j));
newlist = substring(newlist, 1, strlen(newlist) - 1);
cvar_set("g_maplist", newlist);
newlist = strcat(newlist, " ", argv(j));
newlist = substring(newlist, 1, strlen(newlist) - 1);
cvar_set("g_maplist", newlist);
// NOTE: the selected map has just been inserted at (insertpos-1)th position
Map_Current = insertpos - 1; // this is not really valid, but this way the fallback has a chance of working
// NOTE: the selected map has just been inserted at (insertpos-1)th position
Map_Current = insertpos - 1; // this is not really valid, but this way the fallback has a chance of working
if(Map_Count == 0)
{
bprint( "Maplist is empty! Resetting it to default map list.\n" );
cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
if(Map_Count == 0)
{
bprint( "Maplist is empty! Resetting it to default map list.\n" );
cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
- if(cvar("g_maplist_shuffle") > 0)
- nextMap = MaplistMethod_Shuffle(cvar("g_maplist_shuffle") + 1);
+ if(autocvar_g_maplist_shuffle > 0)
+ nextMap = MaplistMethod_Shuffle(autocvar_g_maplist_shuffle + 1);
{
// this does not work because it tries to exec maps/nexdm01.mapcfg (which doesn't exist, it should be trying maps/dm_nexdm01.mapcfg for example)
//localcmd(strcat("exec \"maps/", mapname, ".mapcfg\"\n"));
{
// this does not work because it tries to exec maps/nexdm01.mapcfg (which doesn't exist, it should be trying maps/dm_nexdm01.mapcfg for example)
//localcmd(strcat("exec \"maps/", mapname, ".mapcfg\"\n"));
{
bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
{
bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
- to_console = cvar("sv_logscores_console");
- to_eventlog = cvar("sv_eventlog");
- to_file = cvar("sv_logscores_file");
+ to_console = autocvar_sv_logscores_console;
+ to_eventlog = autocvar_sv_eventlog;
+ to_file = autocvar_sv_logscores_file;
{
s = strcat(":player:see-labels:", GetPlayerScoreString(other, 0), ":");
s = strcat(s, ftos(rint(time - other.jointime)), ":");
{
s = strcat(":player:see-labels:", GetPlayerScoreString(other, 0), ":");
s = strcat(s, ftos(rint(time - other.jointime)), ":");
if(clienttype(e) == CLIENTTYPE_REAL)
{
stuffcmd(e, "\nscr_printspeed 1000000\n");
if(clienttype(e) == CLIENTTYPE_REAL)
{
stuffcmd(e, "\nscr_printspeed 1000000\n");
if(s != "")
stuffcmd(e, strcat("\ncd loop ", s, "\n"));
msg_entity = e;
if(s != "")
stuffcmd(e, strcat("\ncd loop ", s, "\n"));
msg_entity = e;
// - for this timelimit_overtime needs to be >0 of course
// - also check the winning condition calculated in the previous frame and only add normal overtime
// again, if at the point at which timelimit would be extended again, still no winner was found
// - for this timelimit_overtime needs to be >0 of course
// - also check the winning condition calculated in the previous frame and only add normal overtime
// again, if at the point at which timelimit would be extended again, still no winner was found
TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 666 - TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 0));
TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 666 - TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 0));
limitreached = (limitreached && leadlimitreached);
else
limitreached = (limitreached || leadlimitreached);
limitreached = (limitreached && leadlimitreached);
else
limitreached = (limitreached || leadlimitreached);
- timelimit = cvar("timelimit") * 60;
- fraglimit = cvar("fraglimit");
- leadlimit = cvar("leadlimit");
+ timelimit = autocvar_timelimit * 60;
+ fraglimit = autocvar_fraglimit;
+ leadlimit = autocvar_leadlimit;
return "Suggestions are not accepted on this server.";
if(mapvote_initialized)
return "Can't suggest - voting is already in progress!";
m = MapInfo_FixName(m);
if(!m)
return "The map you suggested is not available on this server.";
return "Suggestions are not accepted on this server.";
if(mapvote_initialized)
return "Can't suggest - voting is already in progress!";
m = MapInfo_FixName(m);
if(!m)
return "The map you suggested is not available on this server.";
if(mapvote_suggestions[i] != "")
strunzone(mapvote_suggestions[i]);
mapvote_suggestions[i] = strzone(m);
if(mapvote_suggestions[i] != "")
strunzone(mapvote_suggestions[i]);
mapvote_suggestions[i] = strzone(m);
GameLogEcho(strcat(":vote:suggested:", m, ":", ftos(self.playerid)));
return strcat("Suggestion of ", m, " accepted.");
}
GameLogEcho(strcat(":vote:suggested:", m, ":", ftos(self.playerid)));
return strcat("Suggestion of ", m, " accepted.");
}
- mapvote_detail = !cvar("g_maplist_votable_nodetail");
- mapvote_abstain = cvar("g_maplist_votable_abstain");
+ mapvote_detail = !autocvar_g_maplist_votable_nodetail;
+ mapvote_abstain = autocvar_g_maplist_votable_abstain;
- nmax = min(MAPVOTE_COUNT, cvar("g_maplist_votable"));
- smax = min3(nmax, cvar("g_maplist_votable_suggestions"), mapvote_suggestion_ptr);
+ nmax = min(MAPVOTE_COUNT, autocvar_g_maplist_votable);
+ smax = min3(nmax, autocvar_g_maplist_votable_suggestions, mapvote_suggestion_ptr);
if(mapvote_screenshot_dirs_count == 0)
mapvote_screenshot_dirs_count = tokenize_console("maps levelshots");
mapvote_screenshot_dirs_count = min(mapvote_screenshot_dirs_count, MAPVOTE_SCREENSHOT_DIRS_COUNT);
if(mapvote_screenshot_dirs_count == 0)
mapvote_screenshot_dirs_count = tokenize_console("maps levelshots");
mapvote_screenshot_dirs_count = min(mapvote_screenshot_dirs_count, MAPVOTE_SCREENSHOT_DIRS_COUNT);
{
bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
{
bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
- mapvote_keeptwotime = time + cvar("g_maplist_votable_keeptwotime");
- mapvote_timeout = time + cvar("g_maplist_votable_timeout");
+ mapvote_keeptwotime = time + autocvar_g_maplist_votable_keeptwotime;
+ mapvote_timeout = time + autocvar_g_maplist_votable_timeout;
if(mapvote_count_real < 3 || mapvote_keeptwotime <= time)
mapvote_keeptwotime = 0;
mapvote_message = "Choose a map and press its key!";
if(mapvote_count_real < 3 || mapvote_keeptwotime <= time)
mapvote_keeptwotime = 0;
mapvote_message = "Choose a map and press its key!";
{
result = strcat(":vote:finished:", mapvote_maps[mappos]);
result = strcat(result, ":", ftos(mapvote_votes[mappos]), "::");
{
result = strcat(":vote:finished:", mapvote_maps[mappos]);
result = strcat(result, ":", ftos(mapvote_votes[mappos]), "::");
{
cvar_set("rescan_pending", "2");
localcmd("fs_rescan\nrescan_pending 3\n");
return;
}
{
cvar_set("rescan_pending", "2");
localcmd("fs_rescan\nrescan_pending 3\n");
return;
}
{
// now build missing mapinfo files
if(!MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1))
{
// now build missing mapinfo files
if(!MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1))
// add 1 frametime because after this, engine SV_Physics
// increases time by a frametime and then networks the frame
// add another frametime because client shows everything with
// add 1 frametime because after this, engine SV_Physics
// increases time by a frametime and then networks the frame
// add another frametime because client shows everything with
db_dump(ServerProgsDB, "server.db");
else
db_save(ServerProgsDB, "server.db");
}
db_dump(ServerProgsDB, "server.db");
else
db_save(ServerProgsDB, "server.db");
}
db_dump(TemporaryDB, "server-temp.db");
else
db_save(TemporaryDB, "server-temp.db");
db_dump(TemporaryDB, "server-temp.db");
else
db_save(TemporaryDB, "server-temp.db");