NULL, // #539
VM_physics_enable, // #540 void(entity e, float physics_enabled) physics_enable = #540; (DP_PHYSICS_ODE)
VM_physics_addforce, // #541 void(entity e, vector force, vector relative_ofs) physics_addforce = #541; (DP_PHYSICS_ODE)
-VM_physics_addtorgue, // #542 void(entity e, vector torgue) physics_addtorgue = #542; (DP_PHYSICS_ODE)
+VM_physics_addtorque, // #542 void(entity e, vector torque) physics_addtorque = #542; (DP_PHYSICS_ODE)
NULL, // #543
NULL, // #544
NULL, // #545
//builtin definitions:
void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply a force from certain origin, length of force vector is power of force
-void(entity e, vector torgue) physics_addtorgue = #542; // add relative torgue
+void(entity e, vector torque) physics_addtorque = #542; // add relative torque
//description: provides Open Dynamics Engine support, requires extenal dll to be present or engine compiled with statical link option
//be sure to checkextension for it to know if library i loaded and ready, also to enable physics set "physice_ode" cvar to 1
//note: this extension is highly experimental and may be unstable
#define ODEFUNC_ENABLE 1
#define ODEFUNC_DISABLE 2
#define ODEFUNC_RELFORCEATPOS 3
-#define ODEFUNC_RELTORGUE 4
+#define ODEFUNC_RELTORQUE 4
typedef struct edict_odefunc_s
{
VM_physics_ApplyCmd(ed, &f);
}
-// void(entity e, vector torgue) physics_addtorgue = #;
-void VM_physics_addtorgue(void)
+// void(entity e, vector torque) physics_addtorque = #;
+void VM_physics_addtorque(void)
{
prvm_edict_t *ed;
edict_odefunc_t f;
- VM_SAFEPARMCOUNT(2, VM_physics_addtorgue);
+ VM_SAFEPARMCOUNT(2, VM_physics_addtorque);
ed = PRVM_G_EDICT(OFS_PARM0);
if (!ed)
{
if (developer.integer > 0)
- VM_Warning("VM_physics_addtorgue: null entity!\n");
+ VM_Warning("VM_physics_addtorque: null entity!\n");
return;
}
// entity should have MOVETYPE_PHYSICS already set, this can damage memory (making leaked allocation) so warn about this even if non-developer
if (ed->fields.server->movetype != MOVETYPE_PHYSICS)
{
- VM_Warning("VM_physics_addtorgue: entity is not MOVETYPE_PHYSICS!\n");
+ VM_Warning("VM_physics_addtorque: entity is not MOVETYPE_PHYSICS!\n");
return;
}
- f.type = ODEFUNC_RELTORGUE;
+ f.type = ODEFUNC_RELTORQUE;
VectorCopy(PRVM_G_VECTOR(OFS_PARM1), f.v1);
VM_physics_ApplyCmd(ed, &f);
}
// physics builtins
void VM_physics_enable(void);
void VM_physics_addforce(void);
-void VM_physics_addtorgue(void);
+void VM_physics_addtorque(void);
NULL, // #539
VM_physics_enable, // #540 void(entity e, float physics_enabled) physics_enable = #540; (DP_PHYSICS_ODE)
VM_physics_addforce, // #541 void(entity e, vector force, vector relative_ofs) physics_addforce = #541; (DP_PHYSICS_ODE)
-VM_physics_addtorgue, // #542 void(entity e, vector torgue) physics_addtorgue = #542; (DP_PHYSICS_ODE)
+VM_physics_addtorque, // #542 void(entity e, vector torque) physics_addtorque = #542; (DP_PHYSICS_ODE)
NULL, // #543
NULL, // #544
NULL, // #545
dBodyEnable(body);
dBodyAddForceAtRelPos(body, f->v1[0], f->v1[1], f->v1[2], f->v2[0], f->v2[1], f->v2[2]);
break;
- case ODEFUNC_RELTORGUE:
+ case ODEFUNC_RELTORQUE:
dBodyEnable(body);
dBodyAddRelTorque(body, f->v1[0], f->v1[1], f->v1[2]);
break;