do all the backport fixes

This commit is contained in:
RandomityGuy 2023-07-21 21:03:16 +05:30
parent 5c446925ba
commit 72e83a5dbb
3 changed files with 7 additions and 7 deletions

View file

@ -74,7 +74,7 @@ class InstanceManager {
dtsShader.currentOpacity = instance.gameObject.currentOpacity;
}
var transform = instance.emptyObj.getAbsPos();
minfo.meshbatch.shadersChanged = true;
// minfo.meshbatch.shadersChanged = true;
minfo.meshbatch.material.mainPass.setPassName(minfo.mesh.material.mainPass.name);
minfo.meshbatch.material.mainPass.enableLights = minfo.mesh.material.mainPass.enableLights;
minfo.meshbatch.worldPosition = transform;
@ -92,7 +92,7 @@ class InstanceManager {
minfo.transparencymeshbatch.material.blendMode = Alpha;
// minfo.transparencymeshbatch.material.color.a = instance.gameObject.currentOpacity;
// minfo.transparencymeshbatch.material.mainPass.setPassName(minfo.mesh.material.mainPass.name);
minfo.transparencymeshbatch.shadersChanged = true;
// minfo.transparencymeshbatch.shadersChanged = true;
minfo.transparencymeshbatch.material.mainPass.enableLights = minfo.mesh.material.mainPass.enableLights;
// minfo.transparencymeshbatch.material.mainPass.depthWrite = false;
// if (dtsShader != null) {

View file

@ -923,7 +923,7 @@ class Marble extends GameObject {
if (rollVolume > 1)
rollVolume = 1;
if (contactPct < 0.05)
rollVolume = 0;
rollVolume = rollSound.volume / 5;
var slipVolume = 0.0;
if (slipAmount > 1e-4) {

View file

@ -590,19 +590,19 @@ class MarbleWorld extends Scheduler {
public function updateGameState() {
if (this.outOfBounds)
return; // We will update state manually
if (this.timeState.currentAttemptTime < 0.5) {
if (this.timeState.currentAttemptTime < 0.5 && this.finishTime == null) {
this.playGui.setCenterText('none');
this.marble.mode = Start;
}
if ((this.timeState.currentAttemptTime >= 0.5) && (this.timeState.currentAttemptTime < 2)) {
if ((this.timeState.currentAttemptTime >= 0.5) && (this.timeState.currentAttemptTime < 2) && this.finishTime == null) {
this.playGui.setCenterText('ready');
this.marble.mode = Start;
}
if ((this.timeState.currentAttemptTime >= 2) && (this.timeState.currentAttemptTime < 3.5)) {
if ((this.timeState.currentAttemptTime >= 2) && (this.timeState.currentAttemptTime < 3.5) && this.finishTime == null) {
this.playGui.setCenterText('set');
this.marble.mode = Start;
}
if ((this.timeState.currentAttemptTime >= 3.5) && (this.timeState.currentAttemptTime < 5.5)) {
if ((this.timeState.currentAttemptTime >= 3.5) && (this.timeState.currentAttemptTime < 5.5) && this.finishTime == null) {
this.playGui.setCenterText('go');
this.marble.mode = Play;
}