10class ImpactEffectsData
129 string key =
string.Format(
"%1_%2", surface, ammoType);
141 EvaluateImpactEffect(pData.m_DirectHit, pData.m_ComponentIndex, pData.m_Surface, pData.m_Position, pData.m_ImpactType, pData.m_SurfaceNormal, pData.m_ExitPosition, pData.m_InSpeed, pData.m_OutSpeed, pData.m_IsDeflected, pData.m_AmmoType, pData.m_IsWater);
144 static void EvaluateImpactEffect(
Object directHit,
int componentIndex,
string surface,
vector pos,
int impact_type,
vector surfNormal,
vector exitPos,
vector inSpeed,
vector outSpeed,
bool deflected,
string ammoType,
bool isWater)
159 surface =
"Hit_Water";
163 if ( !eff && surface ==
"" )
170 ErrorEx(
string.Format(
"Unregistered surface for bullet impact effect (%1). Register this surface in ImpactMaterials (Script) for better performance.", surface),
ErrorExSeverity.WARNING);
176 string object_type = directHit.GetType();
178 if ( object_type ==
"" )
179 object_type =
"OBJECT_WITHOUT_CONFIG_CLASS";
181 ErrorEx(
string.Format(
"Object '%1' with model file: %2 has undefined 'Hit_...' material! Cannot play impact effect.", object_type, directHit.GetShapeName()));
187 if ( !eff && surface !=
"" )
189 ErrorEx(
string.Format(
"Unregistered surface impact material <%1>! Register this surface in ImpactMaterials (Script).", surface));
195 eff.
EvaluateEffect(directHit, componentIndex, pos, impact_type, surfNormal, exitPos, inSpeed, outSpeed, ammoType);
196 eff.SetAutodestroy(
true);
void Spawn()
spawn damage trigger
@ UNKNOWN
24 - Any other error. Can be returned from any call.
vector m_Position
Cached world position.
enum ImpactTypes m_DirectHit
void EvaluateEffect(Object directHit, int componentIndex, vector pos, int impact_type, vector surfNormal, vector exitPos, vector inSpeed, vector outSpeed, string ammoType)
static int ERROR_NO_MATERIAL
static int RegisterSurface(string surface)
static int MEATBONES_FIST
static bool UnregisterSurface(string surface)
static int FOLIAGE_CONIFER
static int RegisterIgnoredAmmo(string ammo)
static void EvaluateImpactEffect(Object directHit, int componentIndex, string surface, vector pos, int impact_type, vector surfNormal, vector exitPos, vector inSpeed, vector outSpeed, bool deflected, string ammoType, bool isWater)
static GetImpactEffect(string surface, string ammoType)
static int MEATBONES_SHOVEL
static ref map< string, typename > m_ImpactEffect
static bool UnregisterIgnoredAmmo(string ammo)
static int MEATBONES_PIPEWRENCH
static int m_LastRegisteredIgnoredAmmo
static void EvaluateImpactEffectEx(ImpactEffectsData pData)
static int MEATBONES_WRENCH
static int m_LastRegisteredMaterial
static ref map< string, int > m_IgnoredAmmo
Map of ammo which will not spawn any impact effect.
static int PlayInWorld(notnull Effect eff, vector pos)
Play an Effect.
Manager class for managing Effect (EffectParticle, EffectSound)
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...