seta g_ctf_win_mode 0 "0: captures only, 1: captures, then points, 2: points only"
seta g_ctf_ignore_frags 0 "1: regular frags give no points"
+set g_freezetag 0 "Freeze Tag: Freeze the opposing team(s) to win, unfreeze teammates by standing next to them"
+seta g_freezetag_warmup 5 "Time players get to run around before the round starts"
+seta g_freezetag_point_limit -1 "Freeze Tag point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_freezetag_point_leadlimit -1 "Freeze Tag point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_freezetag_revive_time 5 "Time it takes to revive a frozen teammate"
+seta g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
+
// 50% of the spawns shall be far away from any players
set g_spawn_furthest 0.5
// respawn delay
set g_cts_respawn_delay 0.25
set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
set g_cts_finish_kill_delay 10 "prevent cheating by running back to the start line, and starting out with more speed than otherwise possible"
+set g_freezetag_respawn_waves 0
+set g_freezetag_respawn_delay 0.25
// overtime
seta timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
if(spawnpoints >= 8 && diameter > 4096) {
MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_TEAM_DEATHMATCH;
+ MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_FREEZETAG;
MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CA;
}
if( diameter < 4096)
case MAPINFO_TYPE_ONSLAUGHT: return "20 0";
case MAPINFO_TYPE_NEXBALL: return "5 20 0";
case MAPINFO_TYPE_CTS: return "20 0 0";
+ case MAPINFO_TYPE_FREEZETAG: return "10 20 0";
default: return "";
}
}
case MAPINFO_TYPE_ONSLAUGHT: return "timelimit=20";
case MAPINFO_TYPE_NEXBALL: return "timelimit=20 pointlimit=5 leadlimit=0";
case MAPINFO_TYPE_CTS: return "timelimit=20 skill=-1";
+ case MAPINFO_TYPE_FREEZETAG: return "timelimit=20 pointlimit=10 teams=2 leadlimit=0";
default: return "";
}
}
else if(t == "rc") return MAPINFO_TYPE_RACE;
else if(t == "nexball") return MAPINFO_TYPE_NEXBALL;
else if(t == "cts") return MAPINFO_TYPE_CTS;
+ else if(t == "freezetag") return MAPINFO_TYPE_FREEZETAG;
else if(t == "all") return MAPINFO_TYPE_ALL;
else return 0;
}
else if(t == MAPINFO_TYPE_RACE) return "rc";
else if(t == MAPINFO_TYPE_NEXBALL) return "nexball";
else if(t == MAPINFO_TYPE_CTS) return "cts";
+ else if(t == MAPINFO_TYPE_FREEZETAG) return "freezetag";
else if(t == MAPINFO_TYPE_ALL) return "all";
else return "";
}
return MAPINFO_TYPE_NEXBALL;
else if(cvar("g_cts"))
return MAPINFO_TYPE_CTS;
+ else if(cvar("g_freezetag"))
+ return MAPINFO_TYPE_FREEZETAG;
else
return MAPINFO_TYPE_DEATHMATCH;
}
case MAPINFO_TYPE_ONSLAUGHT: return "g_onslaught";
case MAPINFO_TYPE_RACE: return "g_race";
case MAPINFO_TYPE_NEXBALL: return "g_nexball";
+ case MAPINFO_TYPE_FREEZETAG: return "g_freezetag";
case MAPINFO_TYPE_CTS: return "g_cts";
default: return "";
}
cvar_set("g_race", (t == MAPINFO_TYPE_RACE) ? "1" : "0");
cvar_set("g_nexball", (t == MAPINFO_TYPE_NEXBALL) ? "1" : "0");
cvar_set("g_cts", (t == MAPINFO_TYPE_CTS) ? "1" : "0");
+ cvar_set("g_freezetag", (t == MAPINFO_TYPE_FREEZETAG) ? "1" : "0");
}
void MapInfo_LoadMap(string s)
float MAPINFO_TYPE_ASSAULT = 2048;
float MAPINFO_TYPE_ONSLAUGHT = 4096;
float MAPINFO_TYPE_NEXBALL = 8192;
-float MAPINFO_TYPE_ALL = 16383; // this has to include all above bits
+float MAPINFO_TYPE_FREEZETAG = 16384;
+float MAPINFO_TYPE_ALL = 32767; // this has to include all above bits
float MAPINFO_FEATURE_WEAPONS = 1; // not defined for minstagib-only maps
else if (g == GAME_RACE) return "rc";
else if (g == GAME_NEXBALL) return "nexball";
else if (g == GAME_CTS) return "cts";
+ else if (g == GAME_FREEZETAG) return "freezetag";
return "dm";
}
warmup = time + cvar("g_ca_warmup");
allowed_to_spawn = 1;
}
+ else if(g_freezetag)
+ {
+ warmup = time + cvar("g_freezetag_warmup");
+ }
lms_lowest_lives = 999;
lms_next_place = player_count;
next_round = 0;
reset_map(TRUE);
}
+ } else if(g_freezetag) {
+ if((next_round && next_round < time))
+ {
+ next_round = 0;
+ reset_map(TRUE);
+ }
} else { // arena
//extend next_round if it isn't set yet and only 1 player is spawned
if(!next_round)
cvar_set("g_race", ftos(g_race));
cvar_set("g_nexball", ftos(g_nexball));
cvar_set("g_cts", ftos(g_cts));
+ cvar_set("g_freezetag", ftos(g_freezetag));
}
void ReadGameCvars()
found += (g_race = (!found && (prev != GAME_RACE) && cvar("g_race")));
found += (g_nexball = (!found && (prev != GAME_NEXBALL) && cvar("g_nexball")));
found += (g_cts = (!found && (prev != GAME_CTS) && cvar("g_cts")));
+ found += (g_freezetag = (!found && (prev != GAME_FREEZETAG) && cvar("g_freezetag")));
if(found)
break;
error("Too few teams available for ctf\n");
else if(g_keyhunt)
error("Too few teams available for key hunt\n");
+ else if(g_freezetag)
+ error("Too few teams available for freeze tag\n");
else
error("Too few teams available for team deathmatch\n");
}