Fix obj_can_see_obj not working in release build (#350)

This commit is contained in:
sonilyan 2024-02-15 10:04:57 +08:00 committed by GitHub
parent caea9cb4fb
commit 16b044ae31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1799,7 +1799,7 @@ static void opObjectCanSeeObject(Program* program)
if (object2->elevation == object1->elevation) {
if (object2->tile != -1 && object1->tile != -1) {
if (isWithinPerception(object1, object2)) {
Object* obstacle;
Object* obstacle = nullptr;
_make_straight_path(object1, object1->tile, object2->tile, nullptr, &obstacle, 16);
if (obstacle == object2) {
canSee = true;