mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-21 11:01:01 +00:00
- Blood: Eliminate VIEW
structure entirely.
This commit is contained in:
parent
b4af1a4600
commit
3c39174a22
3 changed files with 4 additions and 34 deletions
|
@ -43,8 +43,6 @@ void fakePlayerProcess(PLAYER* pPlayer, InputPacket* pInput);
|
||||||
void fakeActProcessSprites(void);
|
void fakeActProcessSprites(void);
|
||||||
|
|
||||||
bool gPrediction = true;
|
bool gPrediction = true;
|
||||||
VIEW predict, predictOld;
|
|
||||||
static VIEW predictFifo[256];
|
|
||||||
|
|
||||||
void viewInitializePrediction(void)
|
void viewInitializePrediction(void)
|
||||||
{
|
{
|
||||||
|
@ -89,14 +87,16 @@ void viewInitializePrediction(void)
|
||||||
|
|
||||||
void viewUpdatePrediction(InputPacket* pInput)
|
void viewUpdatePrediction(InputPacket* pInput)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
predictOld = predict;
|
predictOld = predict;
|
||||||
auto bakCstat = gMe->actor->spr.cstat;
|
auto bakCstat = gMe->actor->spr.cstat;
|
||||||
gMe->actor->spr.cstat = 0;
|
gMe->actor->spr.cstat = 0;
|
||||||
fakePlayerProcess(gMe, pInput);
|
fakePlayerProcess(gMe, pInput);
|
||||||
fakeActProcessSprites();
|
fakeActProcessSprites();
|
||||||
gMe->actor->spr.cstat = bakCstat;
|
gMe->actor->spr.cstat = bakCstat;
|
||||||
//predictFifo[gPredictTail&255] = predict;
|
predictFifo[gPredictTail&255] = predict;
|
||||||
//gPredictTail++;
|
gPredictTail++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fakeProcessInput(PLAYER* pPlayer, InputPacket* pInput)
|
static void fakeProcessInput(PLAYER* pPlayer, InputPacket* pInput)
|
||||||
|
|
|
@ -47,7 +47,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
VIEW gPrevView[kMaxPlayers];
|
|
||||||
VIEWPOS gViewPos;
|
VIEWPOS gViewPos;
|
||||||
int gViewIndex;
|
int gViewIndex;
|
||||||
|
|
||||||
|
@ -445,7 +444,6 @@ static void DrawMap(DBloodActor* view, const double smoothratio)
|
||||||
setViewport(Hud_Stbar);
|
setViewport(Hud_Stbar);
|
||||||
tm = 1;
|
tm = 1;
|
||||||
}
|
}
|
||||||
VIEW* pView = &gPrevView[gViewIndex];
|
|
||||||
auto ang = !SyncInput() ? gView->angle.sum() : gView->angle.interpolatedsum(smoothratio * (1. / MaxSmoothRatio));
|
auto ang = !SyncInput() ? gView->angle.sum() : gView->angle.interpolatedsum(smoothratio * (1. / MaxSmoothRatio));
|
||||||
DrawOverheadMap(view->interpolatedpos(smoothratio * (1. / MaxSmoothRatio)).XY(), ang, smoothratio * (1. / MaxSmoothRatio));
|
DrawOverheadMap(view->interpolatedpos(smoothratio * (1. / MaxSmoothRatio)).XY(), ang, smoothratio * (1. / MaxSmoothRatio));
|
||||||
if (tm)
|
if (tm)
|
||||||
|
@ -492,7 +490,6 @@ static void SetupView(int& cX, int& cY, int& cZ, DAngle& cA, fixedhoriz& cH, sec
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
VIEW* pView = &gPrevView[gViewIndex];
|
|
||||||
cX = interpolatedvalue(gView->actor->opos.X, gView->actor->spr.pos.X, smoothratio * (1. / MaxSmoothRatio)) * worldtoint;
|
cX = interpolatedvalue(gView->actor->opos.X, gView->actor->spr.pos.X, smoothratio * (1. / MaxSmoothRatio)) * worldtoint;
|
||||||
cY = interpolatedvalue(gView->actor->opos.Y, gView->actor->spr.pos.Y, smoothratio * (1. / MaxSmoothRatio)) * worldtoint;
|
cY = interpolatedvalue(gView->actor->opos.Y, gView->actor->spr.pos.Y, smoothratio * (1. / MaxSmoothRatio)) * worldtoint;
|
||||||
cZ = interpolatedvalue(gView->ozView, gView->zView, smoothratio * (1. / MaxSmoothRatio));
|
cZ = interpolatedvalue(gView->ozView, gView->zView, smoothratio * (1. / MaxSmoothRatio));
|
||||||
|
|
|
@ -31,33 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
struct VIEW {
|
|
||||||
int bobPhase;
|
|
||||||
int Kills;
|
|
||||||
int shakeBobY; // bob sway y
|
|
||||||
int shakeBobX; // bob sway x
|
|
||||||
int zViewVel;
|
|
||||||
int zWeapon;
|
|
||||||
int zWeaponVel;
|
|
||||||
int posture; // posture
|
|
||||||
double spin; // spin
|
|
||||||
int xvel; //xvel
|
|
||||||
int yvel; //yvel
|
|
||||||
int zvel; //zvel
|
|
||||||
int sectnum; // sectnum
|
|
||||||
unsigned int floordist; // floordist
|
|
||||||
uint8_t lookCenter; // look center
|
|
||||||
uint8_t cantJump;
|
|
||||||
uint8_t isRunning; // run
|
|
||||||
uint8_t jump; // jump
|
|
||||||
uint8_t isUnderwater; // underwater
|
|
||||||
int16_t sprflags; // sprite flags
|
|
||||||
SPRITEHIT hit;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern VIEW gPrevView[kMaxPlayers];
|
|
||||||
|
|
||||||
extern VIEW predict, predictOld;
|
|
||||||
extern bool gPrediction;
|
extern bool gPrediction;
|
||||||
|
|
||||||
enum VIEW_EFFECT {
|
enum VIEW_EFFECT {
|
||||||
|
|
Loading…
Reference in a new issue