Skip to content
Permalink
Browse files

Merge pull request #1016 from Archangel35757/ROFF2_bug_fixes

Improve code readability... use VectorClear to zero-out vec3_t variables
  • Loading branch information...
xycaleth committed May 19, 2019
2 parents e350123 + ade0e98 commit a2ea6add5c218fa49592bbf9051940b9ee32118d
Showing with 9 additions and 8 deletions.
  1. +9 −8 code/game/g_roff.cpp
@@ -324,16 +324,17 @@ static void G_RoffNotetrackCallback( gentity_t *ent, const char *notetrack)
{
if (strcmp(addlArg, "absolute") == 0)
{
VectorSubtract(ent->pos1, ent->pos1, ent->pos1);
VectorSubtract(ent->pos2, ent->pos2, ent->pos2);
VectorClear(ent->pos1);
VectorClear(ent->pos2);

VectorSubtract(ent->s.pos.trBase, ent->s.pos.trBase, ent->s.pos.trBase);
VectorSubtract(ent->currentOrigin, ent->currentOrigin, ent->currentOrigin);
VectorSubtract(ent->s.apos.trBase, ent->s.apos.trBase, ent->s.apos.trBase);
VectorSubtract(ent->currentAngles, ent->currentAngles, ent->currentAngles);
VectorClear(ent->currentOrigin);
VectorClear(ent->currentAngles);

VectorCopy(ent->currentOrigin, ent->s.origin2);
VectorCopy(ent->currentAngles, ent->s.angles2);
VectorClear(ent->s.pos.trBase);
VectorClear(ent->s.apos.trBase);

VectorClear(ent->s.origin2);
VectorClear(ent->s.angles2);
}
else if (strcmp(addlArg, "relative") == 0)
{

0 comments on commit a2ea6ad

Please sign in to comment.
You can’t perform that action at this time.