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;
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( Draw_CachePic_Flags(s, 0)->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;
}
{
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:
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);
}