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

◆ EOnContact()

override void InventoryItem::EOnContact ( IEntity other,
Contact extra )
inlineprivate

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

1195 {
1197 {
1198 int liquidType = -1;
1199 float impactSpeed = ProcessImpactSoundEx(other, extra, m_ConfigWeight, m_ImpactSoundSurfaceHash, liquidType);
1200 if (impactSpeed > 0.0)
1201 {
1202 m_ImpactSpeed = impactSpeed;
1203 #ifndef SERVER
1204 PlayImpactSound(m_ConfigWeight, m_ImpactSpeed, m_ImpactSoundSurfaceHash);
1205 #else
1206 m_WantPlayImpactSound = true;
1207 SetSynchDirty();
1208 #endif
1209 m_CanPlayImpactSound = (liquidType == -1);// prevents further playing of the sound when the surface is a liquid type
1210 }
1211 }
1212
1213 #ifdef SERVER
1214 if (GetCompEM() && GetCompEM().IsPlugged())
1215 {
1216 if (GetCompEM().GetCordLength() < vector.Distance(GetPosition(), GetCompEM().GetEnergySource().GetPosition()))
1217 GetCompEM().UnplugThis();
1218 }
1219 #endif
1220 }
float m_ImpactSpeed
Определения ItemBase.c:57
int m_ImpactSoundSurfaceHash
Определения ItemBase.c:58
bool m_WantPlayImpactSound
Определения ItemBase.c:55
bool m_CanPlayImpactSound
Определения ItemBase.c:56
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки vector::Distance(), GetPosition(), m_CanPlayImpactSound, m_ImpactSoundSurfaceHash, m_ImpactSpeed и m_WantPlayImpactSound.