mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-20 05:23:51 +00:00
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
This commit is contained in:
parent
d63f79325f
commit
7074f35e4b
1373 changed files with 12054 additions and 12054 deletions
|
|
@ -34,28 +34,28 @@ void ZombieRenderer::createArmorParts()
|
|||
villagerArmorParts2 = new VillagerZombieModel(0.5f, 0, true);
|
||||
}
|
||||
|
||||
int ZombieRenderer::prepareArmor(shared_ptr<Mob> _mob, int layer, float a)
|
||||
int ZombieRenderer::prepareArmor(std::shared_ptr<Mob> _mob, int layer, float a)
|
||||
{
|
||||
shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
swapArmor(mob);
|
||||
return HumanoidMobRenderer::prepareArmor(_mob, layer, a);
|
||||
}
|
||||
|
||||
void ZombieRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a)
|
||||
void ZombieRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a)
|
||||
{
|
||||
shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
swapArmor(mob);
|
||||
HumanoidMobRenderer::render(_mob, x, y, z, rot, a);
|
||||
}
|
||||
|
||||
void ZombieRenderer::additionalRendering(shared_ptr<Mob> _mob, float a)
|
||||
void ZombieRenderer::additionalRendering(std::shared_ptr<Mob> _mob, float a)
|
||||
{
|
||||
shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
swapArmor(mob);
|
||||
HumanoidMobRenderer::additionalRendering(_mob, a);
|
||||
}
|
||||
|
||||
void ZombieRenderer::swapArmor(shared_ptr<Zombie> mob)
|
||||
void ZombieRenderer::swapArmor(std::shared_ptr<Zombie> mob)
|
||||
{
|
||||
if (mob->isVillager())
|
||||
{
|
||||
|
|
@ -80,9 +80,9 @@ void ZombieRenderer::swapArmor(shared_ptr<Zombie> mob)
|
|||
humanoidModel = (HumanoidModel *) model;
|
||||
}
|
||||
|
||||
void ZombieRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a)
|
||||
void ZombieRenderer::setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a)
|
||||
{
|
||||
shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
std::shared_ptr<Zombie> mob = dynamic_pointer_cast<Zombie>(_mob);
|
||||
if (mob->isConverting())
|
||||
{
|
||||
bodyRot += (float) (cos(mob->tickCount * 3.25) * PI * .25f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue