Have you ever tried to remove the spawns from a projectile the moment one of the spawns collides with something?
Currently I have added this code to the ProcessFragments() method but the elimination is not covering all the projectiles, when colliding it only eliminates the projectiles created before the one that collided, if the one that collided was the last one generated then all the previous ones are deleted , but I need all of them to be removed including the ones that were before and my 2 neurons can't find a correct way to do it.
NOTE: The ProcessFragment () method is in the Projectile class inside the Entities folder of the server.
if (killSpawn)
{
if (Base.KillChildOnCollide) // Here my changes begin to try to eliminate the spawns
{
for (int j = 0; j < mSpawnedAmount; j++)
{
spawn.Dispose(j);
Spawns[j] = null;
mSpawnedAmount--;
}
}
else
{
spawn.Dispose(i);
Spawns[i] = null;
mSpawnCount--;
}
continue;
}
Question
Blinkuz
Have you ever tried to remove the spawns from a projectile the moment one of the spawns collides with something?
Currently I have added this code to the ProcessFragments() method but the elimination is not covering all the projectiles, when colliding it only eliminates the projectiles created before the one that collided, if the one that collided was the last one generated then all the previous ones are deleted , but I need all of them to be removed including the ones that were before and my 2 neurons can't find a correct way to do it.
NOTE: The ProcessFragment () method is in the Projectile class inside the Entities folder of the server.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts