Skip to content

Commit

Permalink
Match zLasso_InitTimer (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
escape209 authored Aug 1, 2024
1 parent 86d39a2 commit 963bc64
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/SB/Game/zLasso.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
#include "zLasso.h"

#include "iModel.h"

#include <types.h>

void zLasso_InitTimer(zLasso* lasso, F32 interpTime)
{
lasso->secsTotal = interpTime;
lasso->secsLeft = interpTime;

lasso->stRadius = lasso->tgRadius = lasso->crRadius = 0.0f;
lasso->stSlack = lasso->tgSlack = lasso->crSlack = 0.0f;

iModelTagEval(lasso->model->Data, &lasso->tag, lasso->model->Mat, &lasso->crCenter);

xVec3Copy(&lasso->anchor, (xVec3*)&lasso->model->Mat->pos);
xVec3SubFrom(&lasso->crCenter, &lasso->anchor);
xVec3Copy(&lasso->honda, &lasso->crCenter);

lasso->currDist = lasso->lastDist = 0.0f;

xVec3Init(&lasso->stNormal, 0, 1, 0);
xVec3Init(&lasso->tgNormal, 0, 1, 0);
xVec3Init(&lasso->crNormal, 0, 1, 0);

xVec3Copy(&lasso->lastRefs[0], &lasso->crCenter);
xVec3Copy(&lasso->lastRefs[1], &lasso->crCenter);
xVec3Copy(&lasso->lastRefs[2], &lasso->crCenter);
xVec3Copy(&lasso->lastRefs[3], &lasso->crCenter);
xVec3Copy(&lasso->lastRefs[4], &lasso->crCenter);

lasso->reindex[0] = 0;
lasso->reindex[1] = 1;
lasso->reindex[2] = 2;
lasso->reindex[3] = 3;
lasso->reindex[4] = 4;
}

0 comments on commit 963bc64

Please sign in to comment.