Merge feature/messer-match-server in main
# Conflicts: # client/src/styles.css
This commit is contained in:
commit
148cd99856
10 files changed
+220
-20
No files matched your search
@@ -13,14 +13,15 @@ const MAX_RESTARTS = 5;
|
||||
* Konsolenbefehle für eine Messerrunde: nur Messer, kein Geld, eine Runde, danach automatisch neues Spiel.
|
||||
* `pool` bestimmt den Spielmodus (Competitive 5v5 oder Wingman 2v2), `warmupSeconds` die Zeit zum Verbinden.
|
||||
*/
|
||||
export function buildKnifeCommands({ map, pool = { gameType: 0, gameMode: 1 }, warmupSeconds = 90 }) {
|
||||
export function buildKnifeCommands({ map, pool = { gameType: 0, gameMode: 1 }, warmupSeconds = 90, password = '', endlessWarmup = false }) {
|
||||
return {
|
||||
map,
|
||||
beforeMapChange: [
|
||||
`game_type ${Number(pool.gameType)}`,
|
||||
`game_mode ${Number(pool.gameMode)}`,
|
||||
'sv_password ""',
|
||||
'tv_enable 0',
|
||||
`sv_password "${password}"`,
|
||||
// Auf dem Match-Server (mit Passwort) bleibt CSTV, wie es ist: das Match braucht es danach
|
||||
...(password ? [] : ['tv_enable 0']),
|
||||
`changelevel ${map}`,
|
||||
],
|
||||
afterMapChange: [
|
||||
@@ -56,15 +57,38 @@ export function buildKnifeCommands({ map, pool = { gameType: 0, gameMode: 1 }, w
|
||||
'mp_autoteambalance 0',
|
||||
'mp_limitteams 0',
|
||||
'mp_autokick 0',
|
||||
// Aufwärmphase zum Verbinden, danach beginnt die Messerrunde
|
||||
// Aufwärmphase zum Verbinden, danach beginnt die Messerrunde. Endlos: bis der Organisator sie startet.
|
||||
'mp_do_warmup_period 1',
|
||||
`mp_warmuptime ${Math.max(10, Math.min(600, Number(warmupSeconds) || 90))}`,
|
||||
'mp_warmup_pausetimer 0',
|
||||
`mp_warmup_pausetimer ${endlessWarmup ? 1 : 0}`,
|
||||
'mp_warmup_start',
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt die Messer-Einstellungen auf CS2-Standard zurück, bevor auf demselben Server das Match eingerichtet wird.
|
||||
* Was die Match-Konfiguration selbst setzt (Startgeld, Kaufzeit, Rundenzeit …), steht dort.
|
||||
*/
|
||||
export const KNIFE_UNDO_COMMANDS = [
|
||||
'mp_ct_default_secondary weapon_hkp2000',
|
||||
'mp_t_default_secondary weapon_glock',
|
||||
'mp_ct_default_primary ""',
|
||||
'mp_t_default_primary ""',
|
||||
'mp_ct_default_grenades ""',
|
||||
'mp_t_default_grenades ""',
|
||||
'mp_give_player_c4 1',
|
||||
'mp_maxmoney 16000',
|
||||
'mp_afterroundmoney 0',
|
||||
'mp_free_armor 0',
|
||||
'mp_weapons_allow_map_placed 1',
|
||||
'mp_death_drop_gun 1',
|
||||
'mp_death_drop_grenade 2',
|
||||
'mp_match_end_restart 0',
|
||||
'mp_roundtime_defuse 1.92',
|
||||
'mp_roundtime_hostage 1.92',
|
||||
];
|
||||
|
||||
/** Befehle, mit denen ein laufender Messer-Server für die nächsten Teams zurückgesetzt wird. */
|
||||
export const KNIFE_RESET_COMMANDS = ['mp_warmup_start'];
|
||||
|
||||
|
||||
Reference in new issue
Block a user