125 string key =
string.Format(
"%1_%2", surface,
ammoType);
137 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);
140 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)
155 surface =
"Hit_Water";
159 if (!
eff && surface ==
"")
166 ErrorEx(
string.Format(
"Unregistered surface for bullet impact effect (%1). Register this surface in ImpactMaterials (Script) for better performance.", surface),
ErrorExSeverity.WARNING);
177 ErrorEx(
string.Format(
"Object '%1' with model file: %2 has undefined 'Hit_...' material! Cannot play impact effect.",
object_type,
directHit.GetShapeName()));
183 if (!
eff && surface !=
"")
185 ErrorEx(
string.Format(
"Unregistered surface impact material <%1>! Register this surface in ImpactMaterials (Script).", surface));
192 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
static int ERROR_NO_MATERIAL
static int RegisterSurface(string surface)
static int MEATBONES_FIST
static bool UnregisterSurface(string surface)
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.
Manager class for managing Effect (EffectParticle, EffectSound)
static int PlayInWorld(notnull Effect eff, vector pos)
Play an Effect.
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...