Added a new CON command:

getticks <VAR>

It's isn't synced and should be using for animation and profiling(=speed measure). Using it for gameplay will desync multiplayer game.

git-svn-id: https://svn.eduke32.com/eduke32@797 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hnt_ts 2008-06-11 07:35:30 +00:00
parent 2922adb278
commit fa46b7d155
3 changed files with 9 additions and 0 deletions

View file

@ -452,6 +452,7 @@ static const char *keyw[] =
"readarrayfromfile", // 320
"starttrackvar", // 321
"qgetsysstr", // 322
"getticks", // 323
"<null>"
};
@ -3284,6 +3285,7 @@ static int parsecommand(void)
break;
}
case CON_GETTICKS:
case CON_GETCURRADDRESS:
transvartype(GAMEVAR_FLAG_READONLY);
return 0;

View file

@ -812,4 +812,5 @@ enum keywords
CON_READARRAYFROMFILE, // 320
CON_STARTTRACKVAR, // 321
CON_QGETSYSSTR, // 322
CON_GETTICKS // 323
};

View file

@ -7349,6 +7349,12 @@ static int parse(void)
hittype[g_i].flags = GetGameVarID(*insptr++, g_i, g_p);
break;
case CON_GETTICKS:
insptr++;
j=*insptr++;
SetGameVarID(j, getticks(), g_i, g_p);
break;
case CON_GETCURRADDRESS:
insptr++;
j=*insptr++;