mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix entity shadows not rendering when looking through a water block at feet
This commit is contained in:
parent
14607ffeea
commit
25e15abc40
@ -147,11 +147,12 @@ namespace ClassicalSharp {
|
||||
MapRenderer.RenderNormal(delta);
|
||||
MapBordersRenderer.RenderSides(delta);
|
||||
|
||||
Entities.DrawShadows();
|
||||
if (SelectedPos.Valid && !HideGui) {
|
||||
Picking.UpdateState(SelectedPos);
|
||||
Picking.Render(delta);
|
||||
}
|
||||
|
||||
|
||||
// Render water over translucent blocks when underwater for proper alpha blending
|
||||
Vector3 pos = LocalPlayer.Position;
|
||||
if (CurrentCameraPos.Y < World.Env.EdgeHeight
|
||||
@ -165,12 +166,10 @@ namespace ClassicalSharp {
|
||||
|
||||
// Need to render again over top of translucent block, as the selection outline
|
||||
// is drawn without writing to the depth buffer
|
||||
if (SelectedPos.Valid && !HideGui
|
||||
&& BlockInfo.Draw[SelectedPos.Block] == DrawType.Translucent) {
|
||||
if (SelectedPos.Valid && !HideGui && BlockInfo.Draw[SelectedPos.Block] == DrawType.Translucent) {
|
||||
Picking.Render(delta);
|
||||
}
|
||||
|
||||
Entities.DrawShadows();
|
||||
SelectionManager.Render(delta);
|
||||
Entities.RenderHoveredNames(Graphics, delta);
|
||||
|
||||
|
@ -304,6 +304,7 @@
|
||||
<ClCompile Include="Physics.c" />
|
||||
<ClCompile Include="PickedPosRenderer.c" />
|
||||
<ClCompile Include="Picking.c" />
|
||||
<ClCompile Include="Player.c" />
|
||||
<ClCompile Include="Program.c" />
|
||||
<ClCompile Include="Random.c" />
|
||||
<ClCompile Include="Screens.c" />
|
||||
|
@ -593,5 +593,8 @@
|
||||
<ClCompile Include="EntityComponents.c">
|
||||
<Filter>Source Files\Entities</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Player.c">
|
||||
<Filter>Source Files\Entities</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
1
src/Client/Player.c
Normal file
1
src/Client/Player.c
Normal file
@ -0,0 +1 @@
|
||||
#include "Player.h"
|
@ -16,6 +16,12 @@ typedef struct Player_ {
|
||||
bool FetchedSkin;
|
||||
} Player;
|
||||
|
||||
/* Represents another entity in multiplayer */
|
||||
typedef struct NetPlayer_ {
|
||||
Player Base;
|
||||
NetInterpComp Interp;
|
||||
bool ShouldRender;
|
||||
} NetPlayer;
|
||||
|
||||
/* Represents the user/player's own entity. */
|
||||
typedef struct LocalPlayer_ {
|
||||
@ -29,8 +35,7 @@ typedef struct LocalPlayer_ {
|
||||
} LocalPlayer;
|
||||
|
||||
|
||||
/* Singleton instance of the local player. */
|
||||
LocalPlayer LocalPlayer_Instance;
|
||||
/* Initalises the local player instance. */
|
||||
void LocalPlayer_Init(void);
|
||||
void NetPlayer_Init(NetPlayer* player);
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user