menuqc += +VM_getkeybind, // #342 string(float keynum) getkeybind (EXT_CSQC)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 30 Jun 2010 15:05:44 +0000 (15:05 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 30 Jun 2010 15:05:44 +0000 (15:05 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10258 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
mvm_cmds.c
prvm_cmds.c
prvm_cmds.h

index d4bbe28..befe553 100644 (file)
@@ -29,7 +29,6 @@ void Sbar_SortFrags (void);
 void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius);
 void CSQC_RelinkAllEntities (int drawmask);
 void CSQC_RelinkCSQCEntities (void);
-const char *Key_GetBind (int key);
 
 // #1 void(vector ang) makevectors
 static void VM_CL_makevectors (void)
@@ -1299,13 +1298,6 @@ static void VM_CL_setpause(void)
                cl.csqc_paused = false;
 }
 
-//#342 string(float keynum) getkeybind (EXT_CSQC)
-static void VM_CL_getkeybind (void)
-{
-       VM_SAFEPARMCOUNT(1, VM_CL_getkeybind);
-       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(Key_GetBind((int)PRVM_G_FLOAT(OFS_PARM0)));
-}
-
 //#343 void(float usecursor) setcursormode (EXT_CSQC)
 static void VM_CL_setcursormode (void)
 {
@@ -4333,7 +4325,7 @@ VM_centerprint,                                   // #338 void(string s, ...) centerprint (EXT_CSQC)
 VM_print,                                              // #339 void(string s, ...) print (EXT_CSQC, DP_SV_PRINT)
 VM_keynumtostring,                             // #340 string(float keynum) keynumtostring (EXT_CSQC)
 VM_stringtokeynum,                             // #341 float(string keyname) stringtokeynum (EXT_CSQC)
-VM_CL_getkeybind,                              // #342 string(float keynum) getkeybind (EXT_CSQC)
+VM_getkeybind,                                 // #342 string(float keynum) getkeybind (EXT_CSQC)
 VM_CL_setcursormode,                   // #343 void(float usecursor) setcursormode (EXT_CSQC)
 VM_CL_getmousepos,                             // #344 vector() getmousepos (EXT_CSQC)
 VM_CL_getinputstate,                   // #345 float(float framenum) getinputstate (EXT_CSQC)
index 9ac5b87..49873b1 100644 (file)
@@ -1119,7 +1119,7 @@ NULL,                                                                     // #338
 NULL,                                                                  // #339
 NULL,                                                                  // #340
 NULL,                                                                  // #341
-NULL,                                                                  // #342
+VM_getkeybind,                                                 // #342 string(float keynum) getkeybind (EXT_CSQC)
 NULL,                                                                  // #343
 NULL,                                                                  // #344
 NULL,                                                                  // #345
index 2c87960..3976608 100644 (file)
@@ -3946,6 +3946,20 @@ void VM_stringtokeynum (void)
        PRVM_G_INT(OFS_RETURN) = Key_StringToKeynum(PRVM_G_STRING(OFS_PARM0));
 }
 
+/*
+=========
+VM_getkeybind
+
+string getkeybind(float key)
+=========
+*/
+const char *Key_GetBind (int key);
+void VM_getkeybind (void)
+{
+       VM_SAFEPARMCOUNT(1, VM_CL_getkeybind);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(Key_GetBind((int)PRVM_G_FLOAT(OFS_PARM0)));
+}
+
 // CL_Video interface functions
 
 /*
index cc9013d..c727b9b 100644 (file)
@@ -366,6 +366,7 @@ void VM_makevectors (void);
 void VM_vectorvectors (void);
 
 void VM_keynumtostring (void);
+void VM_getkeybind (void);
 void VM_findkeysforcommand (void);
 void VM_stringtokeynum (void);