Monkeypatch flickering sprites
This commit is contained in:
parent
c899948192
commit
59aece2f63
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ Level = function(levelName) {
|
||||||
angle = (Math.atan2(ydist, xdist) - camera.angle + Math.PI) % (2 * Math.PI) - Math.PI;
|
angle = (Math.atan2(ydist, xdist) - camera.angle + Math.PI) % (2 * Math.PI) - Math.PI;
|
||||||
distance = Math.sqrt(ydist*ydist + xdist*xdist);
|
distance = Math.sqrt(ydist*ydist + xdist*xdist);
|
||||||
|
|
||||||
if (distance > 1024 || distance < 16 || Math.abs(angle) > Math.PI/2) {
|
if (distance > 1024 || distance < 16 || Math.abs(angle) > Math.PI/3) {
|
||||||
// Not in the viewport.
|
// Not in the viewport.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue