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

◆ ActionCondition()

override bool ActionDigGardenPlot::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

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

25 {
26 //Client
27 if (!GetGame().IsDedicatedServer())
28 {
29 //Action not allowed if player has broken legs
30 if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
31 return false;
32
33 if (!CfgGameplayHandler.GetDisableColdAreaPlacementCheck() && player.GetInColdArea())
34 return false;
35
36 if (player.IsPlacingLocal())
37 {
38 Hologram hologram = player.GetHologramLocal();
39 GardenPlot item_GP;
40 Class.CastTo(item_GP, hologram.GetProjectionEntity());
41 CheckSurfaceBelowGardenPlot(player, item_GP, hologram);
42
43 if (!hologram.IsColliding())
44 {
45 return true;
46 }
47 }
48 return false;
49 }
50 //Server
51 return true;
52 }
eBrokenLegs
Определения EBrokenLegs.c:2
void CheckSurfaceBelowGardenPlot(PlayerBase player, GardenPlot item_GP, Hologram hologram)
Определения ActionDigGardenPlot.c:62
bool IsColliding()
Определения Hologram.c:1324
EntityAI GetProjectionEntity()
Определения Hologram.c:1283
proto native CGame GetGame()

Перекрестные ссылки ActionTarget, Class::CastTo(), CheckSurfaceBelowGardenPlot(), CfgGameplayHandler::GetDisableColdAreaPlacementCheck(), GetGame(), Hologram::GetProjectionEntity() и Hologram::IsColliding().