diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-06-29 18:25:23 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-06-29 18:25:23 -0300 |
| commit | c09d30cb144ce421ef0e1a786d2965f9abcde0aa (patch) | |
| tree | 877611a3837996b9acddc5eaa8d30a9aa4424955 /src/info.cc | |
| parent | e59667ec6be0a21ce702ce077154357a1c7f7c04 (diff) | |
| download | game-c09d30cb144ce421ef0e1a786d2965f9abcde0aa.tar.gz game-c09d30cb144ce421ef0e1a786d2965f9abcde0aa.zip | |
`houses.cc`
Diffstat (limited to 'src/info.cc')
| -rw-r--r-- | src/info.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/info.cc b/src/info.cc index 13e777f..fa01ecb 100644 --- a/src/info.cc +++ b/src/info.cc @@ -777,9 +777,8 @@ bool SearchFreeField(int *x, int *y, int *z, int Distance, uint16 HouseID, bool } if(MovePossible){ - if(HouseID == HOUSEID_ANY - || !IsHouse(FieldX, FieldY, FieldZ) - || GetHouseID(FieldX, FieldY, FieldZ) == HouseID){ + if(HouseID == 0xFFFF || !IsHouse(FieldX, FieldY, FieldZ) + || (HouseID != 0 && GetHouseID(FieldX, FieldY, FieldZ) == HouseID)){ *x = FieldX; *y = FieldY; return true; @@ -831,7 +830,7 @@ static bool LoginPossible(int x, int y, int z, uint16 HouseID, bool Player){ return false; } - if(IsHouse(x, y, z) && GetHouseID(x, y, z) != HouseID){ + if(IsHouse(x, y, z) && (HouseID == 0 || GetHouseID(x, y, z) != HouseID)){ return false; } @@ -938,7 +937,7 @@ bool SearchSpawnField(int *x, int *y, int *z, int Distance, bool Player){ int FieldX = *x + OffsetX; int FieldY = *y + OffsetY; int FieldZ = *z; - if(IsHouse(FieldX, FieldY, FieldZ) && GetHouseID(FieldX, FieldY, FieldZ) != HouseID){ + if(IsHouse(FieldX, FieldY, FieldZ) && (HouseID == 0 || GetHouseID(FieldX, FieldY, FieldZ) != HouseID)){ continue; } |
