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

◆ GetLiquidType()

int ActionFillBottleBase::GetLiquidType ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprotected

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

104 {
105 int liquidType = LIQUID_NONE;
106 if ( target.GetObject() )
107 {
108 liquidType = target.GetObject().GetLiquidSourceType();
109 }
110 else
111 {
112 string surfaceType;
113 vector hit_pos = target.GetCursorHitPos();
114 GetGame().SurfaceGetType3D(hit_pos[0], hit_pos[1], hit_pos[2], surfaceType);
115 if (surfaceType == "")
116 {
117 if ( hit_pos[1] <= g_Game.SurfaceGetSeaLevel() + 0.001 )
118 {
119 liquidType = LIQUID_SALTWATER;
120 }
121 }
122 else
123 {
124 liquidType = SurfaceInfo.GetByName(surfaceType).GetLiquidType();
125 }
126 }
127
128 return liquidType & m_AllowedLiquidMask;
129 }
DayZGame g_Game
Определения DayZGame.c:3868
int[] SurfaceInfo
Определения SurfaceInfo.c:1
int m_AllowedLiquidMask
Определения ActionFillBottleBase.c:30
proto float SurfaceGetType3D(float x, float y, float z, out string type)
Y input: Maximum Y to trace down from; Returns: Y position the surface was found.
proto native CGame GetGame()
const int LIQUID_NONE
Определения constants.c:527
const int LIQUID_SALTWATER
Определения constants.c:548

Перекрестные ссылки ActionTarget, g_Game, SurfaceInfo::GetByName(), GetGame(), SurfaceInfo::GetLiquidType(), LIQUID_NONE, LIQUID_SALTWATER, m_AllowedLiquidMask и CGame::SurfaceGetType3D().

Используется в ActionFillBottleBaseCB::CreateActionComponent().