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

◆ GetLiquidType()

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

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

111 {
112 int liquidType = LIQUID_NONE;
113 if ( target.GetObject() )
114 {
115 liquidType = target.GetObject().GetLiquidSourceType();
116 }
117 else
118 {
119 string surfaceType;
120 vector hit_pos = target.GetCursorHitPos();
121 g_Game.SurfaceGetType3D(hit_pos[0], hit_pos[1], hit_pos[2], surfaceType);
122 if (surfaceType == "")
123 {
124 if ( hit_pos[1] <= g_Game.SurfaceGetSeaLevel() + 0.001 )
125 {
126 liquidType = LIQUID_SALTWATER;
127 }
128 }
129 else
130 {
131 liquidType = SurfaceInfo.GetByName(surfaceType).GetLiquidType();
132 }
133 }
134
135 return liquidType & m_AllowedLiquidMask;
136 }
DayZGame g_Game
Определения DayZGame.c:4074
int[] SurfaceInfo
Определения SurfaceInfo.c:1
int m_AllowedLiquidMask
Определения ActionFillBottleBase.c:32
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:566
const int LIQUID_SALTWATER
Определения 3_Game/DayZ/constants.c:587

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

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