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

◆ CanReachSeatFromDoors()

override bool CanReachSeatFromDoors ( string pSeatSelection,
vector pFromPos,
float pDistance = 1.0 )
protected

selection name is same as mem point (eg. "seat_driver")

skip the height

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

480 {
482 if (pSeatSelection.Length() > 0)
483 {
484 if (MemoryPointExists(pSeatSelection))
485 {
486 vector conditionPointMS = GetMemoryPointPos(pSeatSelection);
487 vector conditionPointWS = ModelToWorld(conditionPointMS);
488
490 conditionPointWS[1] = 0;
491 pFromPos[1] = 0;
492
493 if (vector.Distance(pFromPos, conditionPointWS) <= pDistance)
494 return true;
495 }
496 }
497
498 return false;
499 }
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Определения EnConvert.c:119
proto native int Length()
Returns length of string.

Перекрестные ссылки vector::Distance() и string::Length().