blob: d5067675644f95d3e950bb802d39e48e450635af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <libultraship/bridge/consolevariablebridge.h>
#include "2s2h/GameInteractor/GameInteractor.h"
#include "2s2h/ShipInit.hpp"
extern "C" {
#include "variables.h"
}
#define CVAR_NAME "gEnhancements.Masks.BlastMaskCooldown"
#define CVAR CVarGetFloat(CVAR_NAME, 15.5f)
void RegisterBlastMaskCooldown() {
COND_VB_SHOULD(VB_SET_BLAST_MASK_COOLDOWN_TIMER, CVAR < 15.5f, {
*should = false;
Player* player = GET_PLAYER(gPlayState);
player->blastMaskTimer = CVAR * 20; // Convert seconds to frames
});
}
static RegisterShipInitFunc initFunc(RegisterBlastMaskCooldown, { CVAR_NAME });
|