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 {
|
} else {
|
||||||
@:privateAccess marble.helicopterEnableTime = -1e8;
|
@:privateAccess marble.helicopterEnableTime = -1e8;
|
||||||
@:privateAccess marble.megaMarbleEnableTime = -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) {
|
if (this.isRecording) {
|
||||||
this.replay.recordCameraState(marble.camera.CameraYaw, marble.camera.CameraPitch);
|
this.replay.recordCameraState(marble.camera.CameraYaw, marble.camera.CameraPitch);
|
||||||
|
|
@ -1735,7 +1744,10 @@ class MarbleWorld extends Scheduler {
|
||||||
if (!this.isMultiplayer) {
|
if (!this.isMultiplayer) {
|
||||||
if (this.marble.outOfBounds
|
if (this.marble.outOfBounds
|
||||||
&& this.finishTime == null
|
&& 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.isWatching) {
|
||||||
this.restart(this.marble);
|
this.restart(this.marble);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ typedef ControlsSettings = {
|
||||||
var blast:Int;
|
var blast:Int;
|
||||||
var rewind:Int;
|
var rewind:Int;
|
||||||
var chat:Int;
|
var chat:Int;
|
||||||
|
var oobRespawnKeyByPowerup:Bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef TouchSettings = {
|
typedef TouchSettings = {
|
||||||
|
|
@ -164,7 +165,8 @@ class Settings {
|
||||||
respawn: Key.BACKSPACE,
|
respawn: Key.BACKSPACE,
|
||||||
blast: Key.MOUSE_RIGHT,
|
blast: Key.MOUSE_RIGHT,
|
||||||
rewind: Key.R,
|
rewind: Key.R,
|
||||||
chat: Key.T
|
chat: Key.T,
|
||||||
|
oobRespawnKeyByPowerup: false
|
||||||
};
|
};
|
||||||
|
|
||||||
public static var touchSettings:TouchSettings = {
|
public static var touchSettings:TouchSettings = {
|
||||||
|
|
@ -468,6 +470,9 @@ class Settings {
|
||||||
if (controlsSettings.chat == null) {
|
if (controlsSettings.chat == null) {
|
||||||
controlsSettings.chat = Key.T;
|
controlsSettings.chat = Key.T;
|
||||||
}
|
}
|
||||||
|
if (controlsSettings.oobRespawnKeyByPowerup == null) {
|
||||||
|
controlsSettings.oobRespawnKeyByPowerup = false;
|
||||||
|
}
|
||||||
if (optionsSettings.rewindEnabled == null) {
|
if (optionsSettings.rewindEnabled == null) {
|
||||||
optionsSettings.rewindEnabled = false;
|
optionsSettings.rewindEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,12 @@ class MiscOptionsGui extends GuiImage {
|
||||||
flOpt.setCurrentOption(Settings.optionsSettings.fastLoad ? 1 : 0);
|
flOpt.setCurrentOption(Settings.optionsSettings.fastLoad ? 1 : 0);
|
||||||
// #end
|
// #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();
|
var bottomBar = new GuiControl();
|
||||||
bottomBar.position = new Vector(0, 590);
|
bottomBar.position = new Vector(0, 590);
|
||||||
bottomBar.extent = new Vector(640, 200);
|
bottomBar.extent = new Vector(640, 200);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue