DayZ 1.29
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 строка 160

161{
162 if (player.IsInTransport())
163 return false;
164
165 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));
166
167 if (old_src.GetItem().GetHierarchyRootPlayer() == player || new_src.GetItem().GetHierarchyRootPlayer() == player)
168 {
169 animType1 = SlotToAnimType(player, old_src, old_dst);
170 animType2 = SlotToAnimType(player, new_src, new_dst);
171 //Print("animType1 = " + animType1);
172 //Print("animType2 = " + animType2);
173 if (animType1 != -1 && animType2 != -1)
174 {
175 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] SelectAnimationOfForceSwapInHands guard - selected animType1=" + animType1 + " animType2=" + animType2 + " for old_item=" + old_src.GetItem() + " for new_item=" + new_src.GetItem());
176 return true;
177 }
178 /*else if (animType1 != -1 || animType2 != -1) //HACK
179 {
180 animType1 = -1;
181 animType2 = -1;
182 return false;
183 }*/
184 }
185 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] SelectAnimationOfForceSwapInHands - no animation");
186 return false;
187}
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:233
InventoryLocation.
Определения InventoryLocation.c:30
static bool IsInventoryHFSMLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:766

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

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