Created attachment 2390[details]
Screenshot showing buggy behavior
Under certain circumstances, especially when a buildable is placed extremely near a ledge, the model of the bbox can be displayed at the bottom of the ledge, while the bbox and hitbox remain at the top of the ledge. This can make building difficult as it is not always easy to predict where your buildable's bbox will end up, and it can be abused to hide boosters and turrets behind ledges, while allowing them to effect the environment above the ledge.
This bug can be visible on many maps including tremor, atcs, and arachnid2.
Created attachment 2391[details]
Fix
The function CG_PositionAndOrientateBuildable uses CG_CapTrace initially to place the buildable, and if errors are detected, then it resorts to CG_Trace. However, it appears that not all of the errors can be caught, resulting in the nasty visual bugs described above. Using CG_Trace in all cases fixes the bug and does not appear to degrade performance significantly or break anything else as far as I have found.
Created attachment 2390 [details] Screenshot showing buggy behavior Under certain circumstances, especially when a buildable is placed extremely near a ledge, the model of the bbox can be displayed at the bottom of the ledge, while the bbox and hitbox remain at the top of the ledge. This can make building difficult as it is not always easy to predict where your buildable's bbox will end up, and it can be abused to hide boosters and turrets behind ledges, while allowing them to effect the environment above the ledge. This bug can be visible on many maps including tremor, atcs, and arachnid2.
Created attachment 2391 [details] Fix The function CG_PositionAndOrientateBuildable uses CG_CapTrace initially to place the buildable, and if errors are detected, then it resorts to CG_Trace. However, it appears that not all of the errors can be caught, resulting in the nasty visual bugs described above. Using CG_Trace in all cases fixes the bug and does not appear to degrade performance significantly or break anything else as far as I have found.