#pragma once #include "../gamemode.qh" #define autocvar_g_lms_lives_override cvar("g_lms_lives_override") void lms_Initialize(); REGISTER_MUTATOR(lms, false) { MUTATOR_ONADD { if (time > 1) // game loads at time 1 error("This is a game type and it cannot be added at runtime."); lms_Initialize(); SetLimits(((!autocvar_g_lms_lives_override) ? -1 : autocvar_g_lms_lives_override), 0, autocvar_timelimit_override, -1); } MUTATOR_ONROLLBACK_OR_REMOVE { // we actually cannot roll back lms_Initialize here // BUT: we don't need to! If this gets called, adding always // succeeds. } MUTATOR_ONREMOVE { LOG_INFO("This is a game type and it cannot be removed at runtime."); return -1; } return 0; } // lives related defs float lms_lowest_lives; float lms_next_place; float LMS_NewPlayerLives();