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

◆ IsUnderRoofFromToCalculation()

static void IsUnderRoofFromToCalculation ( EntityAI entity,
out vector from,
out vector to,
float height = GameConstants.ROOF_CHECK_RAYCAST_DIST )
staticprotected

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

972 {
973 vector minMax[2];
974 entity.GetCollisionBox(minMax);
975
976 vector size = Vector(0,0,0);
977 //size[1] = minMax[1][1] - minMax[0][1];
978 float from_override = entity.HeightStartCheckOverride();
979 if (from_override > 0.0)
980 {
981 size[1] = from_override;
982 }
983 else
984 {
985 size[1] = minMax[1][1] - minMax[0][1];
986 }
987
988 from = entity.GetPosition() + size;
989 if ( entity.HeightCheckOverride() > 0 )
990 {
991 to = entity.GetPosition() + Vector(0, entity.HeightCheckOverride(), 0);
992 }
993 else
994 {
995 vector ceiling = "0 0 0";
996 ceiling[1] = height;
997 to = from + ceiling; //+size ??? offset to cast same distance
998 }
999 }
Определения EnConvert.c:106
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки Vector().

Используется в IsUnderRoofEx().