OSDN Git Service

視界通過判定を一部変更。 / Change a part of decision of sight passing.
authorDeskull <desull@users.sourceforge.jp>
Fri, 9 Jan 2015 03:34:39 +0000 (12:34 +0900)
committerDeskull <desull@users.sourceforge.jp>
Fri, 9 Jan 2015 03:34:39 +0000 (12:34 +0900)
Deeangband/Field.cpp

index 07facb0..02b3dd3 100644 (file)
@@ -119,15 +119,15 @@ namespace Deeangband
                                        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;
                                }
                        }
                }