That is helpful to know although are there instances where the Origin.z is larger than Muzzle.z BUT no CTD occurs...
It seems to be related to ranged weapons that fire projectiles.
-- it just becomes more the barrel faces incorrectly OR the projectile fires the wrong way?
Well, it MAY be related to wrong facing, for example if the engine cannot handle the model. We had a similar issue with the random_aim_on_create weapon stat, set to [true] for the turret in SL, that was giving a random CTD.
But to be sure, let's have it properly coded for ALL our weapons
Here:
-- Run over the ebps/races/race_name folder of the race in question. -- Returns the entities with muzzles that are less than origins (CTD reason!) function each_file(rgd) if rgd.GameData.combat_ext ~= nil for i=1,15 for j=1,15 local wn = rgd:GET("GameData","combat_ext","hardpoints","hardpoint_0"..tostring(i),"weapon_table","weapon_0"..tostring(j),"weapon") if wn ~= nil and wn ~= "" then local origin = rgd:GET("GameData","combat_ext","hardpoints","hardpoint_0"..tostring(i),"weapon_table","weapon_0"..tostring(j),"origin","z") local muzzle = rgd:GET("GameData","combat_ext","hardpoints","hardpoint_0"..tostring(i),"weapon_table","weapon_0"..tostring(j),"muzzle","z") if origin >= muzzle then print(rgd.name:before(".rgd").." Hardpoint:"..i.." Weapon:"..j) end end end end end end function at_end() print("Done!") end
It is really simple, but effective