DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ProcessImpactSoundEx()

float EntityAI::ProcessImpactSoundEx ( IEntity other,
Contact extra,
float weight,
out int surfaceHash,
out int liquidType )
inlineprotected

См. определение в файле InventoryItem.c строка 198

199 {
200 float impactVelocity = extra.RelativeVelocityBefore.Length();
201 if ( impactVelocity < 0.3 )
202 return 0.0;
203
204 float tickTime = GetGame().GetTickTime();
206 return 0.0;
207
208 string surfaceName = GetImpactSurfaceTypeEx(other, extra, liquidType);
209 if ( surfaceName == "" )
210 return 0.0;
211
212#ifdef DIAG_DEVELOPER
213 string infoText = "Surface: " + surfaceName + ", Weight: " + weight + ", Speed: " + impactVelocity;
214
215 if ( s_ImpactSoundsInfo.Count() == 10 )
216 s_ImpactSoundsInfo.Remove(9);
217
218 s_ImpactSoundsInfo.InsertAt(infoText, 0);
219#endif
220
221 m_SoundContactTickTime = tickTime;
222
223 surfaceHash = surfaceName.Hash();
224 return impactVelocity;
225 }
proto native float GetTickTime()
Returns current time from start of the game.
string GetImpactSurfaceTypeEx(IEntity other, Contact impact, out int liquid)
Определения InventoryItem.c:160
const float SOUND_CONTACT_SKIP
Определения InventoryItem.c:3
float m_SoundContactTickTime
Определения InventoryItem.c:10
proto native float Length()
Returns length of vector (magnitude)
proto native CGame GetGame()
vector RelativeVelocityBefore
Определения EnPhysics.c:324
proto native int Hash()
Returns hash of string.

Перекрестные ссылки GetGame(), GetImpactSurfaceTypeEx(), CGame::GetTickTime(), string::Hash(), vector::Length(), m_SoundContactTickTime, Contact::RelativeVelocityBefore и SOUND_CONTACT_SKIP.

Используется в ProcessImpactSound().