mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
more bugfixes
This commit is contained in:
parent
b6679f7b87
commit
203916bfae
5 changed files with 26 additions and 16 deletions
|
|
@ -1134,9 +1134,10 @@ class Marble extends GameObject {
|
|||
// else
|
||||
// gain = (contactVel - minVelocityBounceSoft) / (hardBounceSpeed - minVelocityBounceSoft) * (1.0 - gain) + gain;
|
||||
|
||||
if (this.connection != null)
|
||||
AudioManager.playSound(snd, this.getAbsPos().getPosition());
|
||||
else
|
||||
if (this.connection != null) {
|
||||
var distFromUs = @:privateAccess this.level.marble.lastRenderPos.distanceSq(this.lastRenderPos);
|
||||
snd.play(false, Settings.optionsSettings.soundVolume * gain / Math.max(1, distFromUs));
|
||||
} else
|
||||
snd.play(false, Settings.optionsSettings.soundVolume * gain);
|
||||
}
|
||||
}
|
||||
|
|
@ -2546,7 +2547,7 @@ class Marble extends GameObject {
|
|||
if (this.blastTicks < 156)
|
||||
return;
|
||||
var blastAmt = this.blastTicks / (25000 >> 5);
|
||||
var impulse = this.currentUp.multiply(Math.max(Math.sqrt(blastAmt), blastAmt) * 10);
|
||||
var impulse = this.currentUp.multiply((blastAmt > 1.0 ? blastAmt : Math.sqrt(blastAmt)) * 10);
|
||||
this.applyImpulse(impulse);
|
||||
if (!isNetUpdate && this.controllable)
|
||||
AudioManager.playSound(ResourceLoader.getResource('data/sound/blast.wav', ResourceLoader.getAudio, this.soundResources));
|
||||
|
|
@ -2583,7 +2584,7 @@ class Marble extends GameObject {
|
|||
} else {
|
||||
if (this.blastAmount < 0.2 || this.level.game != "ultra")
|
||||
return;
|
||||
var impulse = this.currentUp.multiply(Math.max(Math.sqrt(this.blastAmount), this.blastAmount) * 10);
|
||||
var impulse = this.currentUp.multiply((this.blastAmount > 1.0 ? this.blastAmount : Math.sqrt(this.blastAmount)) * 10);
|
||||
this.applyImpulse(impulse);
|
||||
AudioManager.playSound(ResourceLoader.getResource('data/sound/blast.wav', ResourceLoader.getAudio, this.soundResources));
|
||||
this.level.particleManager.createEmitter(this.blastAmount > 1 ? blastMaxParticleOptions : blastParticleOptions,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class MarbleGame {
|
|||
|
||||
static var instance:MarbleGame;
|
||||
|
||||
static var currentVersion = "1.5.4";
|
||||
static var currentVersion = "1.6.0";
|
||||
|
||||
var world:MarbleWorld;
|
||||
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ class MPPlayMissionGui extends GuiImage {
|
|||
currentSelectionStatic = 0;
|
||||
}
|
||||
|
||||
currentSelection = currentSelectionStatic;
|
||||
currentCategory = currentCategoryStatic;
|
||||
// currentSelection = currentSelectionStatic;
|
||||
// currentCategory = currentCategoryStatic;
|
||||
|
||||
MarbleGame.instance.toRecord = false;
|
||||
|
||||
|
|
@ -416,11 +416,19 @@ class MPPlayMissionGui extends GuiImage {
|
|||
chatInput = new GuiTextInput(markerFelt18);
|
||||
chatInput.text.textColor = 0x000000;
|
||||
chatInput.horizSizing = Width;
|
||||
chatInput.position = new Vector(0, 0);
|
||||
chatInput.extent = new Vector(402, 30);
|
||||
chatInput.position = new Vector(50, 0);
|
||||
chatInput.extent = new Vector(352, 30);
|
||||
chatInputContainer.addChild(chatInput);
|
||||
@:privateAccess chatInput.text.interactive.forceAnywherefocus = true;
|
||||
|
||||
var chatInputFocusTxt = new GuiText(markerFelt18);
|
||||
chatInputFocusTxt.position = new Vector(0, 0);
|
||||
chatInputFocusTxt.extent = new Vector(50, 30);
|
||||
chatInputFocusTxt.text.text = "Chat:";
|
||||
chatInputFocusTxt.text.textColor = 0x000000;
|
||||
chatInputFocusTxt.justify = Center;
|
||||
chatInputContainer.addChild(chatInputFocusTxt);
|
||||
|
||||
chatInput.text.onKeyDown = (e) -> {
|
||||
if (e.keyCode == Key.ENTER) {
|
||||
if (StringTools.trim(chatInput.text.text) != "") {
|
||||
|
|
|
|||
|
|
@ -68,13 +68,13 @@ class MisParser {
|
|||
startText = marbleAttributesRegEx.matchedRight();
|
||||
}
|
||||
|
||||
var activatedPackages = [];
|
||||
// var activatedPackages = [];
|
||||
startText = outsideText;
|
||||
|
||||
while (activatePackageRegEx.match(startText)) {
|
||||
activatedPackages.push(this.resolveExpression(activatePackageRegEx.matched(1)));
|
||||
startText = marbleAttributesRegEx.matchedRight();
|
||||
}
|
||||
// while (activatePackageRegEx.match(startText)) {
|
||||
// activatedPackages.push(this.resolveExpression(activatePackageRegEx.matched(1)));
|
||||
// startText = marbleAttributesRegEx.matchedRight();
|
||||
// }
|
||||
|
||||
if (objectWriteBeginIndex != -1 && objectWriteEndIndex != -1) {
|
||||
this.text = this.text.substring(objectWriteBeginIndex, objectWriteEndIndex);
|
||||
|
|
@ -127,7 +127,6 @@ class MisParser {
|
|||
var mf = new MisFile();
|
||||
mf.root = cast elements[0];
|
||||
mf.marbleAttributes = marbleAttributes;
|
||||
mf.activatedPackages = activatedPackages;
|
||||
return mf;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ class NetCommands {
|
|||
MPPlayMissionGui.currentCategoryStatic = category;
|
||||
MPPlayMissionGui.currentSelectionStatic = i;
|
||||
} else {
|
||||
MPPlayMissionGui.currentCategoryStatic = category;
|
||||
MPPlayMissionGui.currentSelectionStatic = i;
|
||||
MPPlayMissionGui.setLevelFn(category, i);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue