Fixed Loc_Wall behavior in FindLocation.c

stable-5.4
Maikel de Vries 2013-10-04 20:58:47 +02:00
parent d280bff611
commit b2ac11c326
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,11 @@ global func Loc_Wall(int direction)
if(direction & CNAT_Top) y = -1;
else
if(direction & CNAT_Bottom) y = 1;
return [LOC_WALL, x, y, !!(direction & (CNAT_Left | CNAT_Right)), !!(direction & (CNAT_Top | CNAT_Bottom))];
var both_left_right = !!((direction & CNAT_Top) && (direction & CNAT_Bottom));
var both_top_bottom = !!((direction & CNAT_Left) && (direction & CNAT_Right));
return [LOC_WALL, x, y, both_left_right, both_top_bottom];
}
/*