|
@@ -691,8 +691,12 @@ class Object {
|
|
return follow = v;
|
|
return follow = v;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function computeVelocity() {
|
|
|
|
+ return prevAbsPosFrame != NO_VELOCITY;
|
|
|
|
+ }
|
|
|
|
+
|
|
function calcPrevAbsPos() {
|
|
function calcPrevAbsPos() {
|
|
- if ( prevAbsPosFrame == NO_VELOCITY )
|
|
|
|
|
|
+ if ( !computeVelocity() )
|
|
prevAbsPos = null;
|
|
prevAbsPos = null;
|
|
else if ( prevAbsPosFrame < hxd.Timer.frameCount ) {
|
|
else if ( prevAbsPosFrame < hxd.Timer.frameCount ) {
|
|
prevAbsPosFrame = hxd.Timer.frameCount;
|
|
prevAbsPosFrame = hxd.Timer.frameCount;
|
|
@@ -845,7 +849,7 @@ class Object {
|
|
var prevForcedScreenRatio : Float = ctx.forcedScreenRatio;
|
|
var prevForcedScreenRatio : Float = ctx.forcedScreenRatio;
|
|
if ( !drawn || !ctx.computeVelocity || fixedPosition || culled )
|
|
if ( !drawn || !ctx.computeVelocity || fixedPosition || culled )
|
|
prevAbsPosFrame = NO_VELOCITY;
|
|
prevAbsPosFrame = NO_VELOCITY;
|
|
- else if ( prevAbsPosFrame == NO_VELOCITY )
|
|
|
|
|
|
+ else if ( !computeVelocity() )
|
|
prevAbsPosFrame = VELOCITY;
|
|
prevAbsPosFrame = VELOCITY;
|
|
calcPrevAbsPos();
|
|
calcPrevAbsPos();
|
|
|
|
|