]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
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)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 1 Jul 2010 18:37:26 +0000 (20:37 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10258 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=9e2930c2fa043bbc2fe78735984fe6cc4d174534

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

index b45dc21f307b21d24924bfdcadaf7b285f2bea85..8614a1219d2464889ecd547da1dd3b8192a3e97a 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)
 {
@@ -4335,7 +4327,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 9ac5b8781cc08b4d3d8a506506605f929ca01bef..49873b134757495a6787637c4c6fa8fd74a4d544 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 2c879603d8a8462a743db36b56ba934d3fecd519..3976608f3e2af8020b6b398915a688f7968424f5 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 cc9013d6d050e894d73e67a4fd997f55682c0fab..c727b9bfc138ff1b4f00d75c911dff90950f697d 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);