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

◆ OnUpdateClient()

override void SquintSymptom::OnUpdateClient ( PlayerBase player,
float deltatime )
inlineprivate

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

21 {
22 if (player.IsUnconscious())
23 return;
24
25 CachedEquipmentStorageQuery query = new CachedEquipmentStorageQuery();
27 query.m_Placement = ECachedEquipmentPlacement.ATTACHMENT;
28 query.m_MaximumDepth = 2;
29
30 float protectionLevel = 0.0;
31 ItemBase coverItem = null;
32 array<Entity> coverItems = player.GetCachedEquipment().GetEntitiesByCategory(query);
33 int coverItemsCount = coverItems.Count();
34 for (int i = 0; i < coverItemsCount; ++i)
35 {
36 coverItem = ItemBase.Cast(coverItems[i]);
37 protectionLevel = coverItem.GetProtectionLevel(DEF_DUST_PARTICLE_EYES);
38 if (protectionLevel > 0.0)
39 break;
40 }
41
42 float sandstormIntensity;
43 ScriptedSandstormController sandstorm = ScriptedSandstormController.Cast(g_Game.GetWeather().GetSandstorm());
44 if (sandstorm)
45 sandstormIntensity = sandstorm.GetIntensityForPlayer(player);
46
47 float squintIntensity = Math.Clamp(sandstormIntensity - protectionLevel, 0.0, 1.0);
48
49 Param1<float> params = new Param1<float>(squintIntensity);
50 g_Game.GetMission().GetEffectWidgets().UpdateWidgets(EffectWidgetsTypes.SQUINTING, deltatime, params, EffectWidgetHandles.SQUINTING);
51 }
DayZGame g_Game
Определения DayZGame.c:4074
ECachedEquipmentItemCategory
Определения ECachedEquipmentItemCategory.c:2
ECachedEquipmentPlacement
Определения ECachedEquipmentPlacement.c:2
class GP5GasMask extends MaskBase ItemBase
ECachedEquipmentItemCategory m_Category
Определения CachedEquipmentStorageBase.c:5
ECachedEquipmentPlacement m_Placement
Определения CachedEquipmentStorageBase.c:6
override float GetIntensityForPlayer(Man player)
Определения ScriptedSandstormController.c:142
const int DEF_DUST_PARTICLE_EYES
Определения 3_Game/DayZ/constants.c:550

Перекрестные ссылки Math::Clamp(), DEF_DUST_PARTICLE_EYES, g_Game, ScriptedSandstormController::GetIntensityForPlayer(), CachedEquipmentStorageQuery::m_Category, CachedEquipmentStorageQuery::m_MaximumDepth и CachedEquipmentStorageQuery::m_Placement.