the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 36 lines 1.3 kB view raw
1#include "stdafx.h" 2#include "ZombieModel.h" 3#include "..\Minecraft.World\Mth.h" 4#include "ModelPart.h" 5 6ZombieModel::ZombieModel() : HumanoidModel(0, 0, 64, 32) 7{ 8} 9 10ZombieModel::ZombieModel(float g, float yOffset, int texWidth, int texHeight) : HumanoidModel(g, yOffset, texWidth, texHeight) 11{ 12} 13 14ZombieModel::ZombieModel(float g, bool isArmor) : HumanoidModel(g, 0, 64, isArmor ? 32 : 64) 15{ 16} 17 18void ZombieModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim) 19{ 20 HumanoidModel::setupAnim(time, r, bob, yRot, xRot, scale, entity, uiBitmaskOverrideAnim); 21 22 float attack2 = Mth::sin(attackTime*PI); 23 float attack = Mth::sin((1-(1-attackTime)*(1-attackTime))*PI); 24 arm0->zRot = 0; 25 arm1->zRot = 0; 26 arm0->yRot = -(0.1f-attack2*0.6f); 27 arm1->yRot = +(0.1f-attack2*0.6f); 28 arm0->xRot = -(float)PI/2.0f; 29 arm1->xRot = -(float)PI/2.0f; 30 arm0->xRot -= attack2*1.2f-attack*0.4f; 31 arm1->xRot -= attack2*1.2f-attack*0.4f; 32 arm0->zRot += ((Mth::cos(bob * 0.09f)) * 0.05f+0.05f); 33 arm1->zRot -= ((Mth::cos(bob * 0.09f)) * 0.05f+0.05f); 34 arm0->xRot += ((Mth::sin(bob * 0.067f)) * 0.05f); 35 arm1->xRot -= ((Mth::sin(bob * 0.067f)) * 0.05f); 36}