mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-04-07 16:03:31 +00:00
the whole game
This commit is contained in:
23
src/client/renderer/entity/ChickenRenderer.cpp
Executable file
23
src/client/renderer/entity/ChickenRenderer.cpp
Executable file
@@ -0,0 +1,23 @@
|
||||
#include "ChickenRenderer.h"
|
||||
#include "../../../util/Mth.h"
|
||||
#include "../../../world/entity/animal/Chicken.h"
|
||||
|
||||
|
||||
ChickenRenderer::ChickenRenderer( Model* model, float shadow )
|
||||
: super(model, shadow)
|
||||
{
|
||||
}
|
||||
|
||||
void ChickenRenderer::render( Entity* mob, float x, float y, float z, float rot, float a )
|
||||
{
|
||||
super::render(mob, x, y, z, rot, a);
|
||||
}
|
||||
|
||||
float ChickenRenderer::getBob( Mob* mob_, float a )
|
||||
{
|
||||
Chicken* mob = (Chicken*) mob_;
|
||||
float flap = mob->oFlap+(mob->flap-mob->oFlap)*a;
|
||||
float flapSpeed = mob->oFlapSpeed+(mob->flapSpeed-mob->oFlapSpeed)*a;
|
||||
|
||||
return (Mth::sin(flap)+1)*flapSpeed;
|
||||
}
|
||||
Reference in New Issue
Block a user