]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_gecko.c
added prvm_offsets.h which centralizes field/global/function lookups for
[xonotic/darkplaces.git] / cl_gecko.c
index d92ed0a4fed6de3f221d5f20a7983d2ab2e40629..e66482d68730e060e31d3ca90098c4f062ca1c0f 100644 (file)
@@ -525,14 +525,14 @@ static OSGK_ScriptResult dpGlobal_query (void* objTag, void* methTag,
   saveProg = prog;
   PRVM_SetProg(instance->ownerProg);
 
   saveProg = prog;
   PRVM_SetProg(instance->ownerProg);
 
-  if (prog->funcoffsets.Gecko_Query)
+  if (PRVM_clientfunction(Gecko_Query))
   {
     OSGK_String* paramStr, *resultStr;
 
     if (!osgk_variant_get_string (strVal, &paramStr)) return srFailed;
         PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString (instance->name);
         PRVM_G_INT(OFS_PARM1) = PRVM_SetTempString (osgk_string_get (paramStr));
   {
     OSGK_String* paramStr, *resultStr;
 
     if (!osgk_variant_get_string (strVal, &paramStr)) return srFailed;
         PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString (instance->name);
         PRVM_G_INT(OFS_PARM1) = PRVM_SetTempString (osgk_string_get (paramStr));
-    PRVM_ExecuteProgram(prog->funcoffsets.Gecko_Query,"Gecko_Query() required");
+    PRVM_ExecuteProgram(PRVM_clientfunction(Gecko_Query),"Gecko_Query() required");
     resultStr = osgk_string_create (PRVM_G_STRING (OFS_RETURN));
     *returnVal = osgk_variant_create_string (cl_geckoembedding, resultStr);
     osgk_release (resultStr);
     resultStr = osgk_string_create (PRVM_G_STRING (OFS_RETURN));
     *returnVal = osgk_variant_create_string (cl_geckoembedding, resultStr);
     osgk_release (resultStr);