addstat(STAT_FUEL, AS_INT, ammo_fuel);
addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
- addstat(STAT_BULLETS_LOADED, AS_INT, sniperrifle_bulletcounter);
+ addstat(STAT_WEAPON_CLIPLOAD, AS_INT, clip_load);
+ addstat(STAT_WEAPON_CLIPSIZE, AS_INT, clip_size);
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
addstat(STAT_HIT_TIME, AS_FLOAT, hit_time);
addstat(STAT_TYPEHIT_TIME, AS_FLOAT, typehit_time);
+ addstat(STAT_LAYED_MINES, AS_INT, minelayer_mines);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo);
+ addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load);
+
if(g_ca || g_freezetag)
{
addstat(STAT_REDALIVE, AS_INT, redalive_stat);
// fill sv_curl_serverpackages from .serverpackage files
if(autocvar_sv_curl_serverpackages_auto)
{
- fd = search_begin("*.serverpackage", TRUE, FALSE);
s = "";
+ n = tokenize_console(cvar_string("sv_curl_serverpackages"));
+ for(i = 0; i < n; ++i)
+ if(substring(argv(i), -14, -1) != ".serverpackage")
+ s = strcat(s, " ", argv(i));
+ fd = search_begin("*.serverpackage", TRUE, FALSE);
if(fd >= 0)
{
j = search_getsize(fd);
remove(self);
}
-float TryFile( string pFilename )
-{
- local float lHandle;
- dprint("TryFile(\"", pFilename, "\")\n");
- lHandle = fopen( pFilename, FILE_READ );
- if( lHandle != -1 ) {
- fclose( lHandle );
- return TRUE;
- } else {
- return FALSE;
- }
-};
-
string GetGametype()
{
return GametypeNameFromType(game);
if(autocvar_g_maplist_check_waypoints)
{
dprint("checkwp "); dprint(map);
- fh = fopen(strcat("maps/", map, ".waypoints"), FILE_READ);
- if(fh < 0)
+ if(!fexists(strcat("maps/", map, ".waypoints")))
{
dprint(": no waypoints\n");
return FALSE;
}
dprint(": has waypoints\n");
- fclose(fh);
}
// open map size restriction file
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()));
+ cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
if(autocvar_g_maplist_shuffle)
ShuffleMaplist();
localcmd("\nmenu_cmd sync\n");
if(allowReset)
{
bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
- cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
+ cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
if(autocvar_g_maplist_shuffle)
ShuffleMaplist();
localcmd("\nmenu_cmd sync\n");
float to_eventlog;
float to_file;
float i;
- entity e;
to_console = autocvar_sv_logscores_console;
to_eventlog = autocvar_sv_eventlog;
}
}
- if(teams_matter)
+ if(teamplay)
{
s = strcat(":labels:teamscores:", GetTeamScoreString(0, 0));
if(to_console)
string s;
if(!e.autoscreenshot) // initial call
{
- e.angles = e.v_angle;
- e.angles_x = -e.angles_x;
e.autoscreenshot = time + 0.8; // used for autoscreenshot
e.health = -2342;
// first intermission phase; voting phase has positive health (used to decide whether to send SVC_FINALE or not)
WriteByte(MSG_ONE, SVC_INTERMISSION);
}
}
-
- //e.velocity = '0 0 0';
- //e.fixangle = TRUE;
-
- // TODO halt weapon animation
}
// TODO make everything use THIS winning condition (except LMS)
WinningConditionHelper();
- if(teams_matter)
+ if(teamplay)
{
team1_score = TeamScore_GetCompareValue(COLOR_TEAM1);
team2_score = TeamScore_GetCompareValue(COLOR_TEAM2);
float mapvote_maps_suggested[MAPVOTE_COUNT];
string mapvote_suggestions[MAPVOTE_COUNT];
float mapvote_suggestion_ptr;
-float mapvote_maxlen;
float mapvote_voters;
float mapvote_votes[MAPVOTE_COUNT];
float mapvote_run;
for(j = 0; j < mapvote_count; ++j)
if(mapvote_maps[j] == nextMap)
return;
- if(strlen(nextMap) > mapvote_maxlen)
- mapvote_maxlen = strlen(nextMap);
+ // suggestions might be no longer valid/allowed after gametype switch!
+ if(isSuggestion)
+ if(!MapInfo_CheckMap(nextMap))
+ return;
mapvote_maps[mapvote_count] = strzone(nextMap);
mapvote_maps_suggested[mapvote_count] = isSuggestion;
if(mapvote_count == 0)
{
bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
- cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
+ cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
if(autocvar_g_maplist_shuffle)
ShuffleMaplist();
localcmd("\nmenu_cmd sync\n");