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;
180 return surfaceImpact;
201 if ( impactVelocity < 0.3 )
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);
class AnimSoundObjectBuilderBank AnimSoundLookupTableBank()
proto native float GetTickTime()
Returns current time from start of the game.
proto native AbstractSoundScene GetSoundScene()
void SurfaceUnderObjectExCorrectedLiquid(notnull Object object, out string type, out string impact, out int liquidType)
static proto bool GetHitSurfaceAndLiquid(Object other, vector begPos, vector endPos, string surface, out int liquidType)
string GetImpactSurfaceTypeEx(IEntity other, Contact impact, out int liquid)
proto native bool IsOn()
Some inventoryItem devices can be switched on/off (radios, transmitters)
string GetRuinedMeleeAmmoType()
returns ammo (projectile) used in melee if the item is destroyed. Override higher for specific use
void InitImpactSoundData()
SoundLookupTable m_SoundImpactTable
proto native void ThrowPhysically(DayZPlayer player, vector force, bool collideWithCharacters=true)
float ProcessImpactSound(IEntity other, Contact extra, float weight, out int surfaceHash)
string GetTooltip()
Get tooltip text.
override bool IsMeleeWeapon()
proto native bool HasCollisionsWithCharacter()
AbstractWave PlaySound(SoundObject so, SoundObjectBuilder sob)
proto native void SwitchOn(bool onOff)
Some inventoryItem devices can be switched on/off (radios, transmitters)
void PlaySoundByAnimEvent(EAnimSoundEventID id)
proto native void EnableCollisionsWithCharacter(bool state)
collisions with character
proto native MeleeCombatData GetMeleeCombatData()
const float SOUND_CONTACT_SKIP
event bool OnUseFromInventory(Man owner)
proto native InventoryItemType GetInventoryItemType()
void PlayImpactSound(float weight, float velocity, int surfaceHash)
override bool IsInventoryItem()
proto native void ForceFarBubble(bool state)
Sets the item to use the server configured 'networkRangeFar' instead of 'networkRangeNear'.
float ProcessImpactSoundEx(IEntity other, Contact extra, float weight, out int surfaceHash, out int liquidType)
float m_SoundContactTickTime
string GetImpactSurfaceType(IEntity other, Contact impact)
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)
proto native CGame GetGame()
vector RelativeVelocityBefore
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
proto native AbstractWave Play3D(SoundObject soundObject, SoundObjectBuilder soundBuilder)
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
proto native void SetPosition(vector position)
Note: Sets the position locally if parented, retrieves globally with the sound offset.
proto native void SetKind(WaveKind kind)
proto string Get(int index)
Gets n-th character from string.
proto native int Hash()
Returns hash of string.