InLiquid converted to xyz_location

This commit is contained in:
Arthur Ice committed 2014-11-26 19:32:46 -08:00
1 parent 29573d7d19
commit 6cd614a05e
6 files changed
+119 -118

No files matched your search

+2 -1
View File
@@ -1372,7 +1372,8 @@ void Mob::AI_Process() {
//we cannot reach our target...
//underwater stuff only works with water maps in the zone!
if(IsNPC() && CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) {
if(!zone->watermap->InLiquid(target->GetX(), target->GetY(), target->GetZ())) {
auto targetPosition = xyz_location(target->GetX(), target->GetY(), target->GetZ());
if(!zone->watermap->InLiquid(targetPosition)) {
Mob *tar = hate_list.GetTop(this);
if(tar == target) {
WipeHateList();