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

◆ OnContact()

void map::OnContact ( string zoneName,
vector localPos,
IEntity other,
Contact data )
inlineprotected

Is called every time when vehicle collides with other object.

Аргументы
[in]zoneNameconfigured vehicle's zone that was hit
[in]localPosposition where the vehicle was hit in vehicle's space
[in]otherobject with which the vehicle is colliding
[in]datacontact properties

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

316 {
317 if (GetGame().IsServer())
318 {
319 #ifdef DIAG_DEVELOPER
320 m_ContactCalled = true;
322 {
323 string output = "Zone: " + zoneName + " | Impulse:" + data.Impulse;
324 Debug.Log(output);
325 }
326 #endif
327 if (m_ContactCache.Count() == 0)
328 {
330 m_ContactCache.Insert(zoneName, ccd);
332 float dot = vector.Dot(m_VelocityPrevTick.Normalized(), GetVelocity(this).Normalized());
333 if (dot < 0)
334 {
336 }
337
340 ccd.Insert(contactData);
341 }
342 }
343 }
vector m_VelocityPrevTick
Определения Transport.c:96
float m_MomentumPrevTick
Определения Transport.c:95
float GetMomentum()
Определения Transport.c:399
ref VehicleContactCache m_ContactCache
Определения Transport.c:90
Определения Transport.c:70
DayZGame GetGame()
Определения gameplay.c:636