Spawnflags

Spawnflags are a collection of boolean variables that are condensed into a single integer. Each boolean is assigned a number value equal to a power of two. When combinations of these numbers are added together, they will never equal the same number as another combination.

This condensation can save the game a large amount of memory. 20 entities with 10 booleans each equals 200 variables that must be individually checked. 20 entities with 1 integer each is only 20 variables to process.

The engine stores flags through a keyvalue called.