#include "mdfour.h"
extern cvar_t prvm_backtraceforwarnings;
+extern dllhandle_t ode_dll;
// LordHavoc: changed this to NOT use a return statement, so that it can be used in functions that must return a value
void VM_Warning(prvm_prog_t *prog, const char *fmt, ...)
// LordHavoc: quite tempting to break apart this function to reuse the
// duplicated code, but I suspect it is better for performance
// this way
-void VM_FrameBlendFromFrameGroupBlend(frameblend_t *frameblend, const framegroupblend_t *framegroupblend, const dp_model_t *model)
+void VM_FrameBlendFromFrameGroupBlend(frameblend_t *frameblend, const framegroupblend_t *framegroupblend, const dp_model_t *model, double curtime)
{
int sub2, numframes, f, i, k;
int isfirstframegroup = true;
memset(blend, 0, MAX_FRAMEBLENDS * sizeof(*blend));
- if (!model || !model->surfmesh.isanimated || model->numframes <= 1)
+ if (!model || !model->surfmesh.isanimated)
{
blend[0].lerp = 1;
return;
if (scene->framecount > 1)
{
// this code path is only used on .zym models and torches
- sublerp = scene->framerate * (cl.time - g->start);
+ sublerp = scene->framerate * (curtime - g->start);
f = (int) floor(sublerp);
sublerp -= f;
sub2 = f + 1;
// special sheck for ODE
if (!strncasecmp("DP_PHYSICS_ODE", name, 14))
{
-#ifdef USEODE
+#ifdef ODE_DYNAMIC
return ode_dll ? true : false;
+#else
+#ifdef ODE_STATIC
+ return true;
#else
return false;
+#endif
#endif
}
string precache_pic(string pic)
=========
*/
+#define PRECACHE_PIC_FROMWAD 1 /* FTEQW, not supported here */
+#define PRECACHE_PIC_NOTPERSISTENT 2
+//#define PRECACHE_PIC_NOCLAMP 4
+#define PRECACHE_PIC_MIPMAP 8
void VM_precache_pic(prvm_prog_t *prog)
{
const char *s;
+ int flags = 0;
- VM_SAFEPARMCOUNT(1, VM_precache_pic);
+ VM_SAFEPARMCOUNTRANGE(1, 2, VM_precache_pic);
s = PRVM_G_STRING(OFS_PARM0);
PRVM_G_INT(OFS_RETURN) = PRVM_G_INT(OFS_PARM0);
VM_CheckEmptyString(prog, s);
+ if(prog->argc >= 2)
+ {
+ int f = PRVM_G_FLOAT(OFS_PARM1);
+ if(f & PRECACHE_PIC_NOTPERSISTENT)
+ flags |= CACHEPICFLAG_NOTPERSISTENT;
+ //if(f & PRECACHE_PIC_NOCLAMP)
+ // flags |= CACHEPICFLAG_NOCLAMP;
+ if(f & PRECACHE_PIC_MIPMAP)
+ flags |= CACHEPICFLAG_MIPMAP;
+ }
+
// AK Draw_CachePic is supposed to always return a valid pointer
- if( Draw_CachePic_Flags(s, 0)->tex == r_texture_notexture )
+ if( Draw_CachePic_Flags(s, flags)->tex == r_texture_notexture )
PRVM_G_INT(OFS_RETURN) = OFS_NULL;
}
}
if(pos[2] || scale[2])
- VM_Warning("VM_drawcharacter: z value%c from %s discarded\n",(pos[2] && scale[2]) ? 's' : 0,((pos[2] && scale[2]) ? "pos and scale" : (pos[2] ? "pos" : "scale")));
+ VM_Warning(prog, "VM_drawcharacter: z value%c from %s discarded\n",(pos[2] && scale[2]) ? 's' : 0,((pos[2] && scale[2]) ? "pos and scale" : (pos[2] ? "pos" : "scale")));
if(!scale[0] || !scale[1])
{
}
if(pos[2] || scale[2])
- VM_Warning("VM_drawstring: z value%s from %s discarded\n",(pos[2] && scale[2]) ? "s" : " ",((pos[2] && scale[2]) ? "pos and scale" : (pos[2] ? "pos" : "scale")));
+ VM_Warning(prog, "VM_drawstring: z value%s from %s discarded\n",(pos[2] && scale[2]) ? "s" : " ",((pos[2] && scale[2]) ? "pos and scale" : (pos[2] ? "pos" : "scale")));
getdrawfontscale(prog, &sx, &sy);
DrawQ_String_Scale(pos[0], pos[1], string, 0, scale[0], scale[1], sx, sy, rgb[0], rgb[1], rgb[2], PRVM_G_FLOAT(OFS_PARM4), flag, NULL, true, getdrawfont(prog));
}
if(pos[2] || scale[2])
- VM_Warning("VM_drawcolorcodedstring: z value%s from %s discarded\n",(pos[2] && scale[2]) ? "s" : " ",((pos[2] && scale[2]) ? "pos and scale" : (pos[2] ? "pos" : "scale")));
+ VM_Warning(prog, "VM_drawcolorcodedstring: z value%s from %s discarded\n",(pos[2] && scale[2]) ? "s" : " ",((pos[2] && scale[2]) ? "pos and scale" : (pos[2] ? "pos" : "scale")));
getdrawfontscale(prog, &sx, &sy);
DrawQ_String_Scale(pos[0], pos[1], string, 0, scale[0], scale[1], sx, sy, rgb[0], rgb[1], rgb[2], alpha, flag, NULL, false, getdrawfont(prog));
}
if(pos[2] || size[2])
- VM_Warning("VM_drawpic: z value%s from %s discarded\n",(pos[2] && size[2]) ? "s" : " ",((pos[2] && size[2]) ? "pos and size" : (pos[2] ? "pos" : "size")));
+ VM_Warning(prog, "VM_drawpic: z value%s from %s discarded\n",(pos[2] && size[2]) ? "s" : " ",((pos[2] && size[2]) ? "pos and size" : (pos[2] ? "pos" : "size")));
DrawQ_Pic(pos[0], pos[1], Draw_CachePic_Flags (picname, CACHEPICFLAG_NOTPERSISTENT), size[0], size[1], rgb[0], rgb[1], rgb[2], PRVM_G_FLOAT(OFS_PARM4), flag);
PRVM_G_FLOAT(OFS_RETURN) = 1;
}
if(pos[2] || size[2] || org[2])
- VM_Warning("VM_drawrotpic: z value from pos/size/org discarded\n");
+ VM_Warning(prog, "VM_drawrotpic: z value from pos/size/org discarded\n");
DrawQ_RotPic(pos[0], pos[1], Draw_CachePic_Flags(picname, CACHEPICFLAG_NOTPERSISTENT), size[0], size[1], org[0], org[1], PRVM_G_FLOAT(OFS_PARM4), rgb[0], rgb[1], rgb[2], PRVM_G_FLOAT(OFS_PARM6), flag);
PRVM_G_FLOAT(OFS_RETURN) = 1;
}
if(pos[2] || size[2])
- VM_Warning("VM_drawsubpic: z value%s from %s discarded\n",(pos[2] && size[2]) ? "s" : " ",((pos[2] && size[2]) ? "pos and size" : (pos[2] ? "pos" : "size")));
+ VM_Warning(prog, "VM_drawsubpic: z value%s from %s discarded\n",(pos[2] && size[2]) ? "s" : " ",((pos[2] && size[2]) ? "pos and size" : (pos[2] ? "pos" : "size")));
DrawQ_SuperPic(pos[0], pos[1], Draw_CachePic_Flags (picname, CACHEPICFLAG_NOTPERSISTENT),
size[0], size[1],
}
if(pos[2] || size[2])
- VM_Warning("VM_drawfill: z value%s from %s discarded\n",(pos[2] && size[2]) ? "s" : " ",((pos[2] && size[2]) ? "pos and size" : (pos[2] ? "pos" : "size")));
+ VM_Warning(prog, "VM_drawfill: z value%s from %s discarded\n",(pos[2] && size[2]) ? "s" : " ",((pos[2] && size[2]) ? "pos and size" : (pos[2] ? "pos" : "size")));
DrawQ_Fill(pos[0], pos[1], size[0], size[1], rgb[0], rgb[1], rgb[2], PRVM_G_FLOAT(OFS_PARM3), flag);
PRVM_G_FLOAT(OFS_RETURN) = 1;
VM_CheckEmptyString(prog, p);
pic = Draw_CachePic_Flags (p, CACHEPICFLAG_NOTPERSISTENT);
-
- PRVM_G_VECTOR(OFS_RETURN)[0] = pic->width;
- PRVM_G_VECTOR(OFS_RETURN)[1] = pic->height;
+ if( pic->tex == r_texture_notexture )
+ {
+ PRVM_G_VECTOR(OFS_RETURN)[0] = 0;
+ PRVM_G_VECTOR(OFS_RETURN)[1] = 0;
+ }
+ else
+ {
+ PRVM_G_VECTOR(OFS_RETURN)[0] = pic->width;
+ PRVM_G_VECTOR(OFS_RETURN)[1] = pic->height;
+ }
PRVM_G_VECTOR(OFS_RETURN)[2] = 0;
}
int i;
VM_SAFEPARMCOUNTRANGE(0, 2, VM_buf_create);
-
+
// VorteX: optional parm1 (buffer format) is unfinished, to keep intact with future databuffers extension must be set to "string"
if(prog->argc >= 1 && strcmp(PRVM_G_STRING(OFS_PARM0), "string"))
{
BufStr_Shrink(prog, stringbuffer);
}
+/*
+========================
+VM_buf_loadfile
+load a file into string buffer, return 0 or 1
+float buf_loadfile(string filename, float bufhandle) = #535;
+========================
+*/
+void VM_buf_loadfile(prvm_prog_t *prog)
+{
+ size_t alloclen;
+ prvm_stringbuffer_t *stringbuffer;
+ char string[VM_STRINGTEMP_LENGTH];
+ int filenum, strindex, c, end;
+ const char *filename;
+ char vabuf[1024];
+ VM_SAFEPARMCOUNT(2, VM_buf_loadfile);
+ // get file
+ filename = PRVM_G_STRING(OFS_PARM0);
+ for (filenum = 0;filenum < PRVM_MAX_OPENFILES;filenum++)
+ if (prog->openfiles[filenum] == NULL)
+ break;
+ prog->openfiles[filenum] = FS_OpenVirtualFile(va(vabuf, sizeof(vabuf), "data/%s", filename), false);
+ if (prog->openfiles[filenum] == NULL)
+ prog->openfiles[filenum] = FS_OpenVirtualFile(va(vabuf, sizeof(vabuf), "%s", filename), false);
+ if (prog->openfiles[filenum] == NULL)
+ {
+ if (developer_extra.integer)
+ VM_Warning(prog, "VM_buf_loadfile: failed to open file %s in %s\n", filename, prog->name);
+ PRVM_G_FLOAT(OFS_RETURN) = 0;
+ return;
+ }
+ // get string buffer
+ stringbuffer = (prvm_stringbuffer_t *)Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, (int)PRVM_G_FLOAT(OFS_PARM1));
+ if(!stringbuffer)
+ {
+ VM_Warning(prog, "VM_buf_loadfile: invalid buffer %i used in %s\n", (int)PRVM_G_FLOAT(OFS_PARM1), prog->name);
+ PRVM_G_FLOAT(OFS_RETURN) = 0;
+ return;
+ }
+ // read file (append to the end of buffer)
+ strindex = stringbuffer->num_strings;
+ while(1)
+ {
+ // read line
+ end = 0;
+ for (;;)
+ {
+ c = FS_Getc(prog->openfiles[filenum]);
+ if (c == '\r' || c == '\n' || c < 0)
+ break;
+ if (end < VM_STRINGTEMP_LENGTH - 1)
+ string[end++] = c;
+ }
+ string[end] = 0;
+ // remove \n following \r
+ if (c == '\r')
+ {
+ c = FS_Getc(prog->openfiles[filenum]);
+ if (c != '\n')
+ FS_UnGetc(prog->openfiles[filenum], (unsigned char)c);
+ }
+ // add and continue
+ if (c >= 0 || end)
+ {
+ BufStr_Expand(prog, stringbuffer, strindex);
+ stringbuffer->num_strings = max(stringbuffer->num_strings, strindex + 1);
+ alloclen = strlen(string) + 1;
+ stringbuffer->strings[strindex] = (char *)Mem_Alloc(prog->progs_mempool, alloclen);
+ memcpy(stringbuffer->strings[strindex], string, alloclen);
+ strindex = stringbuffer->num_strings;
+ }
+ else
+ break;
+ }
+
+ // close file
+ FS_Close(prog->openfiles[filenum]);
+ prog->openfiles[filenum] = NULL;
+ if (prog->openfiles_origin[filenum])
+ PRVM_Free((char *)prog->openfiles_origin[filenum]);
+ PRVM_G_FLOAT(OFS_RETURN) = 1;
+}
+/*
+========================
+VM_buf_writefile
+writes stringbuffer to a file, returns 0 or 1
+float buf_writefile(float filehandle, float bufhandle, [, float startpos, float numstrings]) = #468;
+========================
+*/
+
+void VM_buf_writefile(prvm_prog_t *prog)
+{
+ int filenum, strindex, strnum, strlength;
+ prvm_stringbuffer_t *stringbuffer;
+
+ VM_SAFEPARMCOUNTRANGE(2, 4, VM_buf_writefile);
+
+ // get file
+ filenum = (int)PRVM_G_FLOAT(OFS_PARM0);
+ if (filenum < 0 || filenum >= PRVM_MAX_OPENFILES)
+ {
+ VM_Warning(prog, "VM_buf_writefile: invalid file handle %i used in %s\n", filenum, prog->name);
+ return;
+ }
+ if (prog->openfiles[filenum] == NULL)
+ {
+ VM_Warning(prog, "VM_buf_writefile: no such file handle %i (or file has been closed) in %s\n", filenum, prog->name);
+ return;
+ }
+
+ // get string buffer
+ stringbuffer = (prvm_stringbuffer_t *)Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, (int)PRVM_G_FLOAT(OFS_PARM1));
+ if(!stringbuffer)
+ {
+ VM_Warning(prog, "VM_buf_writefile: invalid buffer %i used in %s\n", (int)PRVM_G_FLOAT(OFS_PARM1), prog->name);
+ PRVM_G_FLOAT(OFS_RETURN) = 0;
+ return;
+ }
+
+ // get start and end parms
+ if (prog->argc > 3)
+ {
+ strindex = (int)PRVM_G_FLOAT(OFS_PARM2);
+ strnum = (int)PRVM_G_FLOAT(OFS_PARM3);
+ }
+ else if (prog->argc > 2)
+ {
+ strindex = (int)PRVM_G_FLOAT(OFS_PARM2);
+ strnum = stringbuffer->num_strings - strindex;
+ }
+ else
+ {
+ strindex = 0;
+ strnum = stringbuffer->num_strings;
+ }
+ if (strindex < 0 || strindex >= stringbuffer->num_strings)
+ {
+ VM_Warning(prog, "VM_buf_writefile: wrong start string index %i used in %s\n", strindex, prog->name);
+ PRVM_G_FLOAT(OFS_RETURN) = 0;
+ return;
+ }
+ if (strnum < 0)
+ {
+ VM_Warning(prog, "VM_buf_writefile: wrong strings count %i used in %s\n", strnum, prog->name);
+ PRVM_G_FLOAT(OFS_RETURN) = 0;
+ return;
+ }
+
+ // write
+ while(strindex < stringbuffer->num_strings && strnum)
+ {
+ if (stringbuffer->strings[strindex])
+ {
+ if ((strlength = strlen(stringbuffer->strings[strindex])))
+ FS_Write(prog->openfiles[filenum], stringbuffer->strings[strindex], strlength);
+ FS_Write(prog->openfiles[filenum], "\n", 1);
+ }
+ strindex++;
+ strnum--;
+ }
+
+ PRVM_G_FLOAT(OFS_RETURN) = 1;
+}
+
+#define MATCH_AUTO 0
+#define MATCH_WHOLE 1
+#define MATCH_LEFT 2
+#define MATCH_RIGHT 3
+#define MATCH_MIDDLE 4
+#define MATCH_PATTERN 5
+
+static const char *detect_match_rule(char *pattern, int *matchrule)
+{
+ char *ppos, *qpos;
+ int patternlength;
+
+ patternlength = strlen(pattern);
+ ppos = strchr(pattern, '*');
+ qpos = strchr(pattern, '?');
+ // has ? - pattern
+ if (qpos)
+ {
+ *matchrule = MATCH_PATTERN;
+ return pattern;
+ }
+ // has * - left, mid, right or pattern
+ if (ppos)
+ {
+ // starts with * - may be right/mid or pattern
+ if ((ppos - pattern) == 0)
+ {
+ ppos = strchr(pattern+1, '*');
+ // *something
+ if (!ppos)
+ {
+ *matchrule = MATCH_RIGHT;
+ return pattern+1;
+ }
+ // *something*
+ if ((ppos - pattern) == patternlength)
+ {
+ *matchrule = MATCH_MIDDLE;
+ *ppos = 0;
+ return pattern+1;
+ }
+ // *som*thing
+ *matchrule = MATCH_PATTERN;
+ return pattern;
+ }
+ // end with * - left
+ if ((ppos - pattern) == patternlength)
+ {
+ *matchrule = MATCH_LEFT;
+ *ppos = 0;
+ return pattern;
+ }
+ // som*thing
+ *matchrule = MATCH_PATTERN;
+ return pattern;
+ }
+ // have no wildcards - whole string
+ *matchrule = MATCH_WHOLE;
+ return pattern;
+}
+
+// todo: support UTF8
+static qboolean match_rule(const char *string, int max_string, const char *pattern, int patternlength, int rule)
+{
+ const char *mid;
+
+ if (rule == 1)
+ return !strncmp(string, pattern, max_string) ? true : false;
+ if (rule == 2)
+ return !strncmp(string, pattern, patternlength) ? true : false;
+ if (rule == 3)
+ {
+ mid = strstr(string, pattern);
+ return mid && !*(mid+patternlength);
+ }
+ if (rule == 4)
+ return strstr(string, pattern) ? true : false;
+ // pattern
+ return matchpattern_with_separator(string, pattern, false, "", false) ? true : false;
+}
+
+/*
+========================
+VM_bufstr_find
+find an index of bufstring matching rule
+float bufstr_find(float bufhandle, string match, float matchrule, float startpos, float step) = #468;
+========================
+*/
+
+void VM_bufstr_find(prvm_prog_t *prog)
+{
+ prvm_stringbuffer_t *stringbuffer;
+ char string[VM_STRINGTEMP_LENGTH];
+ int matchrule, matchlen, i, step;
+ const char *match;
+
+ VM_SAFEPARMCOUNTRANGE(3, 5, VM_bufstr_find);
+
+ PRVM_G_FLOAT(OFS_RETURN) = -1;
+
+ // get string buffer
+ stringbuffer = (prvm_stringbuffer_t *)Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, (int)PRVM_G_FLOAT(OFS_PARM0));
+ if(!stringbuffer)
+ {
+ VM_Warning(prog, "VM_bufstr_find: invalid buffer %i used in %s\n", (int)PRVM_G_FLOAT(OFS_PARM0), prog->name);
+ return;
+ }
+
+ // get pattern/rule
+ matchrule = (int)PRVM_G_FLOAT(OFS_PARM2);
+ if (matchrule < 0 && matchrule > 5)
+ {
+ VM_Warning(prog, "VM_bufstr_find: invalid match rule %i in %s\n", matchrule, prog->name);
+ return;
+ }
+ if (matchrule)
+ match = PRVM_G_STRING(OFS_PARM1);
+ else
+ {
+ strlcpy(string, PRVM_G_STRING(OFS_PARM1), sizeof(string));
+ match = detect_match_rule(string, &matchrule);
+ }
+ matchlen = strlen(match);
+
+ // find
+ i = (prog->argc > 3) ? (int)PRVM_G_FLOAT(OFS_PARM3) : 0;
+ step = (prog->argc > 4) ? (int)PRVM_G_FLOAT(OFS_PARM4) : 1;
+ while(i < stringbuffer->num_strings)
+ {
+ if (stringbuffer->strings[i] && match_rule(stringbuffer->strings[i], VM_STRINGTEMP_LENGTH, match, matchlen, matchrule))
+ {
+ PRVM_G_FLOAT(OFS_RETURN) = i;
+ break;
+ }
+ i += step;
+ }
+}
+
+/*
+========================
+VM_matchpattern
+float matchpattern(string s, string pattern, float matchrule, float startpos) = #468;
+========================
+*/
+void VM_matchpattern(prvm_prog_t *prog)
+{
+ const char *s, *match;
+ char string[VM_STRINGTEMP_LENGTH];
+ int matchrule, l;
+
+ VM_SAFEPARMCOUNTRANGE(2, 4, VM_matchpattern);
+
+ s = PRVM_G_STRING(OFS_PARM0);
+
+ // get pattern/rule
+ matchrule = (int)PRVM_G_FLOAT(OFS_PARM2);
+ if (matchrule < 0 && matchrule > 5)
+ {
+ VM_Warning(prog, "VM_bufstr_find: invalid match rule %i in %s\n", matchrule, prog->name);
+ return;
+ }
+ if (matchrule)
+ match = PRVM_G_STRING(OFS_PARM1);
+ else
+ {
+ strlcpy(string, PRVM_G_STRING(OFS_PARM1), sizeof(string));
+ match = detect_match_rule(string, &matchrule);
+ }
+
+ // offset
+ l = strlen(match);
+ if (prog->argc > 3)
+ s += max(0, min((unsigned int)PRVM_G_FLOAT(OFS_PARM3), strlen(s)-1));
+
+ // match
+ PRVM_G_FLOAT(OFS_RETURN) = match_rule(s, VM_STRINGTEMP_LENGTH, match, l, matchrule);
+}
+
+/*
+========================
+VM_buf_cvarlist
+========================
+*/
void VM_buf_cvarlist(prvm_prog_t *prog)
{
out2:
handle->postdata = NULL;
handle->postlen = 0;
- ret = Curl_Begin_ToMemory(url, 0, (unsigned char *) handle->buffer, sizeof(handle->buffer), uri_to_string_callback, handle);
+ ret = Curl_Begin_ToMemory_POST(url, handle->sigdata, 0, NULL, NULL, 0, (unsigned char *) handle->buffer, sizeof(handle->buffer), uri_to_string_callback, handle);
}
if(ret)
{
{
if(precision < 0) // not set
precision = end - o - 1;
- o += u8_strpad(o, end - o, GETARG_STRING(thisarg), (flags & PRINTF_LEFT) != 0, width, precision);
+ if(flags & PRINTF_SIGNPOSITIVE)
+ o += u8_strpad(o, end - o, GETARG_STRING(thisarg), (flags & PRINTF_LEFT) != 0, width, precision);
+ else
+ o += u8_strpad_colorcodes(o, end - o, GETARG_STRING(thisarg), (flags & PRINTF_LEFT) != 0, width, precision);
}
break;
default:
memset(&animatemodel_cache, 0, sizeof(animatemodel_cache));
need |= (animatemodel_cache.model != model);
VM_GenerateFrameGroupBlend(prog, ed->priv.server->framegroupblend, ed);
- VM_FrameBlendFromFrameGroupBlend(ed->priv.server->frameblend, ed->priv.server->framegroupblend, model);
+ VM_FrameBlendFromFrameGroupBlend(ed->priv.server->frameblend, ed->priv.server->framegroupblend, model, PRVM_serverglobalfloat(time));
need |= (memcmp(&animatemodel_cache.frameblend, &ed->priv.server->frameblend, sizeof(ed->priv.server->frameblend))) != 0;
skeletonindex = (int)PRVM_gameedictfloat(ed, skeletonindex) - 1;
if (!(skeletonindex >= 0 && skeletonindex < MAX_EDICTS && (skeleton = prog->skeletons[skeletonindex]) && skeleton->model->num_bones == ed->priv.server->skeleton.model->num_bones))
VM_Warning(prog, "VM_physics_addforce: entity is not MOVETYPE_PHYSICS!\n");
return;
}
- f.type = ODEFUNC_RELFORCEATPOS;
+ f.type = ODEFUNC_FORCE;
VectorCopy(PRVM_G_VECTOR(OFS_PARM1), f.v1);
- VectorSubtract(PRVM_serveredictvector(ed, origin), PRVM_G_VECTOR(OFS_PARM2), f.v2);
+ VectorCopy(PRVM_G_VECTOR(OFS_PARM2), f.v2);
VM_physics_ApplyCmd(ed, &f);
}
VM_Warning(prog, "VM_physics_addtorque: entity is not MOVETYPE_PHYSICS!\n");
return;
}
- f.type = ODEFUNC_RELTORQUE;
+ f.type = ODEFUNC_TORQUE;
VectorCopy(PRVM_G_VECTOR(OFS_PARM1), f.v1);
VM_physics_ApplyCmd(ed, &f);
}