Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

remove

From Quake Wiki

void remove(entity e)

Usage[edit]

Deletes an entity from the game. This should be used with caution as it can cause entity pointers to become invalid as they're not cleared automatically. If you know an entity has a pointer to the one being removed, manually set the pointer to world as a safety measure.

Parameters[edit]

  • e
The entity to remove.

Example[edit]

// This temporary entity removes itself after it does its task
void SpawnTempEntity()
{
    entity temp = spawn();
    temp.nextthink = time + 1;
    temp.think = PerformTask;
}

void PerformTask()
{
    // ...

   remove(self);
}