Skip to content

Commit

Permalink
Merge pull request #101 from Dovyski/fix_issue_4
Browse files Browse the repository at this point in the history
Fix bug in FlxSound.proximity
  • Loading branch information
IQAndreas committed Sep 21, 2012
2 parents a558c44 + 8417747 commit 6486760
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org/flixel/FlxSound.as
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,11 @@ package org.flixel
if(radial < 0) radial = 0;
if(radial > 1) radial = 1;

radial = 1 - radial;

if(_pan)
{
var d:Number = (_target.x-x)/_radius;
var d:Number = (x-_target.x)/_radius;
if(d < -1) d = -1;
else if(d > 1) d = 1;
_transform.pan = d;
Expand Down

0 comments on commit 6486760

Please sign in to comment.