Ghost Projectile Caused by "Create Projectile" in Workshop

Projectiles created by “Create Projectile” or “Create Homing Projectile” will invisibly exist forever (ghost projectile) if the owner player leaves the game before the projectile is destroyed or hits the target. The projectiles will be invisible and untouchable but occupying “entities count” forever, and cannot be destroyed by “destroy effect”.

This bug occurs in some situations like the workshop code I shared below: 7S1V1.

I tested it on many maps and mods.
They all show the same bug issues of the ghost projectile.

The bug list:

  1. Creating an AI bot and creating projectiles belonging to it, then removing the bot from the game before the projectiles disappear will cause ghost projectiles.
  2. Creating a dummy bot and doing the same thing as above will cause ghost projectiles.
  3. Creating projectiles belonging to players, and then moving players into spectator slots will cause ghost projectiles.

In the code I shared, every dummy bot creates several projectiles, and then the bots are destroyed before the projectiles expire. Then you will find the entity count gradually increases to the maximum of 128. Finally, you cannot create any effects in the game.

Please import and test the workshop code 7S1V1 I shared, and test it in the game.

This issue hinders the creativity of the workshop. Authors can produce much more awesome works if the ghost projectile bug is fixed.


Description from “ArcanaXXI” in the workshop discussion forum:
If at any time a player leaves or swaps around, and that player owns a projectile, that projectile becomes a ghost entity before it’s lifetime expires or doesn’t deallocate at all after the owner is not captured anymore (e.g. by leaving or swap to spectator), this causes the projectile to occupy the Entity Count which is globally (server side) handelled, until the match ends. This restricts the creativity and growth of a workshop mode, due the max entity count of 128 or 256 (if workshop extention is used) is fastly reached causing the workshop to not allow any further creation of other effects.