]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
replaced cl.movement_queue with direct use of cl.movecmd array, this
[xonotic/darkplaces.git] / clvm_cmds.c
index cedb6e818dcf536bfbd7ae5341e6b7aa92bd20c2..e43ce8942943368d9a3d2c245ddd0db592c2ed4f 100644 (file)
@@ -1079,14 +1079,17 @@ static void VM_CL_getinputstate (void)
        int i, frame;
        VM_SAFEPARMCOUNT(1, VM_CL_getinputstate);
        frame = (int)PRVM_G_FLOAT(OFS_PARM0);
-       for (i = 0;i < cl.movement_numqueue;i++)
-               if (cl.movement_queue[i].sequence == frame)
+       for (i = 0;i < CL_MAX_USERCMDS;i++)
+       {
+               if (cl.movecmd[i].sequence == frame)
                {
-                       VectorCopy(cl.movement_queue[i].viewangles, prog->globals.client->input_angles);
-                       //prog->globals.client->input_buttons = cl.movement_queue[i].//FIXME
-                       VectorCopy(cl.movement_queue[i].move, prog->globals.client->input_movevalues);
-                       prog->globals.client->input_timelength = cl.movement_queue[i].frametime;
-                       if(cl.movement_queue[i].crouch)
+                       VectorCopy(cl.movecmd[i].viewangles, prog->globals.client->input_angles);
+                       prog->globals.client->input_buttons = cl.movecmd[i].buttons; // FIXME: this should not be directly exposed to csqc (translation layer needed?)
+                       prog->globals.client->input_movevalues[0] = cl.movecmd[i].forwardmove;
+                       prog->globals.client->input_movevalues[1] = cl.movecmd[i].sidemove;
+                       prog->globals.client->input_movevalues[2] = cl.movecmd[i].upmove;
+                       prog->globals.client->input_timelength = cl.movecmd[i].frametime;
+                       if(cl.movecmd[i].crouch)
                        {
                                VectorCopy(cl.playercrouchmins, prog->globals.client->pmove_mins);
                                VectorCopy(cl.playercrouchmaxs, prog->globals.client->pmove_maxs);
@@ -1097,6 +1100,7 @@ static void VM_CL_getinputstate (void)
                                VectorCopy(cl.playerstandmaxs, prog->globals.client->pmove_maxs);
                        }
                }
+       }
 }
 
 //#346 void(float sens) setsensitivityscaler (EXT_CSQC)
@@ -2304,7 +2308,7 @@ void VM_CL_R_RenderScene (void)
        CL_UpdateViewEntities();
        // now draw stuff!
        R_RenderView();
-       
+
        polys->num_vertices = polys->num_triangles = 0;
 }
 
@@ -3363,6 +3367,26 @@ NULL,                                                    // #496
 NULL,                                                  // #497
 NULL,                                                  // #498
 NULL,                                                  // #499
+NULL,                                                  // #500
+NULL,                                                  // #501
+NULL,                                                  // #502
+NULL,                                                  // #503
+NULL,                                                  // #504
+NULL,                                                  // #505
+NULL,                                                  // #506
+NULL,                                                  // #507
+NULL,                                                  // #508
+NULL,                                                  // #509
+VM_uri_escape,                                 // #510 string(string in) uri_escape = #510;
+VM_uri_unescape,                               // #511 string(string in) uri_unescape = #511;
+VM_etof,                                       // #512 float(entity ent) num_for_edict = #512 (DP_QC_NUM_FOR_EDICT)
+NULL,                                                  // #513
+NULL,                                                  // #514
+NULL,                                                  // #515
+NULL,                                                  // #516
+NULL,                                                  // #517
+NULL,                                                  // #518
+NULL,                                                  // #519
 };
 
 const int vm_cl_numbuiltins = sizeof(vm_cl_builtins) / sizeof(prvm_builtin_t);