From: black Date: Sun, 17 Oct 2004 19:48:02 +0000 (+0000) Subject: -Renamed two builtins of the new VM X-Git-Tag: xonotic-v0.1.0preview~5460 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=82ec9844edd69fa0a5e6bd365615aa9a6b30f773;p=xonotic%2Fdarkplaces.git -Renamed two builtins of the new VM -Fixed the hud weapon selection git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4663 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/menu.c b/menu.c index d1acd800..87d6dbbc 100644 --- a/menu.c +++ b/menu.c @@ -4118,7 +4118,7 @@ mfunction_t *PRVM_ED_FindFunction(const char *); // normal menu names (rest) #define M_F_TOGGLE "m_toggle" #define M_F_SHUTDOWN "m_shutdown" - +#undef NG_MENU static char *m_required_func[] = { M_F_INIT, M_F_KEYDOWN, diff --git a/prvm_cmds.c b/prvm_cmds.c index 4d2c9737..01902dbe 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -97,8 +97,8 @@ string search_getfilename(float handle, float num) string chr(float ascii) -float etof(entity ent) -entity ftoe(float num) +float itof(intt ent) +intt ftoi(float num) perhaps only : Menu : WriteMsg =============================== @@ -839,28 +839,28 @@ void VM_stof(void) /* ======================== -VM_etof +VM_itof -float etof(entity ent) +float itof(intt ent) ======================== */ -void VM_etof(void) +void VM_itof(void) { - VM_SAFEPARMCOUNT(1, VM_etof); + VM_SAFEPARMCOUNT(1, VM_itof); PRVM_G_FLOAT(OFS_RETURN) = PRVM_G_INT(OFS_PARM0); } /* ======================== -VM_ftoe +VM_itoe -entity ftoe(float num) +intt ftoi(float num) ======================== */ -void VM_ftoe(void) +void VM_ftoi(void) { int ent; - VM_SAFEPARMCOUNT(1, VM_ftoe); + VM_SAFEPARMCOUNT(1, VM_ftoi); ent = PRVM_G_FLOAT(OFS_PARM0); if(PRVM_PROG_TO_EDICT(ent)->p.e->free) @@ -2987,6 +2987,7 @@ void VM_M_getkeydest(void) VM_M_callfunction callfunction(...,string function_name) +Extension: pass ========= */ mfunction_t *PRVM_ED_FindFunction (const char *name); @@ -3341,8 +3342,8 @@ prvm_builtin_t vm_m_builtins[] = { VM_search_getsize, VM_search_getfilename, // 77 VM_chr, - VM_etof, - VM_ftoe,// 80 + VM_itof, + VM_ftoi,// 80 e10, // 90 e10, // 100 e100, // 200 diff --git a/sbar.c b/sbar.c index ec1870bd..fad52b54 100644 --- a/sbar.c +++ b/sbar.c @@ -967,11 +967,11 @@ void Sbar_Draw (void) { if (!(cl.items & (1 << i))) continue; - Sbar_DrawWeapon(i + 1, fade, (i == cl.stats[STAT_ACTIVEWEAPON])); + Sbar_DrawWeapon(i + 1, fade, ((1<