3 protected const string ANIM_PHASE_PACKED =
"Bag";
4 protected const string ANIM_PHASE_DEPLOYED =
"Mine";
5 protected const string SELECTION_NAME_LED =
"LED";
14 SetAmmoTypes({
"ClaymoreMine_Ammo",
"ClaymoreMine_Secondary_Ammo"});
18 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdLow");
19 RegisterNetSyncVariableInt(
"m_RAIB.m_PairDeviceNetIdHigh");
23 override void EOnInit(
IEntity other,
int extra)
28 override void EEKilled(
Object killer)
30 super.EEKilled(killer);
38 override void EEDelete(
EntityAI parent)
40 super.EEDelete(parent);
49 override protected void InitiateExplosion()
56 super.InitiateExplosion();
59 override void AfterStoreLoad()
61 super.AfterStoreLoad();
70 override void OnVariablesSynchronized()
72 super.OnVariablesSynchronized();
76 m_RAIB.OnVariableSynchronized();
84 super.EEItemLocationChanged(oldLoc, newLoc);
99 override void PairRemote(notnull
EntityAI trigger)
106 return m_RAIB.GetPairDevice();
109 override bool CanBeDisarmed()
114 override void OnActivatedByItem(notnull
ItemBase item)
120 if (GetPairDevice() == item)
122 SetHealth(
"",
"", 0.0);
128 override void OnArmed()
135 #ifdef DIAG_DEVELOPER
143 override void OnDisarmed(
bool pWithTool)
145 super.OnDisarmed(pWithTool);
147 #ifdef DIAG_DEVELOPER
148 RemoveDebugVisuals();
156 SetHealth(
"",
"", 0.0);
163 override void OnPlacementComplete(Man player,
vector position =
"0 0 0",
vector orientation =
"0 0 0")
165 super.OnPlacementComplete(player, position, orientation);
178 protected void UpdateVisuals()
182 ShowSelection(ANIM_PHASE_DEPLOYED);
183 HideSelection(ANIM_PHASE_PACKED);
184 if (GetOnViewIndexChanged())
186 GetOnViewIndexChanged().Invoke();
191 HideSelection(ANIM_PHASE_DEPLOYED);
192 ShowSelection(ANIM_PHASE_PACKED);
193 if (GetOnViewIndexChanged())
195 GetOnViewIndexChanged().Invoke();
209 SetObjectTexture(selectionIdx, RemoteDetonator.COLOR_LED_LIT);
212 SetObjectTexture(selectionIdx, RemoteDetonator.COLOR_LED_OFF);
220 override bool IsTakeable()
222 return !
GetArmed() && super.IsTakeable();
225 override bool IsDeployable()
230 override void SetActions()
239 override int GetViewIndex()
241 if (MemoryPointExists(
"invView2"))
252 override protected bool UsesGlobalDeploy()
257 override string GetDeploySoundset()
259 return "placeClaymore_SoundSet";
262 override string GetLoopDeploySoundset()
264 return "claymore_deploy_Soundset";
267 override void OnDebugSpawn()
274 #ifdef DIAG_DEVELOPER
284 debug_output +=
string.Format(
"low net id: %1\n",
m_RAIB.GetPairDeviceNetIdLow());
285 debug_output +=
string.Format(
"high net id: %1\n",
m_RAIB.GetPairDeviceNetIdHigh());
286 debug_output +=
string.Format(
"pair device: %1\n",
m_RAIB.GetPairDevice());
291 protected void DrawDamageZone()
300 float hitRange = game.ConfigGetFloat(cfgPath +
" indirectHitRange");
301 float hitRangeMultiplier = game.ConfigGetFloat(cfgPath +
" indirectHitRangeMultiplier");
302 float verticalAngle = game.ConfigGetFloat(cfgPath +
" indirectHitAngle1");
303 float horizontalAngle = game.ConfigGetFloat(cfgPath +
" indirectHitAngle2");
304 float range = hitRange * hitRangeMultiplier;
307 RemoveDebugVisuals();
309 GetTransform(selfMatrix);
314 void RemoveDebugVisuals()