/* ================= CheckDMRules ================= */ void CheckDMRules (void) { int i; gclient_t *cl; if (level.intermissiontime) return; if (!deathmatch->value) return; //======= //ROGUE if (gamerules && gamerules->value && DMGame.CheckDMRules) { if(DMGame.CheckDMRules()) return; } //ROGUE //======= if (timelimit->value) { if (level.time >= timelimit->value*60) { gi.bprintf (PRINT_HIGH, "Timelimit hit.\n"); EndDMLevel (); return; } } if (fraglimit->value) { for (i=0 ; i<maxclients->value ; i++) { cl = game.clients + i; if (!g_edicts[i+1].inuse) continue; if (cl->resp.score >= fraglimit->value) { gi.bprintf (PRINT_HIGH, "Fraglimit hit.\n"); EndDMLevel (); return; } } } }
/* ================= CheckDMRules ================= */ void CheckDMRules (void) { int i; gclient_t *cl; if (level.intermissiontime) return; if (!deathmatch->value) return; //ZOID if (ctf->value && CTFCheckRules()) { EndDMLevel (); return; } if (CTFInMatch()) return; // no checking in match mode //ZOID if (timelimit->value) { if (level.time >= timelimit->value*60) { gi.bprintf (PRINT_HIGH, "Timelimit hit.\n"); EndDMLevel (); return; } } if (fraglimit->value) for (i=0 ; i<maxclients->value ; i++) { cl = game.clients + i; if (!g_edicts[i+1].inuse) continue; if (cl->resp.score >= fraglimit->value) { gi.bprintf (PRINT_HIGH, "Fraglimit hit.\n"); EndDMLevel (); return; } } }
void game_bprintf(int printlevel, char *fmt, ...) { va_list args; char buf[1024]; va_start(args, fmt); vsnprintf(buf, sizeof buf, fmt, args); buf[sizeof buf - 1] = 0; va_end(args); q2a_lua_LogMessage(buf); gi.bprintf(printlevel, "%s", buf); }