mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-21 22:56:13 +00:00
Fixed: Resize collision when scale object/npc (using vpb)
--HG-- branch : compatibility-develop
This commit is contained in:
parent
37d6dc50f0
commit
b640c0ce97
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