DayZ 1.29
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 g_Game.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:3942
int[] SurfaceInfo
Определения SurfaceInfo.c:1
int m_AllowedLiquidMask
Определения ActionFillBottleBase.c:30
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:532
const int LIQUID_SALTWATER
Определения 3_Game/DayZ/constants.c:553

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

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