mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix player scores not resetting on restart, fix bug relating to countdown, fix bug relating to gravmod
This commit is contained in:
parent
4d2002804c
commit
6ed7b208d3
4 changed files with 12 additions and 3 deletions
|
|
@ -629,6 +629,7 @@ class MarbleWorld extends Scheduler {
|
|||
marble.reset();
|
||||
marble.setMode(Start);
|
||||
}
|
||||
this.playGui.resetPlayerScores();
|
||||
}
|
||||
|
||||
var missionInfo:MissionElementScriptObject = cast this.mission.root.elements.filter((element) -> element._type == MissionElementType.ScriptObject
|
||||
|
|
|
|||
|
|
@ -714,6 +714,14 @@ class PlayGui {
|
|||
redrawPlayerList();
|
||||
}
|
||||
|
||||
public function resetPlayerScores() {
|
||||
for (player in playerList) {
|
||||
player.score = 0;
|
||||
}
|
||||
|
||||
redrawPlayerList();
|
||||
}
|
||||
|
||||
public function setHelpTextOpacity(value:Float) {
|
||||
@:privateAccess helpTextForeground.text._textColorVec.a = value;
|
||||
@:privateAccess helpTextBackground.text._textColorVec.a = value;
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ class NetCommands {
|
|||
|
||||
@:rpc(server) public static function setStartTicks(ticks:Int) {
|
||||
if (MarbleGame.instance.world != null) {
|
||||
MarbleGame.instance.world.serverStartTicks = ticks;
|
||||
MarbleGame.instance.world.startTime = MarbleGame.instance.world.timeState.timeSinceLoad + 3.5;
|
||||
MarbleGame.instance.world.serverStartTicks = ticks + 1; // Extra tick so we don't get 0
|
||||
MarbleGame.instance.world.startTime = MarbleGame.instance.world.timeState.timeSinceLoad + 3.5 + 0.032; // 1 extra tick
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class AntiGravity extends PowerUp {
|
|||
public function pickUp(marble:Marble):Bool {
|
||||
var direction = new Vector(0, 0, -1);
|
||||
direction.transform(this.getRotationQuat().toMatrix());
|
||||
return !direction.equals(this.level.marble.currentUp);
|
||||
return !direction.equals(marble.currentUp);
|
||||
}
|
||||
|
||||
public function use(marble:Marble, timeState:TimeState) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue