this->SightPass[y * this->width + x] = false;
this->PhysicalPass[y * this->width + x] = false;
}
- else if(this->GetSquare(x / 2 - 1, y / 2 - 1)->IsWall() || this->GetSquare(x / 2, y / 2 - 1)->IsWall() || this->GetSquare(x / 2 - 1, y / 2)->IsWall() || this->GetSquare(x / 2, y / 2 )->IsWall())
+ else if((!this->GetSquare(x / 2 - 1, y / 2 - 1)->IsWall() && !this->GetSquare(x / 2, y / 2 )->IsWall()) || (!this->GetSquare(x / 2, y / 2 - 1)->IsWall() && !this->GetSquare(x / 2 - 1, y / 2)->IsWall()))
{
- this->SightPass[y * this->width + x] = false;
- this->PhysicalPass[y * this->width + x] = false;
+ this->SightPass[y * this->width + x] = true;
+ this->PhysicalPass[y * this->width + x] = true;
}
else
{
- this->SightPass[y * this->width + x] = true;
- this->PhysicalPass[y * this->width + x] = true;
+ this->SightPass[y * this->width + x] = false;
+ this->PhysicalPass[y * this->width + x] = false;
}
}
}