mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[12027] Add some VMap LoS checking functions to Map scope
This commit is contained in:
parent
0e0a765312
commit
ea30899db4
6 changed files with 28 additions and 19 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue