mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
toggle for oob respawn key
This commit is contained in:
parent
cdc1261362
commit
d82ccb68c4
3 changed files with 25 additions and 2 deletions
|
|
@ -734,6 +734,15 @@ class MarbleWorld extends Scheduler {
|
|||
} else {
|
||||
@:privateAccess marble.helicopterEnableTime = -1e8;
|
||||
@:privateAccess marble.megaMarbleEnableTime = -1e8;
|
||||
|
||||
if (Settings.controlsSettings.oobRespawnKeyByPowerup) {
|
||||
var store = marble.heldPowerup;
|
||||
marble.heldPowerup = null;
|
||||
haxe.Timer.delay(() -> {
|
||||
if (marble.heldPowerup == null)
|
||||
marble.heldPowerup = store;
|
||||
}, 500); // This bs
|
||||
}
|
||||
}
|
||||
if (this.isRecording) {
|
||||
this.replay.recordCameraState(marble.camera.CameraYaw, marble.camera.CameraPitch);
|
||||
|
|
@ -1735,7 +1744,10 @@ class MarbleWorld extends Scheduler {
|
|||
if (!this.isMultiplayer) {
|
||||
if (this.marble.outOfBounds
|
||||
&& this.finishTime == null
|
||||
&& (Key.isDown(Settings.controlsSettings.jump) || Gamepad.isDown(Settings.gamepadSettings.jump))
|
||||
&& ((!Settings.controlsSettings.oobRespawnKeyByPowerup
|
||||
&& (Key.isDown(Settings.controlsSettings.jump) || Gamepad.isDown(Settings.gamepadSettings.jump)))
|
||||
|| (Settings.controlsSettings.oobRespawnKeyByPowerup
|
||||
&& (Key.isDown(Settings.controlsSettings.powerup) || Gamepad.isDown(Settings.gamepadSettings.powerup))))
|
||||
&& !this.isWatching) {
|
||||
this.restart(this.marble);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ typedef ControlsSettings = {
|
|||
var blast:Int;
|
||||
var rewind:Int;
|
||||
var chat:Int;
|
||||
var oobRespawnKeyByPowerup:Bool;
|
||||
}
|
||||
|
||||
typedef TouchSettings = {
|
||||
|
|
@ -164,7 +165,8 @@ class Settings {
|
|||
respawn: Key.BACKSPACE,
|
||||
blast: Key.MOUSE_RIGHT,
|
||||
rewind: Key.R,
|
||||
chat: Key.T
|
||||
chat: Key.T,
|
||||
oobRespawnKeyByPowerup: false
|
||||
};
|
||||
|
||||
public static var touchSettings:TouchSettings = {
|
||||
|
|
@ -468,6 +470,9 @@ class Settings {
|
|||
if (controlsSettings.chat == null) {
|
||||
controlsSettings.chat = Key.T;
|
||||
}
|
||||
if (controlsSettings.oobRespawnKeyByPowerup == null) {
|
||||
controlsSettings.oobRespawnKeyByPowerup = false;
|
||||
}
|
||||
if (optionsSettings.rewindEnabled == null) {
|
||||
optionsSettings.rewindEnabled = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,6 +96,12 @@ class MiscOptionsGui extends GuiImage {
|
|||
flOpt.setCurrentOption(Settings.optionsSettings.fastLoad ? 1 : 0);
|
||||
// #end
|
||||
|
||||
var oobResOpt = optionCollection.addOption(1, "OOB Respawn Key", ["Jump", "Powerup"], (idx) -> {
|
||||
Settings.controlsSettings.oobRespawnKeyByPowerup = (idx == 1);
|
||||
return true;
|
||||
}, 0.5, 118);
|
||||
oobResOpt.setCurrentOption(Settings.controlsSettings.oobRespawnKeyByPowerup ? 1 : 0);
|
||||
|
||||
var bottomBar = new GuiControl();
|
||||
bottomBar.position = new Vector(0, 590);
|
||||
bottomBar.extent = new Vector(640, 200);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue