the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h";
2#include "LeashKnotModel.h"
3#include "ModelPart.h"
4
5LeashKnotModel::LeashKnotModel()
6{
7 _init(0, 0, 32, 32);
8}
9
10LeashKnotModel::LeashKnotModel(int u, int v, int tw, int th)
11{
12 _init(u, v, tw, th);
13}
14
15void LeashKnotModel::_init(int u, int v, int tw, int th)
16{
17 texWidth = tw;
18 texHeight = th;
19 knot = new ModelPart(this, u, v);
20 knot->addBox(-3, -6, -3, 6, 8, 6, 0);
21 knot->setPos(0, 0, 0);
22}
23
24void LeashKnotModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
25{
26 setupAnim(time, r, bob, yRot, xRot, scale, entity);
27
28 knot->render(scale, usecompiled);
29}
30
31void LeashKnotModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim)
32{
33 Model::setupAnim(time, r, bob, yRot, xRot, scale, entity);
34
35 knot->yRot = yRot / (180 / PI);
36 knot->xRot = xRot / (180 / PI);
37}