I think you misunderstood me. The content of grav as a local variable is preserved (/ restored) during and after each frame but its initial value could be any random value. Give the following example a try:

Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

action enemy()
{
	var grav;
	printf("%.3f",(double)grav);
	wait(1);
	sys_exit("");
}

void main()
{
	level_load(NULL);
	ent_create(CUBE_MDL,nullvector,enemy);
}



The solution to this obviously is to write "var grav = 0;" instead.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends