mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 04:20:45 +00:00
- added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back.
This commit is contained in:
parent
ab36b86a59
commit
9c95c902c7
4 changed files with 9 additions and 0 deletions
|
@ -24,6 +24,7 @@ Ken Silverman's official web site: http://www.advsys.net/ken
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "gamefuncs.h"
|
#include "gamefuncs.h"
|
||||||
#include "hw_drawinfo.h"
|
#include "hw_drawinfo.h"
|
||||||
|
#include "gamestruct.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -1915,6 +1916,7 @@ void polymost_scansector(int32_t sectnum)
|
||||||
{
|
{
|
||||||
if ((spr->cstat&(64+48))!=(64+16) ||
|
if ((spr->cstat&(64+48))!=(64+16) ||
|
||||||
(r_voxels && tiletovox[spr->picnum] >= 0 && voxmodels[tiletovox[spr->picnum]]) ||
|
(r_voxels && tiletovox[spr->picnum] >= 0 && voxmodels[tiletovox[spr->picnum]]) ||
|
||||||
|
(r_voxels && gi->Voxelize(spr->picnum)) ||
|
||||||
DMulScale(bcos(spr->ang), -s.x, bsin(spr->ang), -s.y, 6) > 0)
|
DMulScale(bcos(spr->ang), -s.x, bsin(spr->ang), -s.y, 6) > 0)
|
||||||
if (renderAddTsprite(pm_tsprite, pm_spritesortcnt, z, sectnum))
|
if (renderAddTsprite(pm_tsprite, pm_spritesortcnt, z, sectnum))
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -121,6 +121,7 @@ struct GameInterface
|
||||||
virtual void EnterPortal(spritetype* viewer, int type) {}
|
virtual void EnterPortal(spritetype* viewer, int type) {}
|
||||||
virtual void LeavePortal(spritetype* viewer, int type) {}
|
virtual void LeavePortal(spritetype* viewer, int type) {}
|
||||||
virtual bool GetGeoEffect(GeoEffect* eff, int viewsector) { return false; }
|
virtual bool GetGeoEffect(GeoEffect* eff, int viewsector) { return false; }
|
||||||
|
virtual bool Voxelize(int sprnum) { return false; }
|
||||||
|
|
||||||
virtual FString statFPS()
|
virtual FString statFPS()
|
||||||
{
|
{
|
||||||
|
|
|
@ -802,4 +802,9 @@ void GameInterface::FreeLevelData()
|
||||||
::GameInterface::FreeLevelData();
|
::GameInterface::FreeLevelData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GameInterface::Voxelize(int sprnum)
|
||||||
|
{
|
||||||
|
return (aVoxelArray[sprnum].Voxel >= 0);
|
||||||
|
}
|
||||||
|
|
||||||
END_SW_NS
|
END_SW_NS
|
||||||
|
|
|
@ -2246,6 +2246,7 @@ struct GameInterface : ::GameInterface
|
||||||
void UpdateCameras(double smoothratio) override;
|
void UpdateCameras(double smoothratio) override;
|
||||||
void EnterPortal(spritetype* viewer, int type) override;
|
void EnterPortal(spritetype* viewer, int type) override;
|
||||||
void LeavePortal(spritetype* viewer, int type) override;
|
void LeavePortal(spritetype* viewer, int type) override;
|
||||||
|
bool Voxelize(int sprnum);
|
||||||
|
|
||||||
|
|
||||||
GameStats getStats() override;
|
GameStats getStats() override;
|
||||||
|
|
Loading…
Reference in a new issue