mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-12-25 01:12:53 +00:00
various reported bugfixes
This commit is contained in:
parent
2610a72257
commit
296c7e893b
8 changed files with 53 additions and 21 deletions
Binary file not shown.
|
|
@ -416,7 +416,7 @@ class DtsObject extends GameObject {
|
|||
dtsshader.normalizeNormals = false; // These arent normalized
|
||||
if (this.identifier != null && StringTools.startsWith(this.identifier, "GemBeam")) {
|
||||
dtsshader.usePremultipliedAlpha = true;
|
||||
dtsshader.opacityMult = 0.5; // Hardcoded
|
||||
dtsshader.opacityMult = 3.0; // Hardcoded
|
||||
}
|
||||
material.mainPass.removeShader(material.textureShader);
|
||||
material.mainPass.addShader(dtsshader);
|
||||
|
|
|
|||
|
|
@ -792,7 +792,8 @@ class MarbleWorld extends Scheduler {
|
|||
this.setUp(this.marble, startquat.up, this.timeState, true);
|
||||
this.deselectPowerUp(this.marble);
|
||||
|
||||
AudioManager.playSound(ResourceLoader.getResource('data/sound/spawn.wav', ResourceLoader.getAudio, this.soundResources));
|
||||
if (!this.isMultiplayer)
|
||||
AudioManager.playSound(ResourceLoader.getResource('data/sound/spawn.wav', ResourceLoader.getAudio, this.soundResources));
|
||||
|
||||
Console.log("State Start");
|
||||
this.clearSchedule();
|
||||
|
|
@ -844,6 +845,10 @@ class MarbleWorld extends Scheduler {
|
|||
|
||||
this.setUp(marble, respawnUp, this.timeState, true);
|
||||
|
||||
var store = marble.heldPowerup;
|
||||
marble.heldPowerup = null;
|
||||
haxe.Timer.delay(() -> marble.heldPowerup = store, 500); // This bs
|
||||
|
||||
if (marble == this.marble)
|
||||
this.playGui.setCenterText('none');
|
||||
if (!this.isMultiplayer)
|
||||
|
|
@ -2836,7 +2841,7 @@ class MarbleWorld extends Scheduler {
|
|||
offset.x = -offset.x;
|
||||
}
|
||||
var mpos = this.currentCheckpoint.obj.getAbsPos().getPosition().add(offset);
|
||||
this.marble.setPosition(mpos.x, mpos.y, mpos.z);
|
||||
this.marble.setMarblePosition(mpos.x, mpos.y, mpos.z);
|
||||
marble.velocity.load(new Vector(0, 0, 0));
|
||||
marble.omega.load(new Vector(0, 0, 0));
|
||||
Console.log('Respawn:');
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ class Radar {
|
|||
radarTileRedGem, radarTileYellowGem, radarTileBlueGem, radarTileGreenGem, radarTileOrangeGem, radarTilePinkGem, radarTilePurpleGem,
|
||||
radarTileTurquoiseGem, radarTileBlackGem, radarTilePlatinumGem, radarTileEndPad
|
||||
];
|
||||
for (tile in radarTiles) {
|
||||
tile.scaleToSize(tile.width * Settings.uiScale, tile.height * Settings.uiScale);
|
||||
}
|
||||
}
|
||||
|
||||
public function init() {
|
||||
|
|
|
|||
|
|
@ -259,8 +259,8 @@ class MPServerDlg extends GuiImage {
|
|||
playerPlus.position = new Vector(359, 9 + 29 * 5);
|
||||
playerPlus.extent = new Vector(31, 31);
|
||||
playerPlus.pressedAction = (sender) -> {
|
||||
Settings.serverSettings.maxPlayers = Std.int(Math.min(8, Settings.serverSettings.maxPlayers + 1));
|
||||
maxPlayers.text.text = "Max Players: " + Settings.serverSettings.maxPlayers;
|
||||
curServerMaxPlayers = Std.int(Math.min(8, curServerMaxPlayers + 1));
|
||||
maxPlayers.text.text = "Max Players: " + curServerMaxPlayers;
|
||||
};
|
||||
serverSettingsContainer.addChild(playerPlus);
|
||||
|
||||
|
|
|
|||
|
|
@ -632,19 +632,23 @@ class PlayGui {
|
|||
this.playGuiCtrl.addChild(playerListContainer);
|
||||
|
||||
var imgLoader = (s:String) -> {
|
||||
switch (s) {
|
||||
var t = switch (s) {
|
||||
case "high":
|
||||
return ResourceLoader.getResource("data/ui/mp/play/connection-high.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
ResourceLoader.getResource("data/ui/mp/play/connection-high.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "medium":
|
||||
return ResourceLoader.getResource("data/ui/mp/play/connection-medium.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
ResourceLoader.getResource("data/ui/mp/play/connection-medium.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "low":
|
||||
return ResourceLoader.getResource("data/ui/mp/play/connection-low.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
ResourceLoader.getResource("data/ui/mp/play/connection-low.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "matanny":
|
||||
return ResourceLoader.getResource("data/ui/mp/play/connection-matanny.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
ResourceLoader.getResource("data/ui/mp/play/connection-matanny.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "unknown":
|
||||
return ResourceLoader.getResource("data/ui/mp/play/connection-unknown.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
}
|
||||
return null;
|
||||
ResourceLoader.getResource("data/ui/mp/play/connection-unknown.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
default:
|
||||
null;
|
||||
};
|
||||
if (t != null)
|
||||
t.scaleToSize(t.width * (Settings.uiScale), t.height * (Settings.uiScale));
|
||||
return t;
|
||||
}
|
||||
|
||||
playerListCtrl = new GuiMLTextListCtrl(bfont, [], imgLoader, {
|
||||
|
|
|
|||
|
|
@ -99,11 +99,11 @@ class MisParser {
|
|||
else if (!lineMatch || (blockMatch && lineMatch && blockCommentRegEx.matchedPos().pos < lineCommentRegEx.matchedPos().pos)) {
|
||||
this.text = this.text.substring(0, blockCommentRegEx.matchedPos().pos)
|
||||
+ this.text.substring(blockCommentRegEx.matchedPos().pos + blockCommentRegEx.matchedPos().len);
|
||||
currentIndex += blockCommentRegEx.matchedPos().pos;
|
||||
currentIndex = blockCommentRegEx.matchedPos().pos + blockCommentRegEx.matchedPos().len;
|
||||
} else {
|
||||
this.text = this.text.substring(0, lineCommentRegEx.matchedPos().pos)
|
||||
+ this.text.substring(lineCommentRegEx.matchedPos().pos + lineCommentRegEx.matchedPos().len);
|
||||
currentIndex += lineCommentRegEx.matchedPos().pos;
|
||||
currentIndex = lineCommentRegEx.matchedPos().pos + lineCommentRegEx.matchedPos().len;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -294,13 +294,30 @@ class MisParser {
|
|||
|
||||
function readPath(name:String) {
|
||||
var sg:MissionElementSimGroup = cast this.readSimGroup(name);
|
||||
var obj = new MissionElementPath();
|
||||
obj._type = MissionElementType.Path;
|
||||
obj._name = name;
|
||||
obj.markers = sg.elements.map(x -> cast x);
|
||||
obj.markers.sort((a, b) -> cast MisParser.parseNumber(a.seqnum) - MisParser.parseNumber(b.seqnum));
|
||||
var allMarkers = true;
|
||||
// Verify if they are all markers
|
||||
for (e in sg.elements) {
|
||||
if (e._type != MissionElementType.Marker) {
|
||||
allMarkers = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (allMarkers) {
|
||||
var obj = new MissionElementPath();
|
||||
obj._type = MissionElementType.Path;
|
||||
obj._name = name;
|
||||
obj.markers = sg.elements.map(x -> cast x);
|
||||
obj.markers.sort((a, b) -> cast MisParser.parseNumber(a.seqnum) - MisParser.parseNumber(b.seqnum));
|
||||
|
||||
return obj;
|
||||
return obj;
|
||||
} else {
|
||||
var obj = new MissionElementPath();
|
||||
obj._type = MissionElementType.Path;
|
||||
obj._name = name;
|
||||
obj.markers = sg.elements.filter(x -> x._type == MissionElementType.Marker).map(x -> cast x);
|
||||
obj.markers.sort((a, b) -> cast MisParser.parseNumber(a.seqnum) - MisParser.parseNumber(b.seqnum));
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
/** Resolves a TorqueScript rvalue expression. Currently only supports the concatenation @ operator. */
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ import src.Console;
|
|||
import src.Marbleland;
|
||||
import src.Settings;
|
||||
import src.Util;
|
||||
import src.AudioManager;
|
||||
import src.ResourceLoader;
|
||||
|
||||
@:build(net.RPCMacro.build())
|
||||
class NetCommands {
|
||||
|
|
@ -248,6 +250,7 @@ class NetCommands {
|
|||
MarbleGame.instance.touchInput.setControlsEnabled(true);
|
||||
}
|
||||
MarbleGame.instance.world.marble.camera.stopOverview();
|
||||
AudioManager.playSound(ResourceLoader.getAudio('data/sound/spawn.wav').resource);
|
||||
}
|
||||
|
||||
if (Net.clientSpectate || Net.hostSpectate) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue