Refactor away from '== null' checks towards isSet

This commit is contained in:
2014-06-26 07:15:38 -07:00
parent e0f236c5c0
commit 5ac3159e38
4 changed files with 29 additions and 28 deletions

View File

@@ -103,7 +103,7 @@ function nearestWalkableTile(spr)
for ( var i = 1 ; i < 100 ; i++ ) {
var rv = _walkable_inner(i);
if ( rv !== null ) {
if ( isSet(rv) ) {
console.log("Found near walkable tile");
console.log([rv] + [spr.x / 32, spr.y / 32]);
return rv