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

◆ OnDebugSpawn()

void Entity::OnDebugSpawn ( )
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 3907

3908 {
3909 array<string> slots = new array<string>;
3910 ConfigGetTextArray("Attachments", slots);
3911
3912 array<string> mags = new array<string>;
3913 ConfigGetTextArray("magazines", mags);
3914
3915 //-------
3916
3917 TStringArray all_paths = new TStringArray;
3918
3919 all_paths.Insert(CFG_VEHICLESPATH);
3920 all_paths.Insert(CFG_MAGAZINESPATH);
3921 all_paths.Insert(CFG_WEAPONSPATH);
3922
3923 string config_path;
3924 string child_name;
3925 int scope;
3926 string path;
3927 int consumable_count;
3928
3929 for (int i = 0; i < all_paths.Count(); i++)
3930 {
3931 config_path = all_paths.Get(i);
3932 int children_count = g_Game.ConfigGetChildrenCount(config_path);
3933
3934 for (int x = 0; x < children_count; x++)
3935 {
3936 g_Game.ConfigGetChildName(config_path, x, child_name);
3937 path = config_path + " " + child_name;
3938 scope = g_Game.ConfigGetInt( config_path + " " + child_name + " scope" );
3939 bool should_check = true;
3940 if ( config_path == "CfgVehicles" && scope == 0)
3941 {
3942 should_check = false;
3943 }
3944
3945 if ( should_check )
3946 {
3947 string inv_slot;
3948 g_Game.ConfigGetText( config_path + " " + child_name + " inventorySlot",inv_slot );
3949 for (int z = 0; z < slots.Count(); z++)
3950 {
3951 if (slots.Get(z) == inv_slot)
3952 {
3953 this.GetInventory().CreateInInventory( child_name );
3954 continue;
3955 //Print("matching attachment: " + child_name + " for inv. slot name:" +inv_slot);
3956 }
3957 }
3958 }
3959 }
3960 }
3961 };
DayZGame g_Game
Определения DayZGame.c:3942
Icon x
string path
Определения OptionSelectorMultistate.c:142
proto native GameInventory GetInventory()
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
array< string > TStringArray
Определения EnScript.c:712
const string CFG_VEHICLESPATH
Определения 3_Game/DayZ/constants.c:220
const string CFG_WEAPONSPATH
Определения 3_Game/DayZ/constants.c:221
const string CFG_MAGAZINESPATH
Определения 3_Game/DayZ/constants.c:222

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, g_Game, GetInventory(), path и x.