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

◆ EOnContact()

override void EOnContact ( IEntity other,
Contact extra )
private

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

1120 {
1122 {
1123 int liquidType = -1;
1124 ItemBaseType itemBaseType = ItemBaseType.Cast(GetEntityType());
1125 float impactSpeed = ProcessImpactSoundEx(other, extra, itemBaseType.m_ConfigWeight, m_ImpactSoundSurfaceHash, liquidType);
1126 if (impactSpeed > 0.0)
1127 {
1128 m_ImpactSpeed = impactSpeed;
1129 #ifndef SERVER
1130 #ifndef NO_GUI
1131 PlayImpactSound(itemBaseType.m_ConfigWeight, m_ImpactSpeed, m_ImpactSoundSurfaceHash);
1132 #endif
1133 #else
1134 m_WantPlayImpactSound = true;
1135 SetSynchDirty();
1136 #endif
1137 m_CanPlayImpactSound = (liquidType == -1);// prevents further playing of the sound when the surface is a liquid type
1138 }
1139 }
1140
1141 #ifdef SERVER
1142 if (GetCompEM() && GetCompEM().IsPlugged())
1143 {
1144 if (GetCompEM().GetCordLength() < vector.Distance(GetPosition(), GetCompEM().GetEnergySource().GetPosition()))
1145 GetCompEM().UnplugThis();
1146 }
1147 #endif
1148 }
bool m_CanPlayImpactSound
Определения ItemBase.c:49
int m_ImpactSoundSurfaceHash
Определения ItemBase.c:51
bool m_WantPlayImpactSound
Определения ItemBase.c:48
float m_ImpactSpeed
Определения ItemBase.c:50
Определения ItemBaseType.c:5
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Определения EnConvert.c:119
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

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