InLiquid converted to xyz_location

This commit is contained in:
Arthur Ice
2014-11-26 19:32:46 -08:00
parent 29573d7d19
commit 6cd614a05e
6 changed files with 119 additions and 118 deletions
+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();