public static void EndProjectile(LSProjectile projectile)
        {
            int id = projectile.ID;
            if (ProjectileActive[id] == false) {
                return;
            }
            if (ProjectileBucket[id] != projectile)
            {
                return;
            }
            ProjectileActive[id] = false;
            ProjectileBucket[id] = null;
            OpenSlots.Add (id);

            CacheProjectile (projectile);
            projectile.Deactivate ();
        }
        public static void EndProjectile(LSProjectile projectile)
        {
            int id = projectile.ID;

            if (ProjectileActive[id] == false)
            {
                return;
            }
            if (ProjectileBucket[id] != projectile)
            {
                return;
            }
            ProjectileActive[id] = false;
            ProjectileBucket[id] = null;
            OpenSlots.Add(id);

            CacheProjectile(projectile);
            projectile.Deactivate();
        }
示例#3
0
 public static void EndProjectile(LSProjectile projectile)
 {
     if (projectile.Deterministic)
     {
         int id = projectile.ID;
         if (!ProjectileBucket.SafeRemoveAt(id, projectile))
         {
             Debug.Log("BOO! This is a terrible bug.");
         }
     }
     else
     {
         if (!NDProjectileBucket.SafeRemoveAt(projectile.ID, projectile))
         {
             Debug.Log("BOO! This is a terrible bug.");
         }
     }
     CacheProjectile(projectile);
     projectile.Deactivate();
 }