3 [
Attribute(
"0", UIWidgets.EditBox,
"Enter the tree part number.")]
4 private int m_iTreePartIndex;
6 #ifdef ENABLE_DESTRUCTION
12 override void OnInit(IEntity pOwnerEntity, GenericComponent pManagerComponent)
34 inout vector outMat[3],
40 if (RplSession.Mode() == RplMode.Client)
44 vector directionVector = -outMat[2];
45 directionVector.Normalize();
52 vector positionVector = outMat[0];
56 positionVector =
"0 0 0";
58 directionVector = (
m_OwnerEntity.GetOrigin() - outMat[0]) * damage;
61 directionVector.Normalize();
62 vector impulseVector = directionVector * (damage / 10);
65 m_OwnerPart.SetToBreak(positionVector: positionVector, impulseVector: impulseVector, damageType:
type);