Decompile fn_17879 (CPathFinder::CanMove)
Batch #12787 by cremane: 1 byte-identical, 0 confirmed by peer review. - fn_17879 CPathFinder::CanMove: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
90a7d7d238
commit
9ea714353e
1 changed files with 5 additions and 4 deletions
|
|
@ -3,11 +3,12 @@
|
|||
// OFFSET: 0x00AD9550
|
||||
// FUNCTION: fn_17879
|
||||
bool CPathFinder::CanMove(int startX, int startY, int targetX, int targetY, char flag) const {
|
||||
if (targetX < 0 || targetY < 0 || targetX >= this->attr->width || targetY >= this->attr->height) {
|
||||
C3dAttr* const attr = this->attr;
|
||||
if (targetX < 0 || targetY < 0 || targetX >= attr->width || targetY >= attr->height) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const TerrainHeightCell* cell = this->attr->CellAt(targetX, targetY);
|
||||
const TerrainHeightCell* cell = attr->CellAt(targetX, targetY);
|
||||
if (!cell || cell->type == 1 || (flag != 12 && cell->type == 5)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -16,12 +17,12 @@ bool CPathFinder::CanMove(int startX, int startY, int targetX, int targetY, char
|
|||
return true;
|
||||
}
|
||||
|
||||
const TerrainHeightCell* side = this->attr->CellAt(startX, targetY);
|
||||
const TerrainHeightCell* side = attr->CellAt(startX, targetY);
|
||||
if (!side || side->type == 1 || side->type == 5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
side = this->attr->CellAt(targetX, startY);
|
||||
side = attr->CellAt(targetX, startY);
|
||||
if (!side || side->type == 1 || side->type == 5) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue