Skip to content

Commit a9ab211

Browse files
committed
xEntBoulder matches
1 parent d0cb629 commit a9ab211

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/SB/Core/x/xEntBoulder.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
#include <types.h>
66

7+
void xEntBoulder_FitToModel(xEntBoulder* ent)
8+
{
9+
xVec3Copy
10+
(
11+
&ent->bound.cyl.center,
12+
(xVec3 *)(&ent->model->Data->boundingSphere.center)
13+
);
14+
ent->bound.cyl.r = ent->model->Data->boundingSphere.radius;
15+
xVec3Copy(&ent->localCenter, &ent->bound.cyl.center);
16+
xVec3AddTo(&ent->bound.cyl.center,(xVec3*)&ent->model->Mat->pos);
17+
}
18+
719
void xEntBoulder_Init(void* ent, void* asset)
820
{
921
xEntBoulder_Init((xEntBoulder*)ent, (xEntAsset*)asset);
@@ -46,3 +58,21 @@ void xMat3x3RMulVec(xVec3* o, const xMat3x3* m, const xVec3* v)
4658
void xEntBoulder_BUpdate(xEnt*, xVec3*)
4759
{
4860
}
61+
62+
void xEntBoulder_Setup(xEntBoulder* ent)
63+
{
64+
ent->asset->redMult = 0.0f;
65+
ent->asset->greenMult = 0.0f;
66+
ent->asset->blueMult = 0.0f;
67+
68+
if (ent->model != NULL)
69+
{
70+
ent->asset->seeThru = ent->model->Alpha;
71+
}
72+
else
73+
{
74+
ent->asset->seeThru = 1.0f;
75+
}
76+
77+
xEntSetup(ent);
78+
}

0 commit comments

Comments
 (0)