]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
-Renamed two builtins of the new VM
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 Oct 2004 19:48:02 +0000 (19:48 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 Oct 2004 19:48:02 +0000 (19:48 +0000)
-Fixed the hud weapon selection

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4663 d7cf8633-e32d-0410-b094-e92efae38249

menu.c
prvm_cmds.c
sbar.c

diff --git a/menu.c b/menu.c
index d1acd800872a717a0936651f7bef4c264717159e..87d6dbbc8f94649f2d9e7e10a838019344cc4930 100644 (file)
--- 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,
index 4d2c97373a0c04bb20d28d4e3d7575bac6b491ec..01902dbe5dc2fd8cbec2b44debff8cf1f377bf4f 100644 (file)
@@ -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 ec1870bdca0487c0c32914ca724b55292b80f4db..fad52b54a307e4a8ff769323327f7e4376757608 100644 (file)
--- 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<<i) == cl.stats[STAT_ACTIVEWEAPON]));
                                }
                        
                                if((cl.items & (1<<12)))
-                                       Sbar_DrawWeapon(0, fade, (cl.stats[STAT_ACTIVEWEAPON] == 12));
+                                       Sbar_DrawWeapon(0, fade, (cl.stats[STAT_ACTIVEWEAPON] == (1<<12)));
                        }
 
                        //if (!cl.islocalgame)