> -- > I need to add air resistance for a particular entity's movement. > However, there is nothing the SDK which contains the movement code for > non-player entities(PM_* is Player Movement only). Basically I need to > modify MOVETYPE_TOSS to add a > VectorScale(velocity,1.0-frametime*DRAG_COEF,velocity) > As the SDK doesn't contain non-player movement code, how should I go > about doing this? I was thinking about using the entity's Think > function, and just have it called every frame. To do this, what should > nextthink be set to?
I'd just set it to gpGlobals->time. Think every frame. (Unless your entity is using MOVETYPE_PUSH, that is... in which case things get a lot more complicated.) In case it helps: each frame, the engine seems to run think functions for the entities just *after* running the physics for them. -- Laurie Cheers _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

