X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=prvm_cmds.c;h=98f819c8bd9ae01296834dee20389ee164f0f1c4;hb=6ad90d1388ee03427548282e23fcd5bdba03b83a;hp=332fe75bee6929f8688c805219521997ece8f9c9;hpb=cad099a6ef73f318b6c5655072e46141e3524636;p=xonotic%2Fdarkplaces.git diff --git a/prvm_cmds.c b/prvm_cmds.c index 332fe75b..98f819c8 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -99,7 +99,10 @@ void VM_FrameBlendFromFrameGroupBlend(frameblend_t *frameblend, const framegroup memset(blend, 0, MAX_FRAMEBLENDS * sizeof(*blend)); - if (!model || !model->surfmesh.isanimated) + // rpolzer: Not testing isanimated here - a model might have + // "animations" that move no vertices (but only bones), thus rendering + // may assume it's not animated while processing can't. + if (!model) { blend[0].lerp = 1; return; @@ -4426,9 +4429,8 @@ string altstr_prepare(string) void VM_altstr_prepare(prvm_prog_t *prog) { const char *instr, *in; - int size; char outstr[VM_STRINGTEMP_LENGTH]; - int outpos; + size_t outpos; VM_SAFEPARMCOUNT( 1, VM_altstr_prepare ); @@ -4438,13 +4440,13 @@ void VM_altstr_prepare(prvm_prog_t *prog) { if (*in == '\'' && outpos < sizeof(outstr) - 2) { - out[outpos++] = '\\'; - out[outpos++] = '\''; + outstr[outpos++] = '\\'; + outstr[outpos++] = '\''; } else - out[outpos++] = *in; + outstr[outpos++] = *in; } - out[outpos++] = 0; + outstr[outpos] = 0; PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString(prog, outstr ); } @@ -4640,7 +4642,7 @@ static int BufStr_SortStringsDOWN (const void *in1, const void *in2) return strncmp(b, a, stringbuffers_sortlength); } -prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, char *format) +prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, const char *format) { prvm_stringbuffer_t *stringbuffer; int i;