mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-19 04:26:52 -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,6 +147,7 @@ namespace ClassicalSharp {
|
|||||||
MapRenderer.RenderNormal(delta);
|
MapRenderer.RenderNormal(delta);
|
||||||
MapBordersRenderer.RenderSides(delta);
|
MapBordersRenderer.RenderSides(delta);
|
||||||
|
|
||||||
|
Entities.DrawShadows();
|
||||||
if (SelectedPos.Valid && !HideGui) {
|
if (SelectedPos.Valid && !HideGui) {
|
||||||
Picking.UpdateState(SelectedPos);
|
Picking.UpdateState(SelectedPos);
|
||||||
Picking.Render(delta);
|
Picking.Render(delta);
|
||||||
@ -165,12 +166,10 @@ namespace ClassicalSharp {
|
|||||||
|
|
||||||
// Need to render again over top of translucent block, as the selection outline
|
// Need to render again over top of translucent block, as the selection outline
|
||||||
// is drawn without writing to the depth buffer
|
// is drawn without writing to the depth buffer
|
||||||
if (SelectedPos.Valid && !HideGui
|
if (SelectedPos.Valid && !HideGui && BlockInfo.Draw[SelectedPos.Block] == DrawType.Translucent) {
|
||||||
&& BlockInfo.Draw[SelectedPos.Block] == DrawType.Translucent) {
|
|
||||||
Picking.Render(delta);
|
Picking.Render(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
Entities.DrawShadows();
|
|
||||||
SelectionManager.Render(delta);
|
SelectionManager.Render(delta);
|
||||||
Entities.RenderHoveredNames(Graphics, delta);
|
Entities.RenderHoveredNames(Graphics, delta);
|
||||||
|
|
||||||
|
@ -304,6 +304,7 @@
|
|||||||
<ClCompile Include="Physics.c" />
|
<ClCompile Include="Physics.c" />
|
||||||
<ClCompile Include="PickedPosRenderer.c" />
|
<ClCompile Include="PickedPosRenderer.c" />
|
||||||
<ClCompile Include="Picking.c" />
|
<ClCompile Include="Picking.c" />
|
||||||
|
<ClCompile Include="Player.c" />
|
||||||
<ClCompile Include="Program.c" />
|
<ClCompile Include="Program.c" />
|
||||||
<ClCompile Include="Random.c" />
|
<ClCompile Include="Random.c" />
|
||||||
<ClCompile Include="Screens.c" />
|
<ClCompile Include="Screens.c" />
|
||||||
|
@ -593,5 +593,8 @@
|
|||||||
<ClCompile Include="EntityComponents.c">
|
<ClCompile Include="EntityComponents.c">
|
||||||
<Filter>Source Files\Entities</Filter>
|
<Filter>Source Files\Entities</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Player.c">
|
||||||
|
<Filter>Source Files\Entities</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</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;
|
bool FetchedSkin;
|
||||||
} Player;
|
} Player;
|
||||||
|
|
||||||
|
/* Represents another entity in multiplayer */
|
||||||
|
typedef struct NetPlayer_ {
|
||||||
|
Player Base;
|
||||||
|
NetInterpComp Interp;
|
||||||
|
bool ShouldRender;
|
||||||
|
} NetPlayer;
|
||||||
|
|
||||||
/* Represents the user/player's own entity. */
|
/* Represents the user/player's own entity. */
|
||||||
typedef struct LocalPlayer_ {
|
typedef struct LocalPlayer_ {
|
||||||
@ -29,8 +35,7 @@ typedef struct LocalPlayer_ {
|
|||||||
} LocalPlayer;
|
} LocalPlayer;
|
||||||
|
|
||||||
|
|
||||||
/* Singleton instance of the local player. */
|
|
||||||
LocalPlayer LocalPlayer_Instance;
|
LocalPlayer LocalPlayer_Instance;
|
||||||
/* Initalises the local player instance. */
|
|
||||||
void LocalPlayer_Init(void);
|
void LocalPlayer_Init(void);
|
||||||
|
void NetPlayer_Init(NetPlayer* player);
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user