diff options
Diffstat (limited to 'Minecraft.Client/GhastRenderer.cpp')
| -rw-r--r-- | Minecraft.Client/GhastRenderer.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Minecraft.Client/GhastRenderer.cpp b/Minecraft.Client/GhastRenderer.cpp index 1d8a2833..cecb4eaf 100644 --- a/Minecraft.Client/GhastRenderer.cpp +++ b/Minecraft.Client/GhastRenderer.cpp @@ -3,11 +3,14 @@ #include "GhastModel.h" #include "..\Minecraft.World\net.minecraft.world.entity.monster.h" +ResourceLocation GhastRenderer::GHAST_LOCATION = ResourceLocation(TN_MOB_GHAST); +ResourceLocation GhastRenderer::GHAST_SHOOTING_LOCATION = ResourceLocation(TN_MOB_GHAST_FIRE); + GhastRenderer::GhastRenderer() : MobRenderer(new GhastModel(), 0.5f) { } -void GhastRenderer::scale(shared_ptr<Mob> mob, float a) +void GhastRenderer::scale(shared_ptr<LivingEntity> mob, float a) { shared_ptr<Ghast> ghast = dynamic_pointer_cast<Ghast>(mob); @@ -18,4 +21,16 @@ void GhastRenderer::scale(shared_ptr<Mob> mob, float a) float hs = (8+1/ss)/2; glScalef(hs, s, hs); glColor4f(1, 1, 1, 1); +} + +ResourceLocation *GhastRenderer::getTextureLocation(shared_ptr<Entity> mob) +{ + shared_ptr<Ghast> ghast = dynamic_pointer_cast<Ghast>(mob); + + if (ghast->isCharging()) + { + return &GHAST_SHOOTING_LOCATION; + } + + return &GHAST_LOCATION; }
\ No newline at end of file |
