feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a4399472.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
This commit is contained in:
45
Minecraft.Client/TntMinecartRenderer.cpp
Normal file
45
Minecraft.Client/TntMinecartRenderer.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "stdafx.h"
|
||||
#include "TntMinecartRenderer.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.item.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
|
||||
|
||||
void TntMinecartRenderer::renderMinecartContents(shared_ptr<Minecart> _cart, float a, Tile *tile, int tileData)
|
||||
{
|
||||
shared_ptr<MinecartTNT> cart = dynamic_pointer_cast<MinecartTNT>(_cart);
|
||||
|
||||
int fuse = cart->getFuse();
|
||||
|
||||
if (fuse > -1)
|
||||
{
|
||||
if (fuse - a + 1 < 10)
|
||||
{
|
||||
float g = 1 - ((fuse - a + 1) / 10.0f);
|
||||
if (g < 0) g = 0;
|
||||
if (g > 1) g = 1;
|
||||
g *= g;
|
||||
g *= g;
|
||||
float s = 1.0f + g * 0.3f;
|
||||
glScalef(s, s, s);
|
||||
}
|
||||
}
|
||||
|
||||
MinecartRenderer::renderMinecartContents(cart, a, tile, tileData);
|
||||
|
||||
if (fuse > -1 && fuse / 5 % 2 == 0)
|
||||
{
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glDisable(GL_LIGHTING);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
|
||||
glColor4f(1, 1, 1, (1 - ((fuse - a + 1) / 100.0f)) * 0.8f);
|
||||
|
||||
glPushMatrix();
|
||||
renderer->renderTile(Tile::tnt, 0, 1);
|
||||
glPopMatrix();
|
||||
|
||||
glColor4f(1, 1, 1, 1);
|
||||
glDisable(GL_BLEND);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user