Fixed: Resize collision when scale object/npc (using vpb)

--HG--
branch : develop
This commit is contained in:
ulukyn@gmail.com 2017-08-22 23:22:06 +02:00
parent 9390f9cca5
commit 5797b2d64e

View file

@ -1718,6 +1718,17 @@ void CCharacterCL::updateVisualPropertyVpb(const NLMISC::TGameCycle &/* gameCycl
_Instances[0].setScale(CVector(s,s,s));
}
if (_Primitive)
{
float width, depth;
_Primitive->getSize(width, depth);
UMovePrimitive::TType primtype = _Primitive->getPrimitiveType();
_Primitive->setPrimitiveType(UMovePrimitive::_2DOrientedBox);
_Primitive->setSize((width / oldCustomScale) * _CustomScale, (depth / oldCustomScale) * _CustomScale);
_Primitive->setPrimitiveType(primtype);
}
}// updateVisualPropertyVpb //
//-----------------------------------------------