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

◆ SlotFertilityStateUpdate()

void ItemBase::SlotFertilityStateUpdate ( Slot slot)
inlineprivate

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

541 {
542 int idx = slot.GetSlotIndex();
543 int mask = 1 << idx;
544 int currentState = (m_SlotFertilityState >> idx) & 1;
545 int newState = slot.GetFertilityState();
546
547 // Clear the relevant bit first
548 m_SlotFertilityState &= ~mask;
549
550 // Set the bit state (1 for FERTILIZED, 0 for NONE)
551 m_SlotFertilityState |= (newState << idx);
552
553 if ((g_Game.IsServer() || !g_Game.IsMultiplayer()) && currentState != newState)
554 {
555 UpdateSlotTexture(slot.GetSlotIndex());
556
557 if (g_Game.IsServer())
558 SetSynchDirty();
559 }
560 }
DayZGame g_Game
Определения DayZGame.c:3868
int m_SlotFertilityState
Определения GardenBase.c:27
void UpdateSlotTexture(int slot_index)
This should be only called on server as the selections are synced to clients in C++.
Определения GardenBase.c:563

Перекрестные ссылки g_Game, m_SlotFertilityState и UpdateSlotTexture().