diff --git a/include/QF/mathlib.h b/include/QF/mathlib.h index 6cdb90ed7..d9ad65ad1 100644 --- a/include/QF/mathlib.h +++ b/include/QF/mathlib.h @@ -48,7 +48,8 @@ extern const vec3_t vec3_origin; #define VectorSubtract(a,b,c) {(c)[0]=(a)[0]-(b)[0];(c)[1]=(a)[1]-(b)[1];(c)[2]=(a)[2]-(b)[2];} #define VectorAdd(a,b,c) {(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];} #define VectorCopy(a,b) {(b)[0]=(a)[0];(b)[1]=(a)[1];(b)[2]=(a)[2];} -#define VectorMA(a,s,b,c) {(c)[0]=(a)[0]+(s)*(b)[0];(c)[1]=(a)[1]+(s)*(b)[1];(c)[2]=(a)[2]+(s)*(b)[2];} +#define VectorMultAdd(a,s,b,c) {(c)[0]=(a)[0]+(s)*(b)[0];(c)[1]=(a)[1]+(s)*(b)[1];(c)[2]=(a)[2]+(s)*(b)[2];} +#define VectorMultSub(a,s,b,c) {(c)[0]=(a)[0]-(s)*(b)[0];(c)[1]=(a)[1]-(s)*(b)[1];(c)[2]=(a)[2]-(s)*(b)[2];} #define VectorLength(a) sqrt(DotProduct(a, a)) #define VectorScale(a,b,c) {(c)[0]=(a)[0]*(b);(c)[1]=(a)[1]*(b);(c)[2]=(a)[2]*(b);} diff --git a/libs/models/alias/gl_mesh.c b/libs/models/alias/gl_mesh.c index cbc26078e..b38ab6462 100644 --- a/libs/models/alias/gl_mesh.c +++ b/libs/models/alias/gl_mesh.c @@ -515,10 +515,11 @@ Mod_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m, int _s, i * sizeof (trivertx16_t)); paliashdr->posedata = (byte *) verts - (byte *) paliashdr; for (i = 0; i < paliashdr->numposes; i++) { + trivertx_t *pv = poseverts[i]; for (j = 0; j < numorder; j++) { trivertx16_t v; - VectorMA (poseverts[i][vertexorder[j] + hdr->mdl.numverts].v, - 256, poseverts[i][vertexorder[j]].v, v.v); + VectorMultSub (pv[vertexorder[j] + hdr->mdl.numverts].v, + 256, pv[vertexorder[j]].v, v.v); v.lightnormalindex = poseverts[i][vertexorder[j]].lightnormalindex; *verts++ = v; diff --git a/libs/util/mathlib.c b/libs/util/mathlib.c index 230a8d184..0b5ffdfe0 100644 --- a/libs/util/mathlib.c +++ b/libs/util/mathlib.c @@ -106,8 +106,8 @@ VectorVectors(const vec3_t forward, vec3_t right, vec3_t up) right[1] = -forward[0]; right[2] = forward[1]; - d = -DotProduct(forward, right); - VectorMA (right, d, forward, right); + d = DotProduct(forward, right); + VectorMultSub (right, d, forward, right); VectorNormalize (right); CrossProduct(right, forward, up); } diff --git a/libs/video/renderer/gl/gl_dyn_part.c b/libs/video/renderer/gl/gl_dyn_part.c index 4e8cd829a..eb129efcb 100644 --- a/libs/video/renderer/gl/gl_dyn_part.c +++ b/libs/video/renderer/gl/gl_dyn_part.c @@ -508,7 +508,7 @@ R_RocketTrail_QF (entity_t *ent) if (numparticles >= r_maxparticles) break; len += dist; - VectorMA (ent->old_origin, len, vec, ent->old_origin); + VectorMultAdd (ent->old_origin, len, vec, ent->old_origin); pscale = pscalenext; } } @@ -541,7 +541,7 @@ R_GrenadeTrail_QF (entity_t *ent) if (numparticles >= r_maxparticles) break; len += dist; - VectorMA (ent->old_origin, len, vec, ent->old_origin); + VectorMultAdd (ent->old_origin, len, vec, ent->old_origin); pscale = pscalenext; } } @@ -580,7 +580,7 @@ R_BloodTrail_QF (entity_t *ent) if (numparticles >= r_maxparticles) break; len += dist; - VectorMA (ent->old_origin, len, vec, ent->old_origin); + VectorMultAdd (ent->old_origin, len, vec, ent->old_origin); pscale = pscalenext; } } @@ -619,7 +619,7 @@ R_SlightBloodTrail_QF (entity_t *ent) if (numparticles >= r_maxparticles) break; len += dist; - VectorMA (ent->old_origin, len, vec, ent->old_origin); + VectorMultAdd (ent->old_origin, len, vec, ent->old_origin); pscale = pscalenext; } } @@ -1417,7 +1417,7 @@ R_DrawParticles (void) } } - VectorMA (part->org, r_frametime, part->vel, part->org); + VectorMultAdd (part->org, r_frametime, part->vel, part->org); switch (part->type) { case pt_static: @@ -1442,7 +1442,7 @@ R_DrawParticles (void) break; } part->color = ramp1[(int) part->ramp]; - VectorMA (part->vel, time4, part->vel, part->vel); + VectorMultAdd (part->vel, time4, part->vel, part->vel); part->vel[2] -= grav; break; case pt_explode2: @@ -1452,11 +1452,11 @@ R_DrawParticles (void) break; } part->color = ramp2[(int) part->ramp]; - VectorMA (part->vel, -r_frametime, part->vel, part->vel); + VectorMultSub (part->vel, r_frametime, part->vel, part->vel); part->vel[2] -= grav; break; case pt_blob: - VectorMA (part->vel, time4, part->vel, part->vel); + VectorMultAdd (part->vel, time4, part->vel, part->vel); part->vel[2] -= grav; break; case pt_blob2: diff --git a/libs/video/renderer/gl/gl_lightmap.c b/libs/video/renderer/gl/gl_lightmap.c index 886f1029b..65e8cf10d 100644 --- a/libs/video/renderer/gl/gl_lightmap.c +++ b/libs/video/renderer/gl/gl_lightmap.c @@ -126,7 +126,8 @@ R_AddDynamicLights_1 (msurface_t *surf) VectorSubtract (r_dlights[lnum].origin, currententity->origin, local); dist = DotProduct (local, surf->plane->normal) - surf->plane->dist; - VectorMA (r_dlights[lnum].origin, -dist, surf->plane->normal, impact); + VectorMultSub (r_dlights[lnum].origin, dist, surf->plane->normal, + impact); i = DotProduct (impact, surf->texinfo->vecs[0]) + surf->texinfo->vecs[0][3] - surf->texturemins[0]; @@ -190,7 +191,8 @@ R_AddDynamicLights_3 (msurface_t *surf) VectorSubtract (r_dlights[lnum].origin, currententity->origin, local); dist = DotProduct (local, surf->plane->normal) - surf->plane->dist; - VectorMA (r_dlights[lnum].origin, -dist, surf->plane->normal, impact); + VectorMultSub (r_dlights[lnum].origin, dist, surf->plane->normal, + impact); i = DotProduct (impact, surf->texinfo->vecs[0]) + surf->texinfo->vecs[0][3] - surf->texturemins[0]; diff --git a/libs/video/renderer/gl/gl_mod_alias.c b/libs/video/renderer/gl/gl_mod_alias.c index cac8bc289..c67e8d5c7 100644 --- a/libs/video/renderer/gl/gl_mod_alias.c +++ b/libs/video/renderer/gl/gl_mod_alias.c @@ -106,7 +106,7 @@ GL_DrawAliasFrameTri (vert_order_t *vo) qfglBegin (GL_TRIANGLES); do { qfglTexCoord2fv (tex_coord->st); - VectorMA (ambientcolor, verts->lightdot, shadecolor, color); + VectorMultAdd (ambientcolor, verts->lightdot, shadecolor, color); qfglColor4fv (color); qfglVertex3fv (verts->vert); @@ -159,7 +159,7 @@ GL_DrawAliasFrameTriMulti (vert_order_t *vo) tex_coord++; // normals and vertexes come from the frame list - VectorMA (ambientcolor, verts->lightdot, shadecolor, color); + VectorMultAdd (ambientcolor, verts->lightdot, shadecolor, color); qfglColor4fv (color); qfglVertex3fv (verts->vert); @@ -196,7 +196,7 @@ GL_DrawAliasFrame (vert_order_t *vo) order += 2; // normals and vertexes come from the frame list - VectorMA (ambientcolor, verts->lightdot, shadecolor, color); + VectorMultAdd (ambientcolor, verts->lightdot, shadecolor, color); qfglColor4fv (color); @@ -272,7 +272,7 @@ GL_DrawAliasFrameMulti (vert_order_t *vo) order += 2; // normals and vertexes come from the frame list - VectorMA (ambientcolor, verts->lightdot, shadecolor, color); + VectorMultAdd (ambientcolor, verts->lightdot, shadecolor, color); qfglColor4fv (color); @@ -637,8 +637,8 @@ R_DrawAliasModel (entity_t *e) d; if (add > 0.0) - VectorMA (ambientcolor, add, r_dlights[lnum].color, - ambientcolor); + VectorMultAdd (ambientcolor, add, r_dlights[lnum].color, + ambientcolor); } } diff --git a/libs/video/renderer/gl/gl_mod_sprite.c b/libs/video/renderer/gl/gl_mod_sprite.c index df41da030..207af5e31 100644 --- a/libs/video/renderer/gl/gl_mod_sprite.c +++ b/libs/video/renderer/gl/gl_mod_sprite.c @@ -147,21 +147,21 @@ R_DrawSpriteModel_f (entity_t *e) qfglColor4fv (color); qfglTexCoord2f (0, 1); - VectorMA (e->origin, frame->down, up, point1); - VectorMA (point1, frame->left, right, point); + VectorMultAdd (e->origin, frame->down, up, point1); + VectorMultAdd (point1, frame->left, right, point); qfglVertex3fv (point); qfglTexCoord2f (0, 0); - VectorMA (e->origin, frame->up, up, point2); - VectorMA (point2, frame->left, right, point); + VectorMultAdd (e->origin, frame->up, up, point2); + VectorMultAdd (point2, frame->left, right, point); qfglVertex3fv (point); qfglTexCoord2f (1, 0); - VectorMA (point2, frame->right, right, point); + VectorMultAdd (point2, frame->right, right, point); qfglVertex3fv (point); qfglTexCoord2f (1, 1); - VectorMA (point1, frame->right, right, point); + VectorMultAdd (point1, frame->right, right, point); qfglVertex3fv (point); qfglEnd (); @@ -217,18 +217,18 @@ R_DrawSpriteModel_VA_f (entity_t *e) if (modelalpha < 255) qfglDepthMask (GL_FALSE); - VectorMA (e->origin, frame->down, up, point1); - VectorMA (point1, frame->left, right, VA[0].vertex); + VectorMultAdd (e->origin, frame->down, up, point1); + VectorMultAdd (point1, frame->left, right, VA[0].vertex); memcpy (VA[1].color, color, 4); - VectorMA (e->origin, frame->up, up, point2); - VectorMA (point2, frame->left, right, VA[1].vertex); + VectorMultAdd (e->origin, frame->up, up, point2); + VectorMultAdd (point2, frame->left, right, VA[1].vertex); memcpy (VA[2].color, color, 4); - VectorMA (point2, frame->right, right, VA[2].vertex); + VectorMultAdd (point2, frame->right, right, VA[2].vertex); memcpy (VA[3].color, color, 4); - VectorMA (point1, frame->right, right, VA[3].vertex); + VectorMultAdd (point1, frame->right, right, VA[3].vertex); // VA += 4; // vacount += 4; diff --git a/libs/video/renderer/gl/gl_rmain.c b/libs/video/renderer/gl/gl_rmain.c index 59378a075..7eeb933c9 100644 --- a/libs/video/renderer/gl/gl_rmain.c +++ b/libs/video/renderer/gl/gl_rmain.c @@ -509,13 +509,13 @@ R_Mirror (void) memcpy (r_base_world_matrix, r_world_matrix, sizeof (r_base_world_matrix)); - d = DotProduct (r_refdef.vieworg, mirror_plane->normal) - + d = 2 * DotProduct (r_refdef.vieworg, mirror_plane->normal) - mirror_plane->dist; - VectorMA (r_refdef.vieworg, -2 * d, mirror_plane->normal, - r_refdef.vieworg); + VectorMultSub (r_refdef.vieworg, d, mirror_plane->normal, + r_refdef.vieworg); - d = DotProduct (vpn, mirror_plane->normal); - VectorMA (vpn, -2 * d, mirror_plane->normal, vpn); + d = 2 * DotProduct (vpn, mirror_plane->normal); + VectorMultSub (vpn, d, mirror_plane->normal, vpn); r_refdef.viewangles[0] = -asin (vpn[2]) / M_PI * 180; r_refdef.viewangles[1] = atan2 (vpn[1], vpn[0]) / M_PI * 180; diff --git a/libs/video/renderer/r_light.c b/libs/video/renderer/r_light.c index c1e831520..d288f098a 100644 --- a/libs/video/renderer/r_light.c +++ b/libs/video/renderer/r_light.c @@ -194,8 +194,7 @@ real_mark_surfaces (float dist, msurface_t *surf, const vec3_t lightorigin, vec3_t impact; dist2 = dist * dist; - dist = -dist; - VectorMA (light->origin, dist, surf->plane->normal, impact); + VectorMultSub (light->origin, dist, surf->plane->normal, impact); d = DotProduct (impact, surf->texinfo->vecs[0]) + surf->texinfo->vecs[0][3] - surf->texturemins[0]; @@ -383,7 +382,7 @@ calc_lighting_3 (msurface_t *surf, int ds, int dt) for (maps = 0; maps < MAXLIGHTMAPS && surf->styles[maps] != 255; maps++) { scale = d_lightstylevalue[surf->styles[maps]] / 256.0; - VectorMA (ambientcolor, scale, lightmap, ambientcolor); + VectorMultAdd (ambientcolor, scale, lightmap, ambientcolor); lightmap += se_size; } } diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index a34fe0cd2..0f4f1328f 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -547,7 +547,7 @@ CL_RelinkEntities (void) VectorCopy (state->msg_angles[0], ent->angles); ent->pose1 = ent->pose2 = -1; } else { - VectorMA (state->msg_origins[1], f, delta, ent->origin); + VectorMultAdd (state->msg_origins[1], f, delta, ent->origin); // interpolate the origin and angles for (j = 0; j < 3; j++) { d = state->msg_angles[0][j] - state->msg_angles[1][j]; @@ -573,7 +573,7 @@ CL_RelinkEntities (void) if (dl) { AngleVectors (ent->angles, fv, rv, uv); - VectorMA (ent->origin, 18, fv, dl->origin); + VectorMultAdd (ent->origin, 18, fv, dl->origin); dl->origin[2] += 16; dl->radius = 200 + (rand () & 31); dl->die = cl.time + 0.1; diff --git a/nq/source/cl_tent.c b/nq/source/cl_tent.c index 2df110080..e500c6ca5 100644 --- a/nq/source/cl_tent.c +++ b/nq/source/cl_tent.c @@ -229,7 +229,7 @@ beam_setup (beam_t *b) d = 0; while (ent_count--) { ent = &b->ent_list[ent_count]; - VectorMA (org, d, dist, ent->origin); + VectorMultAdd (org, d, dist, ent->origin); d += 1.0; ent->model = b->model; ent->angles[0] = pitch; @@ -494,7 +494,7 @@ CL_UpdateBeams (void) (*ent)->angles[1] = yaw; (*ent)->angles[2] = rand () % 360; - VectorMA(org, 30, dist, org); + VectorMultAdd(org, 30, dist, org); d -= 30; } } diff --git a/nq/source/sv_cl_phys.c b/nq/source/sv_cl_phys.c index 1b5ccc860..05e1a118c 100644 --- a/nq/source/sv_cl_phys.c +++ b/nq/source/sv_cl_phys.c @@ -356,8 +356,8 @@ SV_Physics_Client (edict_t *ent, int num) case MOVETYPE_NOCLIP: if (!SV_RunThink (ent)) return; - VectorMA (SVvector (ent, origin), sv_frametime, SVvector (ent, velocity), - SVvector (ent, origin)); + VectorMultAdd (SVvector (ent, origin), sv_frametime, + SVvector (ent, velocity), SVvector (ent, origin)); break; default: diff --git a/nq/source/sv_phys.c b/nq/source/sv_phys.c index 159628d2b..b5e61abd9 100644 --- a/nq/source/sv_phys.c +++ b/nq/source/sv_phys.c @@ -252,8 +252,8 @@ SV_FlyMove (edict_t *ent, float time, trace_t *steptrace) if (VectorIsZero (SVvector (ent, velocity))) break; - VectorMA (SVvector (ent, origin), time_left, SVvector (ent, velocity), - end); + VectorMultAdd (SVvector (ent, origin), time_left, + SVvector (ent, velocity), end); trace = SV_Move (SVvector (ent, origin), SVvector (ent, mins), SVvector (ent, maxs), end, false, ent); @@ -561,10 +561,10 @@ SV_Physics_Noclip (edict_t *ent) if (!SV_RunThink (ent)) return; - VectorMA (SVvector (ent, angles), sv_frametime, - SVvector (ent, avelocity), SVvector (ent, angles)); - VectorMA (SVvector (ent, origin), sv_frametime, SVvector (ent, velocity), - SVvector (ent, origin)); + VectorMultAdd (SVvector (ent, angles), sv_frametime, + SVvector (ent, avelocity), SVvector (ent, angles)); + VectorMultAdd (SVvector (ent, origin), sv_frametime, + SVvector (ent, velocity), SVvector (ent, origin)); SV_LinkEdict (ent, false); } @@ -629,8 +629,8 @@ SV_Physics_Toss (edict_t *ent) SV_AddGravity (ent); // move angles - VectorMA (SVvector (ent, angles), sv_frametime, - SVvector (ent, avelocity), SVvector (ent, angles)); + VectorMultAdd (SVvector (ent, angles), sv_frametime, + SVvector (ent, avelocity), SVvector (ent, angles)); // move origin VectorScale (SVvector (ent, velocity), sv_frametime, move); diff --git a/nq/source/sv_pr_cmds.c b/nq/source/sv_pr_cmds.c index e48c10435..df5505acd 100644 --- a/nq/source/sv_pr_cmds.c +++ b/nq/source/sv_pr_cmds.c @@ -887,7 +887,7 @@ PF_aim (progs_t *pr) // try sending a trace straight VectorCopy (*sv_globals.v_forward, dir); - VectorMA (start, 2048, dir, end); + VectorMultAdd (start, 2048, dir, end); tr = SV_Move (start, vec3_origin, vec3_origin, end, false, ent); if (tr.ent && SVfloat (tr.ent, takedamage) == DAMAGE_AIM && (!teamplay->int_val || SVfloat (ent, team) <= 0 diff --git a/qw/source/cl_cam.c b/qw/source/cl_cam.c index e977aa88a..807664d93 100644 --- a/qw/source/cl_cam.c +++ b/qw/source/cl_cam.c @@ -229,7 +229,7 @@ Cam_TryFlyby (player_state_t * self, player_state_t * player, vec3_t vec, vectoangles (vec, v); VectorCopy (v, pmove.angles); VectorNormalize (vec); - VectorMA (player->origin, 800, vec, v); + VectorMultAdd (player->origin, 800, vec, v); // v is endpos // fake a player move trace = Cam_DoTrace (player->origin, v); diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index 8be07b7fc..28d54c6c0 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -1168,7 +1168,7 @@ CL_MuzzleFlash (void) else AngleVectors (pl->viewangles, fv, rv, uv); - VectorMA (pl->origin, 18, fv, dl->origin); + VectorMultAdd (pl->origin, 18, fv, dl->origin); dl->radius = 200 + (rand () & 31); dl->die = cl.time + 0.1; dl->minlight = 32; diff --git a/qw/source/cl_tent.c b/qw/source/cl_tent.c index 56679810f..80ffca053 100644 --- a/qw/source/cl_tent.c +++ b/qw/source/cl_tent.c @@ -232,7 +232,7 @@ beam_setup (beam_t *b) d = 0; while (ent_count--) { ent = &b->ent_list[ent_count]; - VectorMA (org, d, dist, ent->origin); + VectorMultAdd (org, d, dist, ent->origin); d += 1.0; ent->model = b->model; ent->angles[0] = pitch; diff --git a/qw/source/pmove.c b/qw/source/pmove.c index d15fbaf53..2641f7fea 100644 --- a/qw/source/pmove.c +++ b/qw/source/pmove.c @@ -133,7 +133,7 @@ PM_FlyMove (void) if (VectorIsZero (pmove.velocity)) break; - VectorMA (pmove.origin, time_left, pmove.velocity, end); + VectorMultAdd (pmove.origin, time_left, pmove.velocity, end); trace = PM_PlayerMove (pmove.origin, end); @@ -240,7 +240,7 @@ PM_FlymodeMove (void) } PM_Accelerate (pmtmp, pmspeed, movevars.wateraccelerate); - VectorMA (pmove.origin, frametime, pmove.velocity, dest); + VectorMultAdd (pmove.origin, frametime, pmove.velocity, dest); VectorCopy (dest, start); start[2] += STEPSIZE + 1; trace = PM_PlayerMove (start, dest); @@ -472,7 +472,7 @@ PM_WaterMove (void) PM_Accelerate (wishdir, wishspeed, movevars.wateraccelerate); // assume it is a stair or a slope, so press down from stepheight above - VectorMA (pmove.origin, frametime, pmove.velocity, dest); + VectorMultAdd (pmove.origin, frametime, pmove.velocity, dest); VectorCopy (dest, start); start[2] += STEPSIZE + 1; trace = PM_PlayerMove (start, dest); @@ -667,7 +667,7 @@ CheckWaterJump (void) flatforward[2] = 0; VectorNormalize (flatforward); - VectorMA (pmove.origin, 24, flatforward, spot); + VectorMultAdd (pmove.origin, 24, flatforward, spot); spot[2] += 8; cont = PM_PointContents (spot); if (cont != CONTENTS_SOLID) @@ -784,7 +784,7 @@ SpectatorMove (void) pmove.velocity[i] += accelspeed * wishdir[i]; // move - VectorMA (pmove.origin, frametime, pmove.velocity, pmove.origin); + VectorMultAdd (pmove.origin, frametime, pmove.velocity, pmove.origin); } /* diff --git a/qw/source/sv_phys.c b/qw/source/sv_phys.c index 8eeb90434..674be959b 100644 --- a/qw/source/sv_phys.c +++ b/qw/source/sv_phys.c @@ -255,8 +255,8 @@ SV_FlyMove (edict_t *ent, float time, trace_t *steptrace) if (VectorIsZero (SVvector (ent, velocity))) break; - VectorMA (SVvector (ent, origin), time_left, SVvector (ent, velocity), - end); + VectorMultAdd (SVvector (ent, origin), time_left, + SVvector (ent, velocity), end); trace = SV_Move (SVvector (ent, origin), SVvector (ent, mins), SVvector (ent, maxs), end, false, ent); @@ -578,10 +578,10 @@ SV_Physics_Noclip (edict_t *ent) if (!SV_RunThink (ent)) return; - VectorMA (SVvector (ent, angles), sv_frametime, - SVvector (ent, avelocity), SVvector (ent, angles)); - VectorMA (SVvector (ent, origin), sv_frametime, SVvector (ent, velocity), - SVvector (ent, origin)); + VectorMultAdd (SVvector (ent, angles), sv_frametime, + SVvector (ent, avelocity), SVvector (ent, angles)); + VectorMultAdd (SVvector (ent, origin), sv_frametime, + SVvector (ent, velocity), SVvector (ent, origin)); SV_LinkEdict (ent, false); } @@ -649,8 +649,8 @@ SV_Physics_Toss (edict_t *ent) SV_AddGravity (ent); // move angles - VectorMA (SVvector (ent, angles), sv_frametime, - SVvector (ent, avelocity), SVvector (ent, angles)); + VectorMultAdd (SVvector (ent, angles), sv_frametime, + SVvector (ent, avelocity), SVvector (ent, angles)); // move origin VectorScale (SVvector (ent, velocity), sv_frametime, move); diff --git a/qw/source/sv_pr_cmds.c b/qw/source/sv_pr_cmds.c index e044889cb..24a456c8c 100644 --- a/qw/source/sv_pr_cmds.c +++ b/qw/source/sv_pr_cmds.c @@ -919,7 +919,7 @@ PF_aim (progs_t *pr) // try sending a trace straight VectorCopy (*sv_globals.v_forward, dir); - VectorMA (start, 2048, dir, end); + VectorMultAdd (start, 2048, dir, end); tr = SV_Move (start, vec3_origin, vec3_origin, end, false, ent); if (tr.ent && SVfloat (tr.ent, takedamage) == DAMAGE_AIM && (!teamplay->int_val || SVfloat (ent, team) <= 0 diff --git a/tools/qfbsp/source/qfbsp.c b/tools/qfbsp/source/qfbsp.c index c2bdfd06e..bfdd42b3e 100644 --- a/tools/qfbsp/source/qfbsp.c +++ b/tools/qfbsp/source/qfbsp.c @@ -98,7 +98,7 @@ BaseWindingForPlane (plane_t *p) } v = DotProduct (vup, p->normal); - VectorMA (vup, -v, p->normal, vup); + VectorMultSub (vup, v, p->normal, vup); _VectorNormalize (vup); VectorScale (p->normal, p->dist, org); diff --git a/tools/qfbsp/source/tjunc.c b/tools/qfbsp/source/tjunc.c index 57abbce7e..5a0769627 100644 --- a/tools/qfbsp/source/tjunc.c +++ b/tools/qfbsp/source/tjunc.c @@ -141,7 +141,7 @@ FindEdge (vec3_t p1, vec3_t p2, vec_t *t1, vec_t *t2) *t1 = DotProduct (p1, dir); *t2 = DotProduct (p2, dir); - VectorMA (p1, -*t1, dir, origin); + VectorMultSub (p1, *t1, dir, origin); if (*t1 > *t2) { temp = *t1; @@ -358,7 +358,7 @@ FixFaceEdges (face_t *f) for (k = superface->numpoints; k > j; k--) { VectorCopy (superface->pts[k - 1], superface->pts[k]); } - VectorMA (w->origin, v->t, w->dir, superface->pts[j]); + VectorMultAdd (w->origin, v->t, w->dir, superface->pts[j]); superface->numpoints++; goto restart; } diff --git a/tools/qflight/source/ltface.c b/tools/qflight/source/ltface.c index cd0205190..78fe6d48c 100644 --- a/tools/qflight/source/ltface.c +++ b/tools/qflight/source/ltface.c @@ -177,7 +177,7 @@ CalcFaceVectors (lightinfo_t *l) len = VectorLength (l->worldtotex[i]); dist = DotProduct (l->worldtotex[i], l->facenormal); dist *= distscale; - VectorMA (l->worldtotex[i], -dist, texnormal, l->textoworld[i]); + VectorMultSub (l->worldtotex[i], dist, texnormal, l->textoworld[i]); VectorScale (l->textoworld[i], (1 / len) * (1 / len), l->textoworld[i]); } @@ -190,7 +190,7 @@ CalcFaceVectors (lightinfo_t *l) // project back to the face plane dist = DotProduct (l->texorg, l->facenormal) - l->facedist - 1; dist *= distscale; - VectorMA (l->texorg, -dist, texnormal, l->texorg); + VectorMultSub (l->texorg, dist, texnormal, l->texorg); } /* @@ -330,7 +330,7 @@ CalcPoints (lightinfo_t *l) // move surf 8 pixels towards the center VectorSubtract (facemid, surf, move); _VectorNormalize (move); - VectorMA (surf, 8, move, surf); + VectorMultAdd (surf, 8, move, surf); } if (i == 2) c_bad++;