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

◆ ProcessImpactSoundEx()

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

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

199 {
200 float impactVelocity = extra.RelativeVelocityBefore.Length();
201 if ( impactVelocity < 0.3 )
202 return 0.0;
203
204 float tickTime = g_Game.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 }
DayZGame g_Game
Определения DayZGame.c:3942
vector RelativeVelocityBefore
Определения Contact.c:35
string GetImpactSurfaceTypeEx(IEntity other, Contact impact, out int liquid)
const float SOUND_CONTACT_SKIP
float m_SoundContactTickTime
proto native float Length()
Returns length of vector (magnitude)
proto native int Hash()
Returns hash of string.

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

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