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

◆ HasAnimation()

bool IEntity::HasAnimation ( string anim_name)
inlineprivate

Searches object's config for the given animation name. Returns true if it was found, or false if not.

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

429 {
430 string cfg_path_vehicles = "CfgVehicles " + GetType() + " ";
431 if ( GetGame().ConfigIsExisting (cfg_path_vehicles) && GetGame().ConfigIsExisting (cfg_path_vehicles + "AnimationSources " + anim_name) )
432 {
433 return true;
434 }
435
436 string cfg_path_weapons = "CfgWeapons " + GetType() + " ";
437 if ( GetGame().ConfigIsExisting (cfg_path_weapons) && GetGame().ConfigIsExisting (cfg_path_weapons + "AnimationSources " + anim_name) )
438 {
439 return true;
440 }
441
442 string cfg_path_magazines = "CfgMagazines " + GetType() + " ";
443 if ( GetGame().ConfigIsExisting (cfg_path_magazines) && GetGame().ConfigIsExisting (cfg_path_magazines + "AnimationSources " + anim_name) )
444 {
445 return true;
446 }
447
448 return false;
449 }
proto native bool ConfigIsExisting(string entryName)
Checks if given entry exists.
string GetType()
Get config class of object.
Определения Object.c:470
proto native CGame GetGame()

Перекрестные ссылки ConfigIsExisting(), GetGame() и GetType().