fix minor marble bugs on first tick

This commit is contained in:
RandomityGuy 2022-12-14 19:11:16 +05:30
parent 7b00b995d1
commit cc00fb2fdf
2 changed files with 7 additions and 2 deletions

View file

@ -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));

View file

@ -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);
}
}