* players. Also plays reminder sounds.
*/
void timeoutHandler_Think() {
- local string timeStr;
local entity plr;
if (timeoutStatus == 1) {
if (remainingLeadTime > 0) {
//centerprint the information to every player
- timeStr = getTimeoutText(0);
FOR_EACH_REALCLIENT(plr) {
if(plr.classname == "player") {
- centerprint_atprio(plr, CENTERPRIO_SPAM, timeStr);
+ Send_CSQC_Centerprint_Generic(plr, CPID_TIMEOUT_COUNTDOWN, "Timeout begins in %d seconds!", 1, remainingLeadTime);
}
}
remainingLeadTime -= 1;
}
else if (timeoutStatus == 2) {
if (remainingTimeoutTime > 0) {
- timeStr = getTimeoutText(0);
FOR_EACH_REALCLIENT(plr) {
if(plr.classname == "player") {
- centerprint_atprio(plr, CENTERPRIO_SPAM, timeStr);
+ Send_CSQC_Centerprint_Generic(plr, CPID_TIMEOUT_COUNTDOWN, "Timeout ends in %d seconds!", 1, remainingTimeoutTime);
}
}
if(remainingTimeoutTime == autocvar_sv_timeout_resumetime) { //play a warning sound when only <sv_timeout_resumetime> seconds are left
//get rid of the countdown message
FOR_EACH_REALCLIENT(plr) {
if(plr.classname == "player") {
- centerprint_atprio(plr, CENTERPRIO_SPAM, "");
+ Send_CSQC_Centerprint_Generic_Expire(plr, CPID_TIMEOUT_COUNTDOWN);
}
}
remove(self);
else if (timeoutStatus == 0) { //if a player called the resumegame command (which set timeoutStatus to 0 already)
FOR_EACH_REALCLIENT(plr) {
if(plr.classname == "player") {
- centerprint_atprio(plr, CENTERPRIO_SPAM, "");
+ Send_CSQC_Centerprint_Generic_Expire(plr, CPID_TIMEOUT_COUNTDOWN);
}
}
remove(self);
// 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(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);