Originally Posted by jumpman
Why does while(1) and wait(1); cause so many problems for lots of entities in their own loop?

They do not really cause so many. It is just a little bit slower than calling all the functions by yourself. I guess the engine probably checks something or other during the execution of the functions in the scheduler and makes it slower than raw function calls, but that is the thing of been a versatile engine, I think. A single c_move call spends many times the time taken by the scheduler for calling the action. Same happens with ent_animate. Both are pretty intensive functions and it is necessary to reduce their cost as much as possible. Building a function scheduler without taking care of these both functions is futile.