DayZ 1.30
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 строка 200

201 {
202 float impactVelocity = extra.RelativeVelocityBefore.Length();
203 if ( impactVelocity < 0.3 )
204 return 0.0;
205
206 float tickTime = g_Game.GetTickTime();
208 return 0.0;
209
210 string surfaceName = GetImpactSurfaceTypeEx(other, extra, liquidType);
211 if ( surfaceName == "" )
212 return 0.0;
213
214#ifdef DIAG_DEVELOPER
215 string infoText = "Surface: " + surfaceName + ", Weight: " + weight + ", Speed: " + impactVelocity;
216
217 if ( s_ImpactSoundsInfo.Count() == 10 )
218 s_ImpactSoundsInfo.Remove(9);
219
220 s_ImpactSoundsInfo.InsertAt(infoText, 0);
221#endif
222
223 m_SoundContactTickTime = tickTime;
224
225 surfaceHash = surfaceName.Hash();
226 return impactVelocity;
227 }
DayZGame g_Game
Определения DayZGame.c:4074
string surfaceName
Определения DustKickupEffects.c:19
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(), vector::Length(), m_SoundContactTickTime, Contact::RelativeVelocityBefore, SOUND_CONTACT_SKIP и surfaceName.

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