Page MenuHomeFeedback Tracker
Feed Advanced Search

Jun 11 2022

OGskystrider added a comment to T159815: Handling of casts, error in CalculateVisibilityForAI.

Hopefully this gets addressed but, in the meanwhile, I've created this script snippet to identify modded clothing items that may generate the error:

int count = GetGame().ConfigGetChildrenCount("CfgVehicles");
string child;
 
PrintFormat("Checking %1 types", count);
for (int i = 0; i < count; ++i)
{
    if (!GetGame().ConfigGetChildName("CfgVehicles", i, child))
    {
        continue;
    }
 
    if (GetGame().ConfigGetInt(string.Format("CfgVehicles %1 scope", child)) != 2)
    {
        continue;
    }
 
    Object obj = GetGame().CreateObject(child, "0 0 0");
    if (obj && obj.IsClothing() && Clothing.Cast(obj) == null)
    {
        PrintFormat("Bad clothing type: %1", child);
    }
    GetGame().ObjectDelete(obj);
}
Print("Done checking types");
Jun 11 2022, 3:23 AM · DayZ Modding, DayZ