13 private const int BROKEN_LEG_PROB = 90;
14 private const int BLEED_SOURCE_PROB = 50;
15 private const int MAX_BLEED_SOURCE = 1;
46 super.StartActivate(player);
48 if (!
GetGame().IsDedicatedServer())
63 SetHealth(
"",
"", 0.0);
69 if (!
GetGame().IsDedicatedServer())
91 if (victim && victim.IsInherited(
CarScript))
105 if (
GetGame().IsServer() && victim)
107 if (!victim.GetAllowDamage())
115 Param1<EntityAI> params =
new Param1<EntityAI>(victim);
124 if (victim_PB && victim_PB.IsAlive())
127 randNum =
Math.RandomInt(0, 100);
128 if (randNum <= BROKEN_LEG_PROB)
130 float damage = victim_PB.GetMaxHealth(
"RightLeg",
"");
131 victim_PB.DamageAllLegs( damage );
134 randNum =
Math.RandomInt(0, 100);
135 if (randNum < BLEED_SOURCE_PROB)
137 for (i = 0; i < MAX_BLEED_SOURCE; i++)
140 randNum =
Math.RandomIntInclusive(0,
PlayerBase.m_BleedingSourcesLow.Count() - 1);
142 victim_PB.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(
PlayerBase.m_BleedingSourcesLow[randNum]);
163 super.OnSteppedOn(victim);
181 obj.ProcessDirectDamage(
DamageType.CLOSE_COMBAT,
this,
"",
"LandMineExplosion_CarWheel",
"0 0 0", 1);
201 super.OnItemLocationChanged(old_owner, new_owner);
206 super.EEKilled(killer);
213 if (!
GetGame().IsDedicatedServer())
220 override void Explode(
int damageType,
string ammoType =
"")
224 ammoType = ConfigGetString(
"ammoType");
229 ammoType =
"Dummy_Heavy";
236 DamageSystem.ExplosionDamage(
this, NULL, ammoType,
GetPosition() + offset, damageType);
248 super.OnRPC(sender, rpc_type, ctx);
250 Param1<bool> p =
new Param1<bool>(
false);
255 bool play = p.param1;
287 super.OnPlacementComplete(player, position, orientation);
303 return "landmine_deploy_SoundSet";
327 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
333 super.GetDebugActions(outputList);
338 if (super.OnAction(action_id, player, ctx))
342 if (action_id ==
EActions.ACTIVATE_ENTITY)
346 else if (action_id ==
EActions.DEACTIVATE_ENTITY)
Param4< int, int, string, int > TSelectableActionInfoWithColor
void AddAction(typename actionName)
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
void SoundStop()
Stops sound.
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
void OnServerSteppedOn(Object obj, string damageZone)
override string GetLoopDeploySoundset()
override void OnActivate()
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override bool IsDeployable()
override void SetActions()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DamageType
exposed from C++ (do not change)
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
override void EEKilled(Object killer)
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
const int SAT_DEBUG_ACTION
class JsonUndergroundAreaTriggerData GetPosition
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
override void OnRPC(ParamsReadContext ctx)
override void OnActivatedByItem(notnull ItemBase item)
Called when this item is activated by other.
ref EffectSound m_DisarmingLoopSound
override void Explode(int damageType, string ammoType="")
void PlayDisarmingLoopSound()
ref EffectSound m_SafetyPinSound
void StopDisarmingLoopSound()
enum SoundTypeMine m_TimerLoopSound
ref array< int > m_ClothingDmg
void Synch(EntityAI victim)
keeping "step" here for consistency only
const float UPDATE_TIMER_INTERVAL
void OnSteppedOut(EntityAI victim)
void OnSteppedOn(EntityAI victim)
const int DAMAGE_TRIGGER_MINE
EntityAI GetClosestCarWheel(EntityAI victim)
string m_InfoActivationTime
void SetInactive(bool stop_timer=true)
void DamageClothing(PlayerBase player)
void StartActivate(PlayerBase player)
bool m_AddDeactivationDefect