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

◆ IsAreaAtDoorFree() [1/2]

bool EntityAI::IsAreaAtDoorFree ( int currentSeat,
float maxAllowedObjHeight,
inout vector extents,
out vector transform[4] )
inlineprotected

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

635 {
636 GetTransform(transform);
637
638 vector crewPos;
639 vector crewDir;
640 CrewEntry( currentSeat, crewPos, crewDir );
641
642 vector entry[4];
643 entry[2] = crewDir;
644 entry[0] = vector.Up * crewDir;
645 entry[1] = entry[2] * entry[0];
646 entry[3] = crewPos;
647
648 Math3D.MatrixMultiply4( transform, entry, transform );
649
650 vector position = transform[3];
651 vector orientation = Math3D.MatrixToAngles(transform);
652
653 position[1] = position[1] + maxAllowedObjHeight + (extents[1] * 0.5);
654
655 array<Object> excluded = new array<Object>;
656 array<Object> collided = new array<Object>;
657
658 excluded.Insert(this);
659
660 g_Game.IsBoxColliding(position, orientation, extents, excluded, collided);
661
662 orientation.RotationMatrixFromAngles(transform);
663 transform[3] = position;
664
665 foreach (Object o : collided)
666 {
667 EntityAI e = EntityAI.Cast(o);
668 if (IsIgnoredObject(o))
669 continue;
670
671 vector minmax[2];
672 if (o.GetCollisionBox(minmax))
673 return false;
674 }
675
676 return true;
677 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:3942
proto void CrewEntry(int posIdx, out vector pos, out vector dir)
Reads entry point and direction into vehicle on given position in model space.
bool IsIgnoredObject(Object o)
Определения Transport.c:550
proto void RotationMatrixFromAngles(out vector mat[3])
Creates rotation matrix from angles.
static const vector Up
Определения EnConvert.c:120
class LOD Object

Перекрестные ссылки CrewEntry(), g_Game, IsIgnoredObject(), Math3D::MatrixMultiply4(), Math3D::MatrixToAngles(), vector::RotationMatrixFromAngles() и vector::Up.