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

--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn@gmail.com 8 years ago
parent 37d6dc50f0
commit b640c0ce97

@ -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 //
//-----------------------------------------------

Loading…
Cancel
Save