mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 07:21:54 +00:00
- fixed compilation.
This commit is contained in:
parent
7ba152e588
commit
2a1a175305
8 changed files with 29 additions and 20 deletions
|
@ -53,6 +53,7 @@ struct PlayerHorizon
|
|||
fixedhoriz osum() { return ohoriz + ohorizoff; }
|
||||
fixedhoriz sum() { return horiz + horizoff; }
|
||||
fixedhoriz interpolatedsum(double const smoothratio) { return interpolatedhorizon(osum(), sum(), smoothratio); }
|
||||
fixedhoriz interpolatedoff(double const smoothratio) { return interpolatedhorizon(ohorizoff, horizoff, smoothratio); }
|
||||
|
||||
// Ticrate playsim adjustment helpers.
|
||||
void addadjustment(double value) { __addadjustment(buildfhoriz(value)); }
|
||||
|
|
|
@ -435,18 +435,18 @@ void processinput(int num) {
|
|||
if (plr.noclip) {
|
||||
plr.x += xvect >> 14;
|
||||
plr.y += yvect >> 14;
|
||||
short sect = plr.sector;
|
||||
int sect = plr.sector;
|
||||
updatesector(plr.x, plr.y, §);
|
||||
if (sect != -1)
|
||||
plr.sector = sect;
|
||||
}
|
||||
else {
|
||||
short sect = plr.sector;
|
||||
clipmove(&plr.x, &plr.y, &plr.z, §, xvect, yvect, 128, 4 << 8, 4 << 8, CLIPMASK0);
|
||||
int sect = plr.sector;
|
||||
clipmove(&plr.pos, §, xvect, yvect, 128, 4 << 8, 4 << 8, CLIPMASK0);
|
||||
if (sect != -1) plr.sector = sect;
|
||||
|
||||
sect = plr.sector;
|
||||
pushmove(&plr.x, &plr.y, &plr.z, §, 128, 4 << 8, 4 << 8, CLIPMASK0);
|
||||
pushmove(&plr.pos, §, 128, 4 << 8, 4 << 8, CLIPMASK0);
|
||||
if (sect != -1) plr.sector = sect;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,19 @@ struct PLAYER {
|
|||
|
||||
InputPacket plInput;
|
||||
int spellnum;
|
||||
int x,y,z;
|
||||
union {
|
||||
struct
|
||||
{
|
||||
int32_t x, y, z;
|
||||
};
|
||||
vec3_t pos;
|
||||
};
|
||||
PlayerAngle angle;
|
||||
PlayerHorizon horizon;
|
||||
int height;
|
||||
int hvel;
|
||||
short sector;
|
||||
short oldsector;
|
||||
int sector;
|
||||
int oldsector;
|
||||
short spritenum;
|
||||
boolean keytoggle;
|
||||
int flags;
|
||||
|
|
|
@ -73,7 +73,7 @@ void drawscreen(int num, double dasmoothratio, bool sceneonly)
|
|||
// Todo: render this with 30% light only.
|
||||
inpreparemirror = true;
|
||||
renderSetRollAngle(1024);
|
||||
renderDrawRoomsQ16(cposx, cposy, cposz, cang.asq16(), choriz.asq16(), floormirrorsector[i]);
|
||||
renderDrawRoomsQ16(cposx, cposy, cposz, cang.asq16(), choriz.asq16(), floormirrorsector[i], false);
|
||||
analyzesprites(plr, (int)dasmoothratio, pm_tsprite, pm_spritesortcnt);
|
||||
renderDrawMasks();
|
||||
renderSetRollAngle(0);
|
||||
|
@ -93,7 +93,7 @@ void drawscreen(int num, double dasmoothratio, bool sceneonly)
|
|||
if (!testnewrenderer)
|
||||
{
|
||||
renderSetRollAngle((float)crotscrnang.asbuildf());
|
||||
renderDrawRoomsQ16(cposx, cposy, cposz, cang.asq16(), choriz.asq16(), plr.sector);
|
||||
renderDrawRoomsQ16(cposx, cposy, cposz, cang.asq16(), choriz.asq16(), plr.sector, false);
|
||||
analyzesprites(plr, (int)dasmoothratio, pm_tsprite, pm_spritesortcnt);
|
||||
renderDrawMasks();
|
||||
}
|
||||
|
|
|
@ -353,7 +353,7 @@ extern short revolvesector[4], revolveang[4], revolvecnt;
|
|||
extern int revolvex[4][32], revolvey[4][32];
|
||||
extern int revolvepivotx[4], revolvepivoty[4];
|
||||
extern int warpx, warpy, warpz, warpang;
|
||||
extern short warpsect;
|
||||
extern int warpsect;
|
||||
extern int scarytime;
|
||||
extern int scarysize;
|
||||
extern int thunderflash;
|
||||
|
|
|
@ -32,7 +32,7 @@ static short revolvesyncang, revolvesyncrotang;
|
|||
static int revolvesyncx, revolvesyncy;
|
||||
|
||||
int warpx, warpy, warpz, warpang;
|
||||
short warpsect;
|
||||
int warpsect;
|
||||
|
||||
int scarytime = -1;
|
||||
int scarysize = 0;
|
||||
|
|
|
@ -1712,9 +1712,9 @@ boolean damageactor(PLAYER& plr, int hitobject, short i) {
|
|||
|
||||
int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, int cliptype) {
|
||||
|
||||
int daz, zoffs;
|
||||
int zoffs;
|
||||
int retval;
|
||||
short tempshort, dasectnum;
|
||||
int tempshort, dasectnum;
|
||||
|
||||
SPRITE& spr = sprite[spritenum];
|
||||
if (spr.statnum == MAXSTATUS)
|
||||
|
@ -1739,12 +1739,14 @@ int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordi
|
|||
zoffs = 0;
|
||||
|
||||
dasectnum = spr.sectnum; // Can't modify sprite sectors directly becuase of linked lists
|
||||
daz = spr.z + zoffs; // Must do this if not using the new centered centering (of course)
|
||||
|
||||
auto pos = spr.pos;
|
||||
pos.z += zoffs; // Must do this if not using the new centered centering (of course)
|
||||
retval = clipmove(&pos, &dasectnum, dx, dy, (spr.clipdist) << 2, ceildist, flordist, dcliptype);
|
||||
|
||||
retval = clipmove(&spr.x, &spr.y, &daz, &dasectnum, dx, dy, (spr.clipdist) << 2, ceildist, flordist, dcliptype);
|
||||
|
||||
pushmove(&spr.x, &spr.y, &daz, &dasectnum, spr.clipdist << 2, ceildist, flordist, CLIPMASK0);
|
||||
pushmove(&pos, &dasectnum, spr.clipdist << 2, ceildist, flordist, CLIPMASK0);
|
||||
spr.x = pos.x;
|
||||
spr.y = pos.y;
|
||||
|
||||
if ((dasectnum != spr.sectnum) && (dasectnum >= 0))
|
||||
changespritesect(spritenum, dasectnum);
|
||||
|
@ -1756,7 +1758,7 @@ int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordi
|
|||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, dcliptype);
|
||||
spr.cstat = tempshort;
|
||||
|
||||
daz = spr.z + zoffs + dz;
|
||||
int daz = spr.z + zoffs + dz;
|
||||
if ((daz <= zr_ceilz) || (daz > zr_florz)) {
|
||||
if (retval != 0)
|
||||
return (retval);
|
||||
|
|
|
@ -230,8 +230,8 @@ struct WhPlayer native {
|
|||
//PlayerHorizon horizon;
|
||||
native int height;
|
||||
native int hvel;
|
||||
native int16 sector;
|
||||
native int16 oldsector;
|
||||
native int sector;
|
||||
native int oldsector;
|
||||
native int16 spritenum;
|
||||
native bool keytoggle;
|
||||
native int flags;
|
||||
|
|
Loading…
Reference in a new issue