37 if (ConfigIsExisting(
"isMeleeWeapon"))
56 if (!DescriptionOverride(temp))
57 temp = ConfigGetString(
"descriptionShort");
98 if (soundBuilder != null)
100 soundBuilder.AddVariable(
"weight", weight);
101 soundBuilder.AddVariable(
"speed", velocity);
104 SoundObject soundObject = soundBuilder.BuildSoundObject();
105 if (soundObject != null)
117 string soundImpactType =
"default";
118 if ( ConfigIsExisting(
"soundImpactType") )
119 soundImpactType = ConfigGetString(
"soundImpactType");
144 SoundObject soundObject = builder.BuildSoundObject();
163 GetWorldBounds(mins, maxs);
164 vector size = maxs - mins;
167 string surfaceImpact;
175 return surfaceImpact;
178 g_Game.SurfaceUnderObjectExCorrectedLiquid(
this, surface, surfaceImpact, liquid);
180 return surfaceImpact;
201 if ( impactVelocity < 0.3 )
204 float tickTime =
g_Game.GetTickTime();
209 if ( surfaceName ==
"" )
213 string infoText =
"Surface: " + surfaceName +
", Weight: " + weight +
", Speed: " + impactVelocity;
215 if ( s_ImpactSoundsInfo.Count() == 10 )
216 s_ImpactSoundsInfo.Remove(9);
218 s_ImpactSoundsInfo.InsertAt(infoText, 0);
223 surfaceHash = surfaceName.
Hash();
224 return impactVelocity;
228 static void DrawImpacts()
232 for (
int i = 0; i < s_ImpactSoundsInfo.Count(); ++i )
234 string line = (i + 1).
ToString() +
". " + s_ImpactSoundsInfo.
Get(i);
static proto bool GetHitSurfaceAndLiquid(Object other, vector begPos, vector endPos, string surface, out int liquidType)
void InitImpactSoundData()
const float SOUND_CONTACT_SKIP
AbstractWave PlaySound(SoundObject so, SoundObjectBuilder sob)
float m_SoundContactTickTime
proto native bool HasCollisionsWithCharacter()
override bool IsMeleeWeapon()
float ProcessImpactSoundEx(IEntity other, Contact extra, float weight, out int surfaceHash, out int liquidType)
proto native void EnableCollisionsWithCharacter(bool state)
collisions with character
proto native void ForceFarBubble(bool state)
Sets the item to use the server configured 'networkRangeFar' instead of 'networkRangeNear'.
proto native void ThrowPhysically(DayZPlayer player, vector force, bool collideWithCharacters=true)
event bool OnUseFromInventory(Man owner)
override bool IsInventoryItem()
string GetImpactSurfaceTypeEx(IEntity other, Contact impact, out int liquid)
void PlayImpactSound(float weight, float velocity, int surfaceHash)
string GetImpactSurfaceType(IEntity other, Contact impact)
SoundLookupTable m_SoundImpactTable
float ProcessImpactSound(IEntity other, Contact extra, float weight, out int surfaceHash)
string GetTooltip()
Get tooltip text.
proto native bool IsOn()
Some inventoryItem devices can be switched on/off (radios, transmitters).
void PlaySoundByAnimEvent(EAnimSoundEventID id)
proto native MeleeCombatData GetMeleeCombatData()
string GetRuinedMeleeAmmoType()
returns ammo (projectile) used in melee if the item is destroyed. Override higher for specific use
proto native InventoryItemType GetInventoryItemType()
proto native void SwitchOn(bool onOff)
Some inventoryItem devices can be switched on/off (radios, transmitters).
Internal ancestor of all Entity implementations.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
proto native float Length()
Returns length of vector (magnitude).
class AnimSoundObjectBuilderBank AnimSoundLookupTableBank()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
proto native void SetPosition(vector position)
Note: Sets the position locally if parented, retrieves globally with the sound offset.
vector GetPosition()
Get the world position of the Effect.
proto native void SetKind(WaveKind kind)
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
proto string Get(int index)
Gets n-th character from string.
proto native int Hash()
Returns hash of string.