mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-02 16:23:57 +03:00
Add specific charge button option
Some checks are pending
Some checks are pending
This commit is contained in:
parent
76dab3e20d
commit
0deeddf8cb
@ -3325,7 +3325,18 @@ bool Player_UpdateLockOn(Player* player) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
bool rapidFire = CVarGetInteger("gRapidFire", 0) == 1;
|
bool rapidFire = CVarGetInteger("gRapidFire", 0) == 1;
|
||||||
if (rapidFire ? !(gInputHold->button & A_BUTTON) : (gInputHold->button & A_BUTTON)) {
|
bool charging;
|
||||||
|
if (rapidFire) {
|
||||||
|
if (CVarGetInteger("gLtoCharge", 0) == 1) {
|
||||||
|
charging = (gInputHold->button & L_TRIG) && !(gInputHold->button & A_BUTTON);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
charging = !(gInputHold->button & A_BUTTON);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
charging = (gInputHold->button & A_BUTTON);
|
||||||
|
}
|
||||||
|
if (charging) {
|
||||||
gChargeTimers[player->num]++;
|
gChargeTimers[player->num]++;
|
||||||
if (gChargeTimers[player->num] > 21) {
|
if (gChargeTimers[player->num] > 21) {
|
||||||
gChargeTimers[player->num] = 21;
|
gChargeTimers[player->num] = 21;
|
||||||
|
@ -1336,7 +1336,7 @@ void Aquas_BlueMarineShoot(Player* player) {
|
|||||||
if (player-> shotTimer > 0) {
|
if (player-> shotTimer > 0) {
|
||||||
player->shotTimer--;
|
player->shotTimer--;
|
||||||
}
|
}
|
||||||
if (player->shotTimer <= 0){
|
if (player->shotTimer <= 0) {
|
||||||
Aquas_BlueMarineLaser(player);
|
Aquas_BlueMarineLaser(player);
|
||||||
player->shotTimer = 3;
|
player->shotTimer = 3;
|
||||||
}
|
}
|
||||||
|
@ -501,6 +501,13 @@ void DrawCheatsMenu() {
|
|||||||
UIWidgets::CVarCheckbox("Rapid-fire mode", "gRapidFire", {
|
UIWidgets::CVarCheckbox("Rapid-fire mode", "gRapidFire", {
|
||||||
.tooltip = "Hold A to keep firing. Release A to start charging a shot."
|
.tooltip = "Hold A to keep firing. Release A to start charging a shot."
|
||||||
});
|
});
|
||||||
|
if (CVarGetInteger("gRapidFire", 0) == 1) {
|
||||||
|
ImGui::Dummy(ImVec2(22.0f, 0.0f));
|
||||||
|
ImGui::SameLine();
|
||||||
|
UIWidgets::CVarCheckbox("Hold L to Charge", "gLtoCharge", {
|
||||||
|
.tooltip = "If you prefer to not have auto-charge."
|
||||||
|
});
|
||||||
|
}
|
||||||
UIWidgets::CVarCheckbox("Self destruct button", "gHit64SelfDestruct", {
|
UIWidgets::CVarCheckbox("Self destruct button", "gHit64SelfDestruct", {
|
||||||
.tooltip = "Press Down on the D-PAD to instantly self destruct."
|
.tooltip = "Press Down on the D-PAD to instantly self destruct."
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user