Whats about to save?

Maybe sould be posible to spawn with a probability.

If p=0.5, theres a 50% probability that will spawn a entity.

Code function to exit early if spawn return a null pointer.

the code "p" to become smaller has the remain pool of posible entitys its
less.

entitys == 1 -> p = 1
entitys == MAX_ENT/2 -> p = 0.5
entitys == MAX_ENT-1 -> p = 0.001
entitys == MAX_ENT -> p = 0

you can even add fuzzy logic. Say... you can have another var, K, that
means own important its a entity

K:
decal 0.1
decor 0.5
player, etc  1

then get the resulting product

probability = K * p

Theres good books about fuzzy logic on your nearest public library :]

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to