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

◆ GetLiquidType()

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

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

121 {
122 int liquidType = LIQUID_NONE;
123 if ( target.GetObject() )
124 {
125 liquidType = target.GetObject().GetLiquidSourceType();
126 }
127 else
128 {
129 string surfaceType;
130 vector hit_pos = target.GetCursorHitPos();
131 GetGame().SurfaceGetType3D(hit_pos[0], hit_pos[1], hit_pos[2], surfaceType);
132 if (surfaceType == "")
133 {
134 if ( hit_pos[1] <= g_Game.SurfaceGetSeaLevel() + 0.001 )
135 {
136 liquidType = LIQUID_SALTWATER;
137 }
138 }
139 else
140 {
141 liquidType = SurfaceInfo.GetByName(surfaceType).GetLiquidType();
142 }
143 }
144
145 return liquidType & m_AllowedLiquidMask;
146 }
DayZGame g_Game
Определения DayZGame.c:3868
int[] SurfaceInfo
Определения SurfaceInfo.c:1
int m_AllowedLiquidMask
Определения ActionFillBottleBase.c:35
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
Определения 3_Game/constants.c:529
const int LIQUID_SALTWATER
Определения 3_Game/constants.c:550

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