Skip to content
Permalink
Browse files

Improve code readability... use VectorClear to reset vec3_t variables.

  • Loading branch information...
Archangel35757 committed May 19, 2019
1 parent e350123 commit ade0e98474aac32e978311dab1780f26af3c1fed
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 ade0e98

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