mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Fixed: Resize collision when scale object/npc (using vpb)
--HG-- branch : develop
This commit is contained in:
parent
9390f9cca5
commit
5797b2d64e
1 changed files with 11 additions and 0 deletions
|
@ -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…
Reference in a new issue