mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- got rid of COVERupdatesector
Not needed as it just forwards to the engine’s updatesector - and it gets in the way of other changes
This commit is contained in:
parent
3811147f70
commit
16f9d4ec36
9 changed files with 27 additions and 26 deletions
|
@ -70,6 +70,15 @@ inline int clipmove(int* x, int* y, int* z, int* sect, int xv, int yv, int wal,
|
||||||
int pushmove(vec3_t *const vect, int16_t *const sectnum, int32_t const walldist, int32_t const ceildist, int32_t const flordist,
|
int pushmove(vec3_t *const vect, int16_t *const sectnum, int32_t const walldist, int32_t const ceildist, int32_t const flordist,
|
||||||
uint32_t const cliptype, bool clear = true) ATTRIBUTE((nonnull(1, 2)));
|
uint32_t const cliptype, bool clear = true) ATTRIBUTE((nonnull(1, 2)));
|
||||||
|
|
||||||
|
inline int pushmove(vec3_t *const vect, int *const sectnum, int32_t const walldist, int32_t const ceildist, int32_t const flordist,
|
||||||
|
uint32_t const cliptype, bool clear = true)
|
||||||
|
{
|
||||||
|
short sect16 = *sectnum;
|
||||||
|
auto r = pushmove(vect, §16, walldist, ceildist, flordist, cliptype, clear);
|
||||||
|
*sectnum = sect16;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
[[deprecated]]
|
[[deprecated]]
|
||||||
inline int pushmove(int* x, int* y, int* z, int16_t* const sectnum, int32_t const walldist, int32_t const ceildist, int32_t const flordist,
|
inline int pushmove(int* x, int* y, int* z, int16_t* const sectnum, int32_t const walldist, int32_t const ceildist, int32_t const flordist,
|
||||||
uint32_t const cliptype, bool clear = true)
|
uint32_t const cliptype, bool clear = true)
|
||||||
|
|
|
@ -943,7 +943,7 @@ CircleCamera(int *nx, int *ny, int *nz, int *vsect, binangle *nang, fixed_t q16h
|
||||||
RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
|
||||||
// Make sure sector passed to hitscan is correct
|
// Make sure sector passed to hitscan is correct
|
||||||
//COVERupdatesector(*nx, *ny, vsect);
|
//updatesector(*nx, *ny, vsect);
|
||||||
|
|
||||||
hitscan(&n, *vsect, vx, vy, vz,
|
hitscan(&n, *vsect, vx, vy, vz,
|
||||||
&hitinfo, CLIPMASK_MISSILE);
|
&hitinfo, CLIPMASK_MISSILE);
|
||||||
|
|
|
@ -1964,8 +1964,6 @@ void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum,
|
||||||
int32_t* hiz, int32_t* ceilhit,
|
int32_t* hiz, int32_t* ceilhit,
|
||||||
int32_t* loz, int32_t* florhit);
|
int32_t* loz, int32_t* florhit);
|
||||||
|
|
||||||
void COVERupdatesector(int32_t x, int32_t y, int16_t* newsector);
|
|
||||||
|
|
||||||
|
|
||||||
void short_setinterpolation(short *posptr);
|
void short_setinterpolation(short *posptr);
|
||||||
void short_stopinterpolation(short *posptr);
|
void short_stopinterpolation(short *posptr);
|
||||||
|
|
|
@ -1310,7 +1310,7 @@ DoPlayerTeleportToSprite(PLAYERp pp, SPRITEp sp)
|
||||||
|
|
||||||
pp->posz = pp->oposz = sp->z - PLAYER_HEIGHT;
|
pp->posz = pp->oposz = sp->z - PLAYER_HEIGHT;
|
||||||
|
|
||||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
//pp->lastcursectnum = pp->cursectnum;
|
//pp->lastcursectnum = pp->cursectnum;
|
||||||
SET(pp->Flags2, PF2_TELEPORTED);
|
SET(pp->Flags2, PF2_TELEPORTED);
|
||||||
}
|
}
|
||||||
|
@ -1321,7 +1321,7 @@ DoPlayerTeleportToOffset(PLAYERp pp)
|
||||||
pp->oposx = pp->oldposx = pp->posx;
|
pp->oposx = pp->oldposx = pp->posx;
|
||||||
pp->oposy = pp->oldposy = pp->posy;
|
pp->oposy = pp->oldposy = pp->posy;
|
||||||
|
|
||||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
//pp->lastcursectnum = pp->cursectnum;
|
//pp->lastcursectnum = pp->cursectnum;
|
||||||
SET(pp->Flags2, PF2_TELEPORTED);
|
SET(pp->Flags2, PF2_TELEPORTED);
|
||||||
}
|
}
|
||||||
|
@ -2150,7 +2150,7 @@ DoPlayerMove(PLAYERp pp)
|
||||||
}
|
}
|
||||||
pp->posx += pp->xvect >> 14;
|
pp->posx += pp->xvect >> 14;
|
||||||
pp->posy += pp->yvect >> 14;
|
pp->posy += pp->yvect >> 14;
|
||||||
COVERupdatesector(pp->posx, pp->posy, §num);
|
updatesector(pp->posx, pp->posy, §num);
|
||||||
if (sectnum != -1)
|
if (sectnum != -1)
|
||||||
pp->cursectnum = sectnum;
|
pp->cursectnum = sectnum;
|
||||||
}
|
}
|
||||||
|
@ -2178,7 +2178,7 @@ DoPlayerMove(PLAYERp pp)
|
||||||
|
|
||||||
save_cstat = pp->SpriteP->cstat;
|
save_cstat = pp->SpriteP->cstat;
|
||||||
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
||||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
clipmove(&pp->pos, &pp->cursectnum, pp->xvect, pp->yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
clipmove(&pp->pos, &pp->cursectnum, pp->xvect, pp->yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||||
pp->SpriteP->cstat = save_cstat;
|
pp->SpriteP->cstat = save_cstat;
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
|
@ -5181,12 +5181,12 @@ void FindMainSector(SECTOR_OBJECTp sop)
|
||||||
// set it to something valid
|
// set it to something valid
|
||||||
sop->op_main_sector = 0;
|
sop->op_main_sector = 0;
|
||||||
|
|
||||||
//COVERupdatesector(sx, sy, &sop->op_main_sector);
|
//updatesector(sx, sy, &sop->op_main_sector);
|
||||||
//updatesectorz(sx, sy, sop->zmid - Z(8), &sop->op_main_sector);
|
//updatesectorz(sx, sy, sop->zmid - Z(8), &sop->op_main_sector);
|
||||||
|
|
||||||
updatesectorz(sx, sy, sop->zmid, &sop->op_main_sector);
|
updatesectorz(sx, sy, sop->zmid, &sop->op_main_sector);
|
||||||
|
|
||||||
//COVERupdatesector(sx, sy, &sop->op_main_sector);
|
//updatesector(sx, sy, &sop->op_main_sector);
|
||||||
|
|
||||||
////DSPRINTF(ds,"main sector %d, zmid %d",sop->op_main_sector, sop->zmid);
|
////DSPRINTF(ds,"main sector %d, zmid %d",sop->op_main_sector, sop->zmid);
|
||||||
//MONO_PRINT(ds);
|
//MONO_PRINT(ds);
|
||||||
|
@ -5270,7 +5270,7 @@ DoPlayerBeginOperate(PLAYERp pp)
|
||||||
pp->angle.oang = pp->angle.ang = buildang(sop->ang);
|
pp->angle.oang = pp->angle.ang = buildang(sop->ang);
|
||||||
pp->posx = sop->xmid;
|
pp->posx = sop->xmid;
|
||||||
pp->posy = sop->ymid;
|
pp->posy = sop->ymid;
|
||||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
getzsofslope(pp->cursectnum, pp->posx, pp->posy, &cz, &fz);
|
getzsofslope(pp->cursectnum, pp->posx, pp->posy, &cz, &fz);
|
||||||
pp->posz = fz - PLAYER_HEIGHT;
|
pp->posz = fz - PLAYER_HEIGHT;
|
||||||
|
|
||||||
|
@ -5357,7 +5357,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
|
||||||
pp->angle.oang = pp->angle.ang = buildang(sop->ang);
|
pp->angle.oang = pp->angle.ang = buildang(sop->ang);
|
||||||
pp->posx = sop->xmid;
|
pp->posx = sop->xmid;
|
||||||
pp->posy = sop->ymid;
|
pp->posy = sop->ymid;
|
||||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
getzsofslope(pp->cursectnum, pp->posx, pp->posy, &cz, &fz);
|
getzsofslope(pp->cursectnum, pp->posx, pp->posy, &cz, &fz);
|
||||||
pp->posz = fz - PLAYER_HEIGHT;
|
pp->posz = fz - PLAYER_HEIGHT;
|
||||||
|
|
||||||
|
@ -6368,7 +6368,7 @@ void DoPlayerDeathMoveHead(PLAYERp pp)
|
||||||
|
|
||||||
// try to stay in valid area - death sometimes throws you out of the map
|
// try to stay in valid area - death sometimes throws you out of the map
|
||||||
sectnum = pp->cursectnum;
|
sectnum = pp->cursectnum;
|
||||||
COVERupdatesector(pp->posx, pp->posy, §num);
|
updatesector(pp->posx, pp->posy, §num);
|
||||||
if (sectnum < 0)
|
if (sectnum < 0)
|
||||||
{
|
{
|
||||||
pp->cursectnum = pp->lv_sectnum;
|
pp->cursectnum = pp->lv_sectnum;
|
||||||
|
@ -6584,7 +6584,7 @@ void DoPlayerDeathExplode(PLAYERp pp)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// special line for amoeba
|
// special line for amoeba
|
||||||
//COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
//updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
|
|
||||||
DoPlayerDeathCheckKick(pp);
|
DoPlayerDeathCheckKick(pp);
|
||||||
DoPlayerDeathHurl(pp);
|
DoPlayerDeathHurl(pp);
|
||||||
|
|
|
@ -54,12 +54,6 @@ SAVE save;
|
||||||
|
|
||||||
bool FAF_DebugView = false;
|
bool FAF_DebugView = false;
|
||||||
|
|
||||||
void COVERupdatesector(int32_t x, int32_t y, int16_t* newsector)
|
|
||||||
{
|
|
||||||
// ASSERT(*newsector>=0 && *newsector<MAXSECTORS);
|
|
||||||
updatesector(x,y,newsector);
|
|
||||||
}
|
|
||||||
|
|
||||||
int COVERinsertsprite(short sectnum, short stat)
|
int COVERinsertsprite(short sectnum, short stat)
|
||||||
{
|
{
|
||||||
short spnum;
|
short spnum;
|
||||||
|
|
|
@ -572,7 +572,7 @@ int DoSkelTeleport(DSWActor* actor)
|
||||||
sp->y -= 512 + RANDOM_P2(1024);
|
sp->y -= 512 + RANDOM_P2(1024);
|
||||||
|
|
||||||
setspritez(SpriteNum, &sp->pos);
|
setspritez(SpriteNum, &sp->pos);
|
||||||
//COVERupdatesector(sp->x, sp->y, &sp->sectnum);
|
//updatesector(sp->x, sp->y, &sp->sectnum);
|
||||||
|
|
||||||
if (sp->sectnum != -1)
|
if (sp->sectnum != -1)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -5030,7 +5030,7 @@ DropAhead(short SpriteNum, short min_height)
|
||||||
day = sp->y + MOVEy(256, sp->ang);
|
day = sp->y + MOVEy(256, sp->ang);
|
||||||
|
|
||||||
newsector = sp->sectnum;
|
newsector = sp->sectnum;
|
||||||
COVERupdatesector(dax, day, &newsector);
|
updatesector(dax, day, &newsector);
|
||||||
|
|
||||||
// look straight down for a drop
|
// look straight down for a drop
|
||||||
if (ActorDrop(SpriteNum, dax, day, sp->z, newsector, min_height))
|
if (ActorDrop(SpriteNum, dax, day, sp->z, newsector, min_height))
|
||||||
|
|
|
@ -253,7 +253,7 @@ ActorFindTrack(short SpriteNum, int8_t player_dir, int track_type, short *track_
|
||||||
if (near_dist < 15000)
|
if (near_dist < 15000)
|
||||||
{
|
{
|
||||||
// get the sector number of the point
|
// get the sector number of the point
|
||||||
COVERupdatesector(near_tp->x, near_tp->y, &track_sect);
|
updatesector(near_tp->x, near_tp->y, &track_sect);
|
||||||
|
|
||||||
// if can see the point, return the track number
|
// if can see the point, return the track number
|
||||||
if (FAFcansee(sp->x, sp->y, sp->z - Z(16), sp->sectnum, near_tp->x, near_tp->y, sector[track_sect].floorz - Z(32), track_sect))
|
if (FAFcansee(sp->x, sp->y, sp->z - Z(16), sp->sectnum, near_tp->x, near_tp->y, sector[track_sect].floorz - Z(32), track_sect))
|
||||||
|
@ -1672,7 +1672,7 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
||||||
|
|
||||||
// THIS WAS CAUSING PROLEMS!!!!
|
// THIS WAS CAUSING PROLEMS!!!!
|
||||||
// Sectors are still being manipulated so you can end up in a void (-1) sector
|
// Sectors are still being manipulated so you can end up in a void (-1) sector
|
||||||
//COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
//updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
|
|
||||||
// New angle is formed by taking last known angle and
|
// New angle is formed by taking last known angle and
|
||||||
// adjusting by the delta angle
|
// adjusting by the delta angle
|
||||||
|
@ -1709,7 +1709,7 @@ MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
|
||||||
sop->sp_child->x = sop->xmid;
|
sop->sp_child->x = sop->xmid;
|
||||||
sop->sp_child->y = sop->ymid;
|
sop->sp_child->y = sop->ymid;
|
||||||
|
|
||||||
//COVERupdatesector(sop->xmid, sop->ymid, &sop->sectnum);
|
//updatesector(sop->xmid, sop->ymid, &sop->sectnum);
|
||||||
|
|
||||||
// setting floorz if need be
|
// setting floorz if need be
|
||||||
//if (!TEST(sop->flags, SOBJ_SPRITE_OBJ))
|
//if (!TEST(sop->flags, SOBJ_SPRITE_OBJ))
|
||||||
|
@ -1895,7 +1895,7 @@ PlayerPart:
|
||||||
// prevents you from falling into map HOLEs created by moving
|
// prevents you from falling into map HOLEs created by moving
|
||||||
// Sectors and sprites around.
|
// Sectors and sprites around.
|
||||||
//if (sop->xmid < MAXSO)
|
//if (sop->xmid < MAXSO)
|
||||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
updatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
|
|
||||||
// in case you are in a whirlpool
|
// in case you are in a whirlpool
|
||||||
// move perfectly with the ride in the z direction
|
// move perfectly with the ride in the z direction
|
||||||
|
|
|
@ -12831,7 +12831,7 @@ DoSerpRing(DSWActor* actor)
|
||||||
if ((dist < 18000 && (RANDOM_P2(2048<<5)>>5) < 16) || User[sp->owner]->Counter < 4)
|
if ((dist < 18000 && (RANDOM_P2(2048<<5)>>5) < 16) || User[sp->owner]->Counter < 4)
|
||||||
{
|
{
|
||||||
short sectnum = sp->sectnum;
|
short sectnum = sp->sectnum;
|
||||||
COVERupdatesector(sp->x,sp->y,§num);
|
updatesector(sp->x,sp->y,§num);
|
||||||
|
|
||||||
// if (valid sector and can see target)
|
// if (valid sector and can see target)
|
||||||
if (sectnum != -1 && CanSeePlayer(Weapon))
|
if (sectnum != -1 && CanSeePlayer(Weapon))
|
||||||
|
|
Loading…
Reference in a new issue