Skip to content

Commit

Permalink
Fixed a bug with actors not being paused on creation (issue #1322).
Browse files Browse the repository at this point in the history
  • Loading branch information
rob1221 committed Aug 11, 2018
1 parent 7c18420 commit cb16f4f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion com/stencyl/Engine.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2299,7 +2299,15 @@ class Engine

public function getRecycledActorOfType(type:ActorType, x:Float, y:Float, layerConst:Int):Actor
{
return getRecycledActorOfTypeOnLayer(type, x, y, getLayerByOrder(layerConst).ID);
var a:Actor = getRecycledActorOfTypeOnLayer(type, x, y, getLayerByOrder(layerConst).ID);

if (Engine.paused)
{
a.updateDrawingMatrix();
a.pause();
}

return a;
}

public function getRecycledActorOfTypeOnLayer(type:ActorType, x:Float, y:Float, layerID:Int):Actor
Expand Down

0 comments on commit cb16f4f

Please sign in to comment.