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

◆ SelectAnimationOfForceSwapInHands()

bool SelectAnimationOfForceSwapInHands ( notnull Man player,
notnull InventoryLocation old_src,
notnull InventoryLocation new_src,
notnull InventoryLocation old_dst,
notnull InventoryLocation new_dst,
out int animType1,
out int animType2 )

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

156{
157 if (player.IsInTransport())
158 return false;
159
160 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] SlotToAnimType - old_src=" + InventoryLocation.DumpToStringNullSafe(old_src) + " new_src=" + InventoryLocation.DumpToStringNullSafe(new_src) + " old_dst=" + InventoryLocation.DumpToStringNullSafe(old_dst) + " new_dst=" + InventoryLocation.DumpToStringNullSafe(new_dst));
161
162 if (old_src.GetItem().GetHierarchyRootPlayer() == player || new_src.GetItem().GetHierarchyRootPlayer() == player)
163 {
164 animType1 = SlotToAnimType(player, old_src, old_dst);
165 animType2 = SlotToAnimType(player, new_src, new_dst);
166 //Print("animType1 = " + animType1);
167 //Print("animType2 = " + animType2);
168 if (animType1 != -1 && animType2 != -1)
169 {
170 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] SelectAnimationOfForceSwapInHands guard - selected animType1=" + animType1 + " animType2=" + animType2 + " for old_item=" + old_src.GetItem() + " for new_item=" + new_src.GetItem());
171 return true;
172 }
173 /*else if (animType1 != -1 || animType2 != -1) //HACK
174 {
175 animType1 = -1;
176 animType2 = -1;
177 return false;
178 }*/
179 }
180 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] SelectAnimationOfForceSwapInHands - no animation");
181 return false;
182}
int SlotToAnimType(notnull Man player, notnull InventoryLocation src, InventoryLocation dst=null)
Определения HandAnimated_Guards.c:1
void hndDebugPrint(string s)
Определения HandFSM.c:1
static string DumpToStringNullSafe(InventoryLocation loc)
Определения InventoryLocation.c:226
InventoryLocation.
Определения InventoryLocation.c:29
static bool IsInventoryHFSMLogEnable()
Определения Debug.c:668
Определения Debug.c:594

Перекрестные ссылки InventoryLocation::DumpToStringNullSafe(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable() и SlotToAnimType().

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