[12027] Add some VMap LoS checking functions to Map scope

This commit is contained in:
Reamer 2012-07-05 19:37:25 +02:00 committed by Schmoozerd
parent 0e0a765312
commit ea30899db4
6 changed files with 28 additions and 19 deletions

View file

@ -10640,13 +10640,7 @@ void Unit::KnockBackFrom(Unit* target, float horizontalSpeed, float verticalSpee
float fx = ox + dis * vcos;
float fy = oy + dis * vsin;
float fz = oz;
float fx2, fy2, fz2; // getObjectHitPos overwrite last args in any result case
if(VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(GetMapId(), ox,oy,oz+0.5f, fx,fy,oz+0.5f,fx2,fy2,fz2, -0.5f))
{
fx = fx2;
fy = fy2;
fz = fz2;
}
GetMap()->GetObjectHitPos(ox,oy,oz+0.5f, fx,fy,oz+0.5f,fx,fy,fz, -0.5f);
UpdateAllowedPositionZ(fx, fy, fz);
GetMotionMaster()->MoveJump(fx,fy,fz,horizontalSpeed,max_height);
}