added negative check
This commit is contained in:
parent
86374384df
commit
18fb5dd971
@ -130,6 +130,10 @@ void castRay(s16 angle){
|
|||||||
while(dof<8){
|
while(dof<8){
|
||||||
mx = fix16ToInt(rx) / 10;
|
mx = fix16ToInt(rx) / 10;
|
||||||
my = fix16ToInt(ry) / 10;
|
my = fix16ToInt(ry) / 10;
|
||||||
|
if(rx < 0 || ry < 0){
|
||||||
|
dof = 8;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(mx < 10 && my < 10 && map[my][mx] == 1){
|
if(mx < 10 && my < 10 && map[my][mx] == 1){
|
||||||
dof = 8;
|
dof = 8;
|
||||||
vx = rx;
|
vx = rx;
|
||||||
|
Loading…
Reference in New Issue
Block a user