From: vortex Date: Thu, 16 Dec 2010 18:14:21 +0000 (+0000) Subject: torgue->torque X-Git-Tag: xonotic-v0.5.0~438^2~173 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c9d7b2b83f07c1db3741130c6c7965eeffe34a91;p=xonotic%2Fdarkplaces.git torgue->torque git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10668 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/clvm_cmds.c b/clvm_cmds.c index a30ce3c0..9c1247ce 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -4546,7 +4546,7 @@ NULL, // #538 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 diff --git a/dpdefs/dpextensions.qc b/dpdefs/dpextensions.qc index 06361ae6..af459ee4 100644 --- a/dpdefs/dpextensions.qc +++ b/dpdefs/dpextensions.qc @@ -1598,7 +1598,7 @@ const float JOINTTYPE_FIXED = -1; //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 diff --git a/progs.h b/progs.h index b7208e5f..30219148 100644 --- a/progs.h +++ b/progs.h @@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #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 { diff --git a/prvm_cmds.c b/prvm_cmds.c index 5755ef7c..f2c0e54d 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -6952,27 +6952,27 @@ void VM_physics_addforce(void) 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); } diff --git a/prvm_cmds.h b/prvm_cmds.h index 6ca09b19..e8ed3cbc 100644 --- a/prvm_cmds.h +++ b/prvm_cmds.h @@ -477,4 +477,4 @@ void VM_getsurfacetriangle(void); // physics builtins void VM_physics_enable(void); void VM_physics_addforce(void); -void VM_physics_addtorgue(void); +void VM_physics_addtorque(void); diff --git a/svvm_cmds.c b/svvm_cmds.c index d9bc0aed..fc35514d 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -3682,7 +3682,7 @@ NULL, // #538 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 diff --git a/world.c b/world.c index 90281957..b5b1def2 100644 --- a/world.c +++ b/world.c @@ -1725,7 +1725,7 @@ void World_Physics_ApplyCmd(prvm_edict_t *ed, edict_odefunc_t *f) 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;