/load and pirate spawns: Disable collision checks until entity is fully loaded

    Thalanor

    CEO Snataris Colonial Fleetyards
    Joined
    Sep 10, 2013
    Messages
    818
    Reaction score
    708
    • Master Builder Bronze
    • Thinking Positive
    • Legacy Citizen 3
    So, here is the thing. Yes, we have shipyards. However, there are times when you would want to admin-load large entities - or have them spawn as pirates and the like. Currently, the problem is that spawning a very rail intensive blueprint will usually send a notable fraction of docked stuff (even non-turrets) spinning wildly off the ship, and the internal collisions cause the entity to jerk around massively. So here is the suggestion:

    1. When a blueprint spawns or is directly loaded in, before the first chunk is loaded, entirely disable collision and logic for that entity.
    2. Have it fully complete the loading. Everything that was docked when the blueprint was created should still be docked when the blueprint is loaded, so there is no reason why stuff should be flying off the ship at supersonic speeds (goes for internal rail doors and the like).
    3. Check recursively if the entire entity is fully loaded in - that includes ALL turrets and rail docks, and their entire docking chains.
    4. Only then do a collision check for the entire entity - only to check if it spawned inside anything, not to check if the docked stuff collides with itself or the mother entity (that check should never be necessary at this point)
    5. If that is not the case, enable collision checks for the entity and the entity docks again, and enable logic.

    Result: docked stuff would never undock again upon loading in the entire BP.