mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix minor marble bugs on first tick
This commit is contained in:
parent
7b00b995d1
commit
cc00fb2fdf
2 changed files with 7 additions and 2 deletions
|
|
@ -259,6 +259,7 @@ class Marble extends GameObject {
|
|||
var cloak:Bool = false;
|
||||
var teleporting:Bool = false;
|
||||
var isUltra:Bool = false;
|
||||
var _firstTick = true;
|
||||
|
||||
public var cubemapRenderer:CubemapRenderer;
|
||||
|
||||
|
|
@ -1427,7 +1428,10 @@ class Marble extends GameObject {
|
|||
|
||||
it++;
|
||||
|
||||
this.findContacts(collisionWorld, tempState);
|
||||
if (!this._firstTick)
|
||||
this.findContacts(collisionWorld, tempState);
|
||||
else
|
||||
this._firstTick = false;
|
||||
var cmf = this.computeMoveForces(m);
|
||||
var isCentered:Bool = cmf.result;
|
||||
var aControl = cmf.aControl;
|
||||
|
|
@ -1747,6 +1751,7 @@ class Marble extends GameObject {
|
|||
this.megaMarbleEnableTime = Math.NEGATIVE_INFINITY;
|
||||
this.lastContactNormal = new Vector(0, 0, 1);
|
||||
this.cloak = false;
|
||||
this._firstTick = true;
|
||||
if (this.teleporting) {
|
||||
var mesh:Mesh = cast this.children[0];
|
||||
mesh.material.mainPass.removeShader(mesh.material.mainPass.getShader(AlphaMult));
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class MainMenuGui extends GuiImage {
|
|||
versionText.vertSizing = Bottom;
|
||||
versionText.position = new Vector(502, 66);
|
||||
versionText.extent = new Vector(97, 72);
|
||||
versionText.text.text = "<p align=\"center\">1.2.1</p>";
|
||||
versionText.text.text = "<p align=\"center\">1.3.0</p>";
|
||||
this.addChild(versionText);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue