mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
SW: setsprite, setspritez, getzrange, clipmove, pushmove, neartag, dragpoint, screencapture, md_tilehasmodel, preparemirror, saveboard, loadboard, pos
git-svn-id: https://svn.eduke32.com/eduke32@5201 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
56bdcdae7e
commit
acba32caf4
24 changed files with 177 additions and 162 deletions
|
@ -1439,6 +1439,56 @@ extern const int32_t engine_v8;
|
|||
int32_t Mulscale(int32_t a, int32_t b, int32_t sh);
|
||||
#endif
|
||||
|
||||
static inline int32_t clipmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist,
|
||||
int32_t ceildist, int32_t flordist, uint32_t cliptype) ATTRIBUTE((nonnull(1,2,3,4)));
|
||||
|
||||
static inline int32_t clipmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist,
|
||||
int32_t ceildist, int32_t flordist, uint32_t cliptype)
|
||||
{
|
||||
vec3_t vector = { *x, *y, *z };
|
||||
|
||||
int32_t result = clipmove(&vector, sectnum, xvect, yvect, walldist, ceildist, flordist, cliptype);
|
||||
|
||||
*x = vector.x;
|
||||
*y = vector.y;
|
||||
*z = vector.z;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int32_t pushmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t walldist,
|
||||
int32_t ceildist, int32_t flordist, uint32_t cliptype) ATTRIBUTE((nonnull(1,2,3,4)));
|
||||
|
||||
static inline int32_t pushmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t walldist,
|
||||
int32_t ceildist, int32_t flordist, uint32_t cliptype)
|
||||
{
|
||||
vec3_t vector = { *x, *y, *z };
|
||||
|
||||
int32_t result = pushmove(&vector, sectnum, walldist, ceildist, flordist, cliptype);
|
||||
|
||||
*x = vector.x;
|
||||
*y = vector.y;
|
||||
*z = vector.z;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline void getzrange_old(int32_t x, int32_t y, int32_t z, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz,
|
||||
int32_t *florhit, int32_t walldist, uint32_t cliptype) ATTRIBUTE((nonnull(5,6,7,8)));
|
||||
|
||||
static inline void getzrange_old(int32_t x, int32_t y, int32_t z, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz,
|
||||
int32_t *florhit, int32_t walldist, uint32_t cliptype)
|
||||
{
|
||||
const vec3_t vector = { x, y, z };
|
||||
getzrange(&vector, sectnum, ceilz, ceilhit, florz, florhit, walldist, cliptype);
|
||||
}
|
||||
|
||||
static inline int32_t setspritez_old(int16_t spritenum, int32_t x, int32_t y, int32_t z)
|
||||
{
|
||||
const vec3_t vector = { x, y, z };
|
||||
return setspritez(spritenum, &vector);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -560,7 +560,7 @@ int DoActorOperate(short SpriteNum)
|
|||
{
|
||||
neartag(sp->x, sp->y, z[i], sp->sectnum, sp->ang,
|
||||
&nearsector, &nearwall, &nearsprite,
|
||||
&nearhitdist, 1024L, NTAG_SEARCH_LO_HI);
|
||||
&nearhitdist, 1024L, NTAG_SEARCH_LO_HI, NULL);
|
||||
|
||||
//DSPRINTF(ds,"nearsector = %d, nearwall = %d, nearsprite = %d hitdist == %ld\n",nearsector,nearwall,nearsprite,nearhitdist);
|
||||
//MONO_PRINT(ds);
|
||||
|
|
|
@ -34,10 +34,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "game.h"
|
||||
|
||||
|
||||
extern int posx, posy, posz;
|
||||
extern short cursectnum;
|
||||
extern short ang;
|
||||
extern int horiz;
|
||||
extern int qsetmode;
|
||||
|
||||
SWBOOL FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum);
|
||||
|
@ -103,7 +99,7 @@ void ToggleFAF(void)
|
|||
|
||||
if (FAFon && qsetmode == 200)
|
||||
{
|
||||
DrawOverlapRoom(posx, posy, posz, ang, horiz, cursectnum);
|
||||
DrawOverlapRoom(pos.x, pos.y, pos.z, ang, horiz, cursectnum);
|
||||
|
||||
// make it so that you can edit both areas in 3D
|
||||
// back up vars after the first drawrooms
|
||||
|
@ -121,9 +117,9 @@ void ToggleFAF(void)
|
|||
short i;
|
||||
keystatus[KEYSC_4] = FALSE;
|
||||
|
||||
tx = posx;
|
||||
ty = posy;
|
||||
tz = posz;
|
||||
tx = pos.x;
|
||||
ty = pos.y;
|
||||
tz = pos.z;
|
||||
tsectnum = cursectnum;
|
||||
|
||||
save.zcount = 0;
|
||||
|
@ -136,10 +132,10 @@ void ToggleFAF(void)
|
|||
FindCeilingView(match, &tx, &ty, tz, &tsectnum);
|
||||
FAF_DontMoveSectors = FALSE;
|
||||
|
||||
posx = tx;
|
||||
posy = ty;
|
||||
pos.x = tx;
|
||||
pos.y = ty;
|
||||
cursectnum = tsectnum;
|
||||
posz = sector[cursectnum].floorz - Z(20);
|
||||
pos.z = sector[cursectnum].floorz - Z(20);
|
||||
}
|
||||
else if (sector[cursectnum].floorpicnum == FAF_MIRROR_PIC)
|
||||
{
|
||||
|
@ -149,10 +145,10 @@ void ToggleFAF(void)
|
|||
FindFloorView(match, &tx, &ty, tz, &tsectnum);
|
||||
FAF_DontMoveSectors = FALSE;
|
||||
|
||||
posx = tx;
|
||||
posy = ty;
|
||||
pos.x = tx;
|
||||
pos.y = ty;
|
||||
cursectnum = tsectnum;
|
||||
posz = sector[cursectnum].ceilingz + Z(20);
|
||||
pos.z = sector[cursectnum].ceilingz + Z(20);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -692,7 +688,7 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
|
|||
|
||||
if (tsectnum < 0)
|
||||
{
|
||||
sprintf(ds,"COULD NOT FIND TAGGED LEVEL2 SECTOR FROM X %d, Y %d, SECTNUM %d.",posx,posy,cursectnum);
|
||||
sprintf(ds,"COULD NOT FIND TAGGED LEVEL2 SECTOR FROM X %d, Y %d, SECTNUM %d.",pos.x,pos.y,cursectnum);
|
||||
Message(ds, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -717,7 +713,7 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
|
|||
|
||||
if (tsectnum < 0)
|
||||
{
|
||||
sprintf(ds,"COULD NOT FIND TAGGED LEVEL1 SECTOR FROM X %d, Y %d, SECTNUM %d.",posx,posy,cursectnum);
|
||||
sprintf(ds,"COULD NOT FIND TAGGED LEVEL1 SECTOR FROM X %d, Y %d, SECTNUM %d.",pos.x,pos.y,cursectnum);
|
||||
Message(ds, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -245,8 +245,8 @@ void EveryCheatToggle(PLAYERp pp, char *cheat_string)
|
|||
|
||||
void SaveCheat(PLAYERp pp, char *UNUSED(cheat_string))
|
||||
{
|
||||
saveboard("swsave.map", &pp->posx, &pp->posy, &pp->posz,
|
||||
&pp->pang, &pp->cursectnum);
|
||||
saveboard("swsave.map", (vec3_t *)pp,
|
||||
pp->pang, pp->cursectnum);
|
||||
}
|
||||
|
||||
void GeorgeFunc(PLAYERp pp, char *UNUSED(cheat_string))
|
||||
|
|
|
@ -473,7 +473,7 @@ DemoPlayBack(void)
|
|||
if (KEY_PRESSED(KEYSC_ALT) && KEY_PRESSED(KEYSC_CTRL) && KEY_PRESSED(KEYSC_S))
|
||||
{
|
||||
KEY_PRESSED(KEYSC_ALT) = KEY_PRESSED(KEYSC_CTRL) = KEY_PRESSED(KEYSC_S) = 0;
|
||||
saveboard("demosave.map", &Player->posx, &Player->posy, &Player->posz, &Player->pang, &Player->cursectnum);
|
||||
saveboard("demosave.map", (vec3_t *)Player, &Player->pang, &Player->cursectnum);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1104,7 +1104,7 @@ ViewOutsidePlayerRecurse(PLAYERp pp, int32_t* vx, int32_t* vy, int32_t* vz, int1
|
|||
nx = sintable[NORM_ANGLE(*ang + 512 + 1024)] << 11;
|
||||
ny = sintable[NORM_ANGLE(*ang + 1024)] << 11;
|
||||
|
||||
ret = clipmove(vx, vy, vz, vsectnum, nx, ny, 64L, 4 << 8, 4 << 8, CLIPMASK_PLAYER);
|
||||
ret = clipmove_old(vx, vy, vz, vsectnum, nx, ny, 64L, 4 << 8, 4 << 8, CLIPMASK_PLAYER);
|
||||
|
||||
switch (TEST(ret, HIT_MASK))
|
||||
{
|
||||
|
@ -1676,7 +1676,7 @@ void ScreenCaptureKeys(void)
|
|||
{
|
||||
KEY_PRESSED(KEYSC_F12) = 0;
|
||||
PauseAction();
|
||||
screencapture("swcpxxxx.pcx", KEY_PRESSED(KEYSC_LSHIFT) | KEY_PRESSED(KEYSC_LSHIFT));
|
||||
screencapture("swcpxxxx.pcx", KEY_PRESSED(KEYSC_LSHIFT) | KEY_PRESSED(KEYSC_LSHIFT), "EDuke32");
|
||||
ResumeAction();
|
||||
PutStringInfo(Player + myconnectindex, "Screen Captured");
|
||||
}
|
||||
|
|
|
@ -734,7 +734,7 @@ LoadLevel(char *filename)
|
|||
{
|
||||
int pos;
|
||||
|
||||
if (loadboard(filename, SW_SHAREWARE ? 1 : 0, &Player[0].posx, &Player[0].posy, &Player[0].posz, &Player[0].pang, &Player[0].cursectnum) == -1)
|
||||
if (loadboard(filename, SW_SHAREWARE ? 1 : 0, (vec3_t *)&Player[0], &Player[0].pang, &Player[0].cursectnum) == -1)
|
||||
{
|
||||
TerminateGame();
|
||||
#ifdef RENDERTYPEWIN
|
||||
|
|
|
@ -1066,7 +1066,7 @@ typedef struct
|
|||
struct PLAYERstruct
|
||||
{
|
||||
// variable that fit in the sprite or user structure
|
||||
int posx, posy, posz;
|
||||
int32_t posx, posy, posz;
|
||||
// interpolation
|
||||
int
|
||||
oposx, oposy, oposz;
|
||||
|
|
|
@ -125,10 +125,6 @@ char keys[NUMBUILDKEYS] =
|
|||
|
||||
extern short pointhighlight, linehighlight;
|
||||
extern short defaultspritecstat;
|
||||
extern int posx, posy, posz;
|
||||
extern short cursectnum;
|
||||
extern short ang;
|
||||
extern int horiz;
|
||||
extern short asksave;
|
||||
short ExtSectorTag[MAXSECTORS][4];
|
||||
static char tempbuf[256];
|
||||
|
@ -2726,14 +2722,14 @@ DrawClipBox(short spritenum)
|
|||
|
||||
if (sprite[spritenum].hitag == SO_CLIP_BOX)
|
||||
{
|
||||
x = mulscale14(sprite[spritenum].x - posx, zoom);
|
||||
y = mulscale14(sprite[spritenum].y - posy, zoom);
|
||||
x = mulscale14(sprite[spritenum].x - pos.x, zoom);
|
||||
y = mulscale14(sprite[spritenum].y - pos.y, zoom);
|
||||
}
|
||||
else if (sprite[spritenum].hitag == SECT_SO_CLIP_DIST)
|
||||
{
|
||||
SectorMidPoint(sprite[spritenum].sectnum,&x, &y, &z);
|
||||
x = mulscale14(x - posx, zoom);
|
||||
y = mulscale14(y - posy, zoom);
|
||||
x = mulscale14(x - pos.x, zoom);
|
||||
y = mulscale14(y - pos.y, zoom);
|
||||
}
|
||||
|
||||
x += 320;
|
||||
|
@ -3410,9 +3406,9 @@ FindSprite(short picnum, short findspritenum)
|
|||
{
|
||||
SET(sp->extra, SPRX_FOUND);
|
||||
cursectnum = sp->sectnum;
|
||||
posx = sp->x;
|
||||
posy = sp->y;
|
||||
posz = sp->z - kensplayerheight;
|
||||
pos.x = sp->x;
|
||||
pos.y = sp->y;
|
||||
pos.z = sp->z - kensplayerheight;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3470,9 +3466,9 @@ FindNextSprite(short picnum)
|
|||
{
|
||||
SET(sp->extra, SPRX_FOUND);
|
||||
cursectnum = sp->sectnum;
|
||||
posx = sp->x;
|
||||
posy = sp->y;
|
||||
posz = sp->z - kensplayerheight;
|
||||
pos.x = sp->x;
|
||||
pos.y = sp->y;
|
||||
pos.z = sp->z - kensplayerheight;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -815,11 +815,11 @@ void computergetinput(int snum, SW_PACKET *syn)
|
|||
#endif
|
||||
|
||||
x3 = p->posx; y3 = p->posy; z3 = p->posz; dasect = p->cursectnum;
|
||||
i = clipmove(&x3,&y3,&z3,&dasect,p->xvect,p->yvect,164L,4L<<8,4L<<8,CLIPMASK0);
|
||||
i = clipmove_old(&x3,&y3,&z3,&dasect,p->xvect,p->yvect,164L,4L<<8,4L<<8,CLIPMASK0);
|
||||
if (!i)
|
||||
{
|
||||
x3 = p->posx; y3 = p->posy; z3 = p->posz+(24<<8); dasect = p->cursectnum;
|
||||
i = clipmove(&x3,&y3,&z3,&dasect,p->xvect,p->yvect,164L,4L<<8,4L<<8,CLIPMASK0);
|
||||
i = clipmove_old(&x3,&y3,&z3,&dasect,p->xvect,p->yvect,164L,4L<<8,4L<<8,CLIPMASK0);
|
||||
}
|
||||
if (i)
|
||||
{
|
||||
|
|
|
@ -80,7 +80,7 @@ void
|
|||
SpawnWallSound(short sndnum, short i)
|
||||
{
|
||||
short SpriteNum;
|
||||
int midx, midy, midz;
|
||||
vec3_t mid;
|
||||
SPRITEp sp;
|
||||
int handle;
|
||||
|
||||
|
@ -92,10 +92,10 @@ SpawnWallSound(short sndnum, short i)
|
|||
sp->cstat = 0;
|
||||
sp->extra = 0;
|
||||
// Get wall midpoint for offset in mirror view
|
||||
midx = (wall[i].x + wall[wall[i].point2].x) / 2;
|
||||
midy = (wall[i].y + wall[wall[i].point2].y) / 2;
|
||||
midz = (sector[wall[i].nextsector].ceilingz + sector[wall[i].nextsector].floorz) / 2;
|
||||
setspritez(SpriteNum, midx, midy, midz);
|
||||
mid.x = (wall[i].x + wall[wall[i].point2].x) / 2;
|
||||
mid.y = (wall[i].y + wall[wall[i].point2].y) / 2;
|
||||
mid.z = (sector[wall[i].nextsector].ceilingz + sector[wall[i].nextsector].floorz) / 2;
|
||||
setspritez(SpriteNum, &mid);
|
||||
sp = &sprite[SpriteNum];
|
||||
|
||||
handle = PlaySound(sndnum, &sp->x, &sp->y, &sp->z, v3df_dontpan | v3df_doppler);
|
||||
|
@ -890,8 +890,8 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
|||
// Must call preparemirror before drawrooms and
|
||||
// completemirror after drawrooms
|
||||
|
||||
preparemirror(tx, ty, tz, tpang, tphoriz,
|
||||
mirror[cnt].mirrorwall, mirror[cnt].mirrorsector, &tposx, &tposy, &tang);
|
||||
preparemirror(tx, ty, /*tz,*/ tpang, /*tphoriz,*/
|
||||
mirror[cnt].mirrorwall, /*mirror[cnt].mirrorsector,*/ &tposx, &tposy, &tang);
|
||||
|
||||
drawrooms(tposx, tposy, tz, tang, tphoriz, mirror[cnt].mirrorsector + MAXSECTORS);
|
||||
|
||||
|
@ -1082,7 +1082,7 @@ JAnalyzeSprites(SPRITEp tspr)
|
|||
// Take care of autosizing
|
||||
DoAutoSize(tspr);
|
||||
|
||||
if (getrendermode() == 3 && md_tilehasmodel(tspr->picnum) >= 0 && usemodels) return;
|
||||
if (getrendermode() == 3 && md_tilehasmodel(tspr->picnum, 0) >= 0 && usemodels) return;
|
||||
|
||||
// Check for voxels
|
||||
//if (bVoxelsOn)
|
||||
|
|
|
@ -2215,7 +2215,7 @@ DoCarryFlag(int16_t Weapon)
|
|||
{
|
||||
SPRITEp ap = &sprite[u->Attach];
|
||||
|
||||
setspritez(Weapon, ap->x, ap->y, SPRITEp_MID(ap));
|
||||
setspritez_old(Weapon, ap->x, ap->y, SPRITEp_MID(ap));
|
||||
sp->ang = NORM_ANGLE(ap->ang + 1536);
|
||||
}
|
||||
|
||||
|
@ -2374,7 +2374,7 @@ DoCarryFlagNoDet(int16_t Weapon)
|
|||
{
|
||||
SPRITEp ap = &sprite[u->Attach];
|
||||
|
||||
setspritez(Weapon, ap->x, ap->y, SPRITEp_MID(ap));
|
||||
setspritez_old(Weapon, ap->x, ap->y, SPRITEp_MID(ap));
|
||||
sp->ang = NORM_ANGLE(ap->ang + 1536);
|
||||
sp->z = ap->z - DIV2(SPRITEp_SIZE_Z(ap));
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
oy[i] = y[i] = pp->posy + (sop->clipbox_vdist[i] * sintable[ang] >> 14);
|
||||
|
||||
// move the box
|
||||
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret[i] = clipmove_old(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
// save the dist moved
|
||||
dist = FindDistance2D(x[i] - ox[i], y[i] - oy[i]);
|
||||
|
@ -103,9 +103,9 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
oy[i] = y[i] = pp->posy + (sop->clipbox_vdist[i] * sintable[ang] >> 14);
|
||||
|
||||
// move the box
|
||||
//pushmove(&x[i], &y[i], &z, &pp->cursectnum, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
//pushmove(&x[i], &y[i], &z, &pp->cursectnum, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
//pushmove_old(&x[i], &y[i], &z, &pp->cursectnum, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret[i] = clipmove_old(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
//pushmove_old(&x[i], &y[i], &z, &pp->cursectnum, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
// save the dist moved
|
||||
dist = FindDistance2D(x[i] - ox[i], y[i] - oy[i]);
|
||||
|
@ -156,14 +156,14 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
|
||||
xvect = (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)]);
|
||||
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||
ret_start = clipmove(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret_start = clipmove_old(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
// save off the start position
|
||||
ox[i] = x[i] = xs;
|
||||
oy[i] = y[i] = ys;
|
||||
|
||||
// move the box
|
||||
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret[i] = clipmove_old(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
// save the dist moved
|
||||
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||
|
@ -222,7 +222,7 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
|
||||
xvect = (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)]);
|
||||
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||
ret_start = clipmove(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret_start = clipmove_old(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
if (ret_start)
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
oy[i] = y[i] = ys;
|
||||
|
||||
// move the box
|
||||
ret[i] = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret[i] = clipmove_old(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
// save the dist moved
|
||||
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||
|
@ -306,7 +306,7 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
xvect = (sop->clipbox_vdist[i] * sintable[NORM_ANGLE(ang + 512)]);
|
||||
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||
clipmoveboxtracenum = 1;
|
||||
ret_start = clipmove(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret_start = clipmove_old(&xs, &ys, &z, &pp->cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
clipmoveboxtracenum = 3;
|
||||
|
||||
if (ret_start)
|
||||
|
@ -340,7 +340,7 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
oy[i] = y[i] = ys;
|
||||
|
||||
// move the box
|
||||
ret = clipmove(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret = clipmove_old(&x[i], &y[i], &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
// save the dist moved
|
||||
dist = ksqrt(SQ(x[i] - ox[i]) + SQ(y[i] - oy[i]));
|
||||
|
@ -386,7 +386,7 @@ short MultiClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist)
|
|||
yvect = (sop->clipbox_vdist[i] * sintable[ang]);
|
||||
|
||||
// move the box
|
||||
ret = clipmove(&x, &y, &z, &cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret = clipmove_old(&x, &y, &z, &cursectnum, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
ASSERT(cursectnum >= 0);
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ MorphTornado(SECTOR_OBJECTp sop)
|
|||
sop->morph_ang = RANDOM_P2(2048);
|
||||
|
||||
// move it x,y
|
||||
dragpoint(sop->morph_wall_point, mx, my);
|
||||
dragpoint(sop->morph_wall_point, mx, my, 0);
|
||||
|
||||
// bound the Z
|
||||
ceilingz = sector[sop->op_main_sector].ceilingz;
|
||||
|
@ -425,7 +425,7 @@ MorphFloor(SECTOR_OBJECTp sop)
|
|||
sop->morph_ang = RANDOM_P2(2048);
|
||||
|
||||
// move x,y point "just like in build"
|
||||
dragpoint(sop->morph_wall_point, mx, my);
|
||||
dragpoint(sop->morph_wall_point, mx, my, 0);
|
||||
|
||||
// bound the Z
|
||||
floorz = sector[sop->op_main_sector].floorz;
|
||||
|
|
|
@ -1390,7 +1390,7 @@ DoSpawnTeleporterEffect(SPRITEp sp)
|
|||
ep = &sprite[effect];
|
||||
eu = User[effect];
|
||||
|
||||
setspritez(effect, ep->x, ep->y, ep->z);
|
||||
setspritez(effect, (vec3_t *)ep);
|
||||
|
||||
ep->shade = -40;
|
||||
ep->xrepeat = ep->yrepeat = 42;
|
||||
|
@ -1417,7 +1417,7 @@ DoSpawnTeleporterEffectPlace(SPRITEp sp)
|
|||
ep = &sprite[effect];
|
||||
eu = User[effect];
|
||||
|
||||
setspritez(effect, ep->x, ep->y, ep->z);
|
||||
setspritez(effect, (vec3_t *)ep);
|
||||
|
||||
ep->shade = -40;
|
||||
ep->xrepeat = ep->yrepeat = 42;
|
||||
|
@ -2316,7 +2316,7 @@ DoPlayerSlide(PLAYERp pp)
|
|||
if (labs(pp->slide_xvect) < 12800 && labs(pp->slide_yvect) < 12800)
|
||||
pp->slide_xvect = pp->slide_yvect = 0;
|
||||
|
||||
push_ret = pushmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
push_ret = pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
if (push_ret < 0)
|
||||
{
|
||||
if (!TEST(pp->Flags, PF_DEAD))
|
||||
|
@ -2329,9 +2329,9 @@ DoPlayerSlide(PLAYERp pp)
|
|||
}
|
||||
return;
|
||||
}
|
||||
ret = clipmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, pp->slide_xvect, pp->slide_yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
ret = clipmove((vec3_t *)pp, &pp->cursectnum, pp->slide_xvect, pp->slide_yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
PlayerCheckValidMove(pp);
|
||||
push_ret = pushmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
push_ret = pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
if (push_ret < 0)
|
||||
{
|
||||
if (!TEST(pp->Flags, PF_DEAD))
|
||||
|
@ -2643,7 +2643,7 @@ DoPlayerMove(PLAYERp pp)
|
|||
}
|
||||
else
|
||||
{
|
||||
push_ret = pushmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist - Z(16), CLIPMASK_PLAYER);
|
||||
push_ret = pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist - Z(16), CLIPMASK_PLAYER);
|
||||
|
||||
if (push_ret < 0)
|
||||
{
|
||||
|
@ -2660,11 +2660,11 @@ DoPlayerMove(PLAYERp pp)
|
|||
save_cstat = pp->SpriteP->cstat;
|
||||
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||
ret = clipmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, pp->xvect, pp->yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
ret = clipmove((vec3_t *)pp, &pp->cursectnum, pp->xvect, pp->yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
pp->SpriteP->cstat = save_cstat;
|
||||
PlayerCheckValidMove(pp);
|
||||
|
||||
push_ret = pushmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist - Z(16), CLIPMASK_PLAYER);
|
||||
push_ret = pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist - Z(16), CLIPMASK_PLAYER);
|
||||
if (push_ret < 0)
|
||||
{
|
||||
|
||||
|
@ -2894,7 +2894,7 @@ DoPlayerMoveBoat(PLAYERp pp)
|
|||
pp->cursectnum = pp->sop->op_main_sector; // for speed
|
||||
|
||||
floor_dist = labs(z - pp->sop->floor_loz);
|
||||
ret = clipmove(&pp->posx, &pp->posy, &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)pp->sop->clipdist, Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
ret = clipmove_old(&pp->posx, &pp->posy, &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)pp->sop->clipdist, Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
|
||||
OperateSectorObject(pp->sop, pp->pang, pp->posx, pp->posy);
|
||||
pp->cursectnum = save_sectnum; // for speed
|
||||
|
@ -3391,7 +3391,7 @@ DoPlayerMoveTank(PLAYERp pp)
|
|||
save_cstat = pp->SpriteP->cstat;
|
||||
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
||||
if (pp->sop->clipdist)
|
||||
u->ret = clipmove(&pp->posx, &pp->posy, &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)pp->sop->clipdist, Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
u->ret = clipmove_old(&pp->posx, &pp->posy, &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)pp->sop->clipdist, Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||
else
|
||||
u->ret = MultiClipMove(pp, z, floor_dist);
|
||||
pp->SpriteP->cstat = save_cstat;
|
||||
|
@ -4063,7 +4063,7 @@ DoPlayerClimb(PLAYERp pp)
|
|||
neartag(pp->posx, pp->posy, pp->posz,
|
||||
pp->cursectnum, pp->pang,
|
||||
&sec, &wal, &spr,
|
||||
&dist, 800L, NTAG_SEARCH_LO_HI);
|
||||
&dist, 800L, NTAG_SEARCH_LO_HI, NULL);
|
||||
|
||||
if (wal >= 0)
|
||||
{
|
||||
|
@ -4559,7 +4559,7 @@ PlayerOnLadder(PLAYERp pp)
|
|||
|
||||
neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->pang,
|
||||
&neartagsector, &neartagwall, &neartagsprite,
|
||||
&neartaghitdist, 1024L+768L, NTAG_SEARCH_LO_HI);
|
||||
&neartaghitdist, 1024L+768L, NTAG_SEARCH_LO_HI, NULL);
|
||||
|
||||
dir = DOT_PRODUCT_2D(pp->xvect, pp->yvect, sintable[NORM_ANGLE(pp->pang+512)], sintable[pp->pang]);
|
||||
|
||||
|
@ -4573,7 +4573,7 @@ PlayerOnLadder(PLAYERp pp)
|
|||
{
|
||||
neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, NORM_ANGLE(pp->pang + angles[i]),
|
||||
&sec, &wal, &spr,
|
||||
&dist, 600L, NTAG_SEARCH_LO_HI);
|
||||
&dist, 600L, NTAG_SEARCH_LO_HI, NULL);
|
||||
|
||||
if (wal < 0 || dist < 100 || wall[wal].lotag != TAG_WALL_CLIMB)
|
||||
return FALSE;
|
||||
|
@ -5514,7 +5514,7 @@ DoPlayerCurrent(PLAYERp pp)
|
|||
xvect = sectu->speed * synctics * (int) sintable[NORM_ANGLE(sectu->ang + 512)] >> 4;
|
||||
yvect = sectu->speed * synctics * (int) sintable[sectu->ang] >> 4;
|
||||
|
||||
push_ret = pushmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
push_ret = pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
if (push_ret < 0)
|
||||
{
|
||||
if (!TEST(pp->Flags, PF_DEAD))
|
||||
|
@ -5529,9 +5529,9 @@ DoPlayerCurrent(PLAYERp pp)
|
|||
}
|
||||
return;
|
||||
}
|
||||
clipmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, xvect, yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
clipmove((vec3_t *)pp, &pp->cursectnum, xvect, yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
PlayerCheckValidMove(pp);
|
||||
pushmove(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||
if (push_ret < 0)
|
||||
{
|
||||
if (!TEST(pp->Flags, PF_DEAD))
|
||||
|
|
|
@ -526,13 +526,13 @@ void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,
|
|||
// early out to regular routine
|
||||
if (!FAF_ConnectArea(sectnum))
|
||||
{
|
||||
getzrange(x, y, z, sectnum, hiz, ceilhit, loz, florhit, clipdist, clipmask);
|
||||
getzrange_old(x, y, z, sectnum, hiz, ceilhit, loz, florhit, clipdist, clipmask);
|
||||
SectorZadjust(*ceilhit, hiz, *florhit, loz);
|
||||
WaterAdjust(*florhit, loz);
|
||||
return;
|
||||
}
|
||||
|
||||
getzrange(x, y, z, sectnum, hiz, ceilhit, loz, florhit, clipdist, clipmask);
|
||||
getzrange_old(x, y, z, sectnum, hiz, ceilhit, loz, florhit, clipdist, clipmask);
|
||||
SkipFAFcheck = SectorZadjust(*ceilhit, hiz, *florhit, loz);
|
||||
WaterAdjust(*florhit, loz);
|
||||
|
||||
|
@ -553,7 +553,7 @@ void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,
|
|||
updatesectorz(x, y, newz, &uppersect);
|
||||
if (uppersect < 0)
|
||||
_ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d", x, y, newz);
|
||||
getzrange(x, y, newz, uppersect, hiz, ceilhit, &foo1, &foo2, clipdist, clipmask);
|
||||
getzrange_old(x, y, newz, uppersect, hiz, ceilhit, &foo1, &foo2, clipdist, clipmask);
|
||||
SectorZadjust(*ceilhit, hiz, -1, NULL);
|
||||
}
|
||||
else if (FAF_ConnectFloor(sectnum) && !TEST(sector[sectnum].floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN))
|
||||
|
@ -576,7 +576,7 @@ void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,
|
|||
updatesectorz(x, y, newz, &lowersect);
|
||||
if (lowersect < 0)
|
||||
_ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d", x, y, newz);
|
||||
getzrange(x, y, newz, lowersect, &foo1, &foo2, loz, florhit, clipdist, clipmask);
|
||||
getzrange_old(x, y, newz, lowersect, &foo1, &foo2, loz, florhit, clipdist, clipmask);
|
||||
SectorZadjust(-1, NULL, *florhit, loz);
|
||||
WaterAdjust(*florhit, loz);
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ int DoRotatorMove(short SpriteNum)
|
|||
r->origx[ndx], r->origy[ndx],
|
||||
r->pos, &nx, &ny);
|
||||
|
||||
dragpoint(w, nx, ny);
|
||||
dragpoint(w, nx, ny, 0);
|
||||
ndx++;
|
||||
}
|
||||
|
||||
|
|
|
@ -1148,7 +1148,7 @@ SectorExp(short SpriteNum, short sectnum, short orig_ang, int zh)
|
|||
|
||||
// setup vars needed by SectorExp
|
||||
changespritesect(SpriteNum, sectnum);
|
||||
//setspritez(SpriteNum, sp->x, sp->y, sp->z);
|
||||
//setspritez(SpriteNum, (vec3_t *)sp);
|
||||
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
|
||||
|
||||
// spawn explosion
|
||||
|
@ -1261,7 +1261,7 @@ DoSpawnSpotsForKill(short match)
|
|||
change_sprite_stat(sn, STAT_NO_STATE);
|
||||
u->ActorActionFunc = DoSpawnSpot;
|
||||
u->WaitTics = SP_TAG5(sp) * 15;
|
||||
setspritez(sn, sp->x, sp->y, sp->z);
|
||||
setspritez(sn, (vec3_t *)sp);
|
||||
// setting for Killed
|
||||
u->LastDamage = 1;
|
||||
}
|
||||
|
@ -2438,7 +2438,7 @@ SWBOOL NearThings(PLAYERp pp)
|
|||
|
||||
neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->pang,
|
||||
&neartagsect, &neartagwall, &neartagsprite,
|
||||
&neartaghitdist, 1024L, NTAG_SEARCH_LO_HI);
|
||||
&neartaghitdist, 1024L, NTAG_SEARCH_LO_HI, NULL);
|
||||
|
||||
|
||||
// hit a sprite? Check to see if it has sound info in it!
|
||||
|
@ -2540,7 +2540,7 @@ NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int coun
|
|||
|
||||
neartag(pp->posx, pp->posy, z, pp->cursectnum, pp->pang,
|
||||
&neartagsector, &neartagwall, &neartagsprite,
|
||||
&neartaghitdist, dist, type);
|
||||
&neartaghitdist, dist, type, NULL);
|
||||
|
||||
if (neartagsector >= 0)
|
||||
{
|
||||
|
@ -2953,13 +2953,13 @@ DoSineWaveWall(void)
|
|||
{
|
||||
new = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
|
||||
// wall[sw->wall].y = new;
|
||||
dragpoint(sw->wall, wall[sw->wall].x, new);
|
||||
dragpoint(sw->wall, wall[sw->wall].x, new, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
new = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
|
||||
// wall[sw->wall].x = new;
|
||||
dragpoint(sw->wall, new, wall[sw->wall].y);
|
||||
dragpoint(sw->wall, new, wall[sw->wall].y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -568,7 +568,7 @@ int DoSkelTeleport(short SpriteNum)
|
|||
else
|
||||
sp->y -= 512 + RANDOM_P2(1024);
|
||||
|
||||
setspritez(SpriteNum, sp->x, sp->y, sp->z);
|
||||
setspritez(SpriteNum, (vec3_t *)sp);
|
||||
//COVERupdatesector(sp->x, sp->y, &sp->sectnum);
|
||||
|
||||
if (sp->sectnum != -1)
|
||||
|
|
|
@ -405,8 +405,8 @@ int DoSlidorMoveWalls(short SpriteNum, int amt)
|
|||
else
|
||||
{
|
||||
// red wall - move 2 points
|
||||
dragpoint(w, wall[w].x - amt, wall[w].y);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x - amt, wall[wall[w].point2].y);
|
||||
dragpoint(w, wall[w].x - amt, wall[w].y, 0);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x - amt, wall[wall[w].point2].y, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -429,8 +429,8 @@ int DoSlidorMoveWalls(short SpriteNum, int amt)
|
|||
else
|
||||
{
|
||||
// red wall - move 2 points
|
||||
dragpoint(w, wall[w].x + amt, wall[w].y);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x + amt, wall[wall[w].point2].y);
|
||||
dragpoint(w, wall[w].x + amt, wall[w].y, 0);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x + amt, wall[wall[w].point2].y, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -451,8 +451,8 @@ int DoSlidorMoveWalls(short SpriteNum, int amt)
|
|||
}
|
||||
else
|
||||
{
|
||||
dragpoint(w, wall[w].x, wall[w].y - amt);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x, wall[wall[w].point2].y - amt);
|
||||
dragpoint(w, wall[w].x, wall[w].y - amt, 0);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x, wall[wall[w].point2].y - amt, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -473,8 +473,8 @@ int DoSlidorMoveWalls(short SpriteNum, int amt)
|
|||
}
|
||||
else
|
||||
{
|
||||
dragpoint(w, wall[w].x, wall[w].y + amt);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x, wall[wall[w].point2].y + amt);
|
||||
dragpoint(w, wall[w].x, wall[w].y + amt, 0);
|
||||
dragpoint(wall[w].point2, wall[wall[w].point2].x, wall[wall[w].point2].y + amt, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5176,7 +5176,7 @@ DoGrating(short SpriteNum)
|
|||
}
|
||||
}
|
||||
|
||||
setspritez(SpriteNum, sp->x, sp->y, sp->z);
|
||||
setspritez(SpriteNum, (vec3_t *)sp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -7052,7 +7052,7 @@ move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist
|
|||
// ASSERT(inside(spr->x,spr->y,dasectnum));
|
||||
|
||||
clipmoveboxtracenum = 1;
|
||||
retval = clipmove(&spr->x, &spr->y, &daz, &dasectnum,
|
||||
retval = clipmove_old(&spr->x, &spr->y, &daz, &dasectnum,
|
||||
((xchange * numtics) << 11), ((ychange * numtics) << 11),
|
||||
(((int) spr->clipdist) << 2), ceildist, flordist, cliptype);
|
||||
clipmoveboxtracenum = 3;
|
||||
|
@ -7118,7 +7118,7 @@ move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist
|
|||
|
||||
// extra processing for Stacks and warping
|
||||
if (FAF_ConnectArea(spr->sectnum))
|
||||
setspritez(spritenum, spr->x, spr->y, spr->z);
|
||||
setspritez(spritenum, (vec3_t *)spr);
|
||||
|
||||
if (TEST(sector[spr->sectnum].extra, SECTFX_WARP_SECTOR))
|
||||
{
|
||||
|
@ -7153,7 +7153,7 @@ int pushmove_sprite(short SpriteNum)
|
|||
|
||||
daz = sp->z - u->zclip;
|
||||
sectnum = sp->sectnum;
|
||||
ret = pushmove(&sp->x, &sp->y, &daz, §num,
|
||||
ret = pushmove_old(&sp->x, &sp->y, &daz, §num,
|
||||
(((int)sp->clipdist)<<2)-GETZRANGE_CLIP_ADJ, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR);
|
||||
|
||||
if (sectnum != sp->sectnum && sectnum >= 0)
|
||||
|
@ -7301,7 +7301,7 @@ move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildis
|
|||
|
||||
// ASSERT(inside(sp->x,sp->y,dasectnum));
|
||||
clipmoveboxtracenum = 1;
|
||||
retval = clipmove(&sp->x, &sp->y, &daz, &dasectnum,
|
||||
retval = clipmove_old(&sp->x, &sp->y, &daz, &dasectnum,
|
||||
((xchange * numtics) << 11), ((ychange * numtics) << 11),
|
||||
(((int) sp->clipdist) << 2), ceildist, flordist, cliptype);
|
||||
clipmoveboxtracenum = 3;
|
||||
|
@ -7361,7 +7361,7 @@ move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildis
|
|||
}
|
||||
|
||||
if (FAF_ConnectArea(sp->sectnum))
|
||||
setspritez(spritenum, sp->x, sp->y, sp->z);
|
||||
setspritez(spritenum, (vec3_t *)sp);
|
||||
|
||||
if (TEST(sector[sp->sectnum].extra, SECTFX_WARP_SECTOR))
|
||||
{
|
||||
|
@ -7461,7 +7461,7 @@ move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int
|
|||
sp->x = ox;
|
||||
sp->y = oy;
|
||||
clipmoveboxtracenum = 1;
|
||||
retval = clipmove(&sp->x, &sp->y, &daz, &dasectnum,
|
||||
retval = clipmove_old(&sp->x, &sp->y, &daz, &dasectnum,
|
||||
((xchange * numtics) << 11), ((ychange * numtics) << 11),
|
||||
(((int) sp->clipdist) << 2), ceildist, flordist, cliptype);
|
||||
clipmoveboxtracenum = 3;
|
||||
|
@ -7562,7 +7562,7 @@ move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int
|
|||
//MissileWaterAdjust(spritenum);
|
||||
|
||||
//if (FAF_ConnectArea(sp->sectnum))
|
||||
// setspritez(spritenum, sp->x, sp->y, sp->z);
|
||||
// setspritez(spritenum, (vec3_t *)sp);
|
||||
|
||||
if (TEST(sector[sp->sectnum].extra, SECTFX_WARP_SECTOR))
|
||||
{
|
||||
|
@ -7606,7 +7606,7 @@ int push_check(short SpriteNum)
|
|||
sp = &sprite[i];
|
||||
u = User[i];
|
||||
|
||||
sect = pushmove(&sp->x, &sp->y, &sp->z, &sp->sectnum, (((int)sp->clipdist)<<2)-8, u->ceiling_dist, u->floor_dist, CLIPMASK0);
|
||||
sect = pushmove((vec3_t *)sp, &sp->sectnum, (((int)sp->clipdist)<<2)-8, u->ceiling_dist, u->floor_dist, CLIPMASK0);
|
||||
if (sect == -1)
|
||||
{
|
||||
KillSprite(i);
|
||||
|
|
|
@ -1722,7 +1722,7 @@ MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
|
|||
|
||||
if (wp->extra && TEST(wp->extra, WALLFX_LOOP_OUTER))
|
||||
{
|
||||
dragpoint(k, wp->x += BOUND_4PIX(nx), wp->y += BOUND_4PIX(ny));
|
||||
dragpoint(k, wp->x += BOUND_4PIX(nx), wp->y += BOUND_4PIX(ny), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1745,7 +1745,7 @@ MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
|
|||
|
||||
if (wp->extra && TEST(wp->extra, WALLFX_LOOP_OUTER))
|
||||
{
|
||||
dragpoint(k, rx, ry);
|
||||
dragpoint(k, rx, ry, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1875,7 +1875,7 @@ PlayerPart:
|
|||
// Does not necessarily move with the sector so must accout for
|
||||
// moving across sectors
|
||||
if (sop->xmid < (int)MAXSO) // special case for operating SO's
|
||||
setspritez(sop->sp_num[i], sp->x, sp->y, sp->z);
|
||||
setspritez(sop->sp_num[i], (vec3_t *)sp);
|
||||
}
|
||||
|
||||
if (TEST(sp->extra, SPRX_BLADE))
|
||||
|
@ -1982,7 +1982,7 @@ RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, SWBOOL dynamic)
|
|||
|
||||
if (wp->extra && TEST(wp->extra, WALLFX_LOOP_OUTER))
|
||||
{
|
||||
dragpoint(k, dx, dy);
|
||||
dragpoint(k, dx, dy, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2053,7 +2053,7 @@ void UpdateSectorObjectSprites(SECTOR_OBJECTp sop)
|
|||
sp = &sprite[sop->sp_num[i]];
|
||||
u = User[sop->sp_num[i]];
|
||||
|
||||
setspritez(sop->sp_num[i], sp->x, sp->y, sp->z);
|
||||
setspritez(sop->sp_num[i], (vec3_t *)sp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2148,7 +2148,7 @@ CollapseSectorObject(SECTOR_OBJECTp sop, int nx, int ny)
|
|||
|
||||
if (wp->extra && TEST(wp->extra, WALLFX_LOOP_OUTER))
|
||||
{
|
||||
dragpoint(k, nx, ny);
|
||||
dragpoint(k, nx, ny, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2937,7 +2937,7 @@ DoTornadoObject(SECTOR_OBJECTp sop)
|
|||
// this made them move together more or less - cool!
|
||||
//static short ang = 1024;
|
||||
int floor_dist;
|
||||
int x,y,z;
|
||||
vec3_t pos;
|
||||
int ret;
|
||||
short *ang = &sop->ang_moving;
|
||||
|
||||
|
@ -2946,12 +2946,12 @@ DoTornadoObject(SECTOR_OBJECTp sop)
|
|||
|
||||
cursect = sop->op_main_sector; // for sop->vel
|
||||
floor_dist = DIV4(labs(sector[cursect].ceilingz - sector[cursect].floorz));
|
||||
x = sop->xmid;
|
||||
y = sop->ymid;
|
||||
z = floor_dist;
|
||||
pos.x = sop->xmid;
|
||||
pos.y = sop->ymid;
|
||||
pos.z = floor_dist;
|
||||
|
||||
PlaceSectorObject(sop, *ang, MAXSO, MAXSO);
|
||||
ret = clipmove(&x, &y, &z, &cursect, xvect, yvect, (int)sop->clipdist, Z(0), floor_dist, CLIPMASK_ACTOR);
|
||||
ret = clipmove(&pos, &cursect, xvect, yvect, (int)sop->clipdist, Z(0), floor_dist, CLIPMASK_ACTOR);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -2959,7 +2959,7 @@ DoTornadoObject(SECTOR_OBJECTp sop)
|
|||
}
|
||||
|
||||
TornadoSpin(sop);
|
||||
RefreshPoints(sop, x - sop->xmid, y - sop->ymid, TRUE);
|
||||
RefreshPoints(sop, pos.x - sop->xmid, pos.y - sop->ymid, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3397,7 +3397,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
|
|||
{
|
||||
neartag(sp->x, sp->y, z[i], sp->sectnum, sp->ang,
|
||||
&nearsector, &nearwall, &nearsprite,
|
||||
&nearhitdist, 1024L, NTAG_SEARCH_LO_HI);
|
||||
&nearhitdist, 1024L, NTAG_SEARCH_LO_HI, NULL);
|
||||
|
||||
// //DSPRINTF(ds,"nearsector = %d, nearwall = %d, nearsprite = %d hitdist == %ld\n",nearsector,nearwall,nearsprite,nearhitdist);
|
||||
// MONO_PRINT(ds);
|
||||
|
@ -3637,7 +3637,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
|
|||
neartag(sp->x, sp->y, SPRITEp_TOS(sp) - DIV2(SPRITEp_SIZE_Z(sp)), sp->sectnum,
|
||||
sp->ang,
|
||||
&hitsect, &hitwall, &hitsprite,
|
||||
&dist, 600L, NTAG_SEARCH_LO_HI);
|
||||
&dist, 600L, NTAG_SEARCH_LO_HI, NULL);
|
||||
|
||||
if (hitwall < 0)
|
||||
{
|
||||
|
|
|
@ -4338,7 +4338,7 @@ SpawnBlood(short SpriteNum, short Weapon, short hitang, int hitx, int hity, int
|
|||
nu->jump_speed += RANDOM_RANGE(p->max_jspeed - p->min_jspeed);
|
||||
nu->jump_speed = -nu->jump_speed;
|
||||
|
||||
//setspritez(new, np->x, np->y, np->z);
|
||||
//setspritez(new, (vec3_t *)np);
|
||||
nu->xchange = MOVEx(np->xvel, np->ang);
|
||||
nu->ychange = MOVEy(np->xvel, np->ang);
|
||||
|
||||
|
@ -8717,7 +8717,7 @@ DoPlasmaFountain(int16_t Weapon)
|
|||
ap = &sprite[u->Attach];
|
||||
|
||||
// move with sprite
|
||||
setspritez(Weapon, ap->x, ap->y, ap->z);
|
||||
setspritez(Weapon, (vec3_t *)ap);
|
||||
sp->ang = ap->ang;
|
||||
|
||||
u->Counter++;
|
||||
|
@ -9495,7 +9495,7 @@ DoMineStuck(int16_t Weapon)
|
|||
u->WaitTics = SEC(1)/2;
|
||||
}
|
||||
|
||||
setspritez(Weapon, ap->x, ap->y, ap->z - u->sz);
|
||||
setspritez_old(Weapon, ap->x, ap->y, ap->z - u->sz);
|
||||
sp->z = ap->z - DIV2(SPRITEp_SIZE_Z(ap));
|
||||
}
|
||||
|
||||
|
@ -9971,7 +9971,7 @@ DoEMPBurst(int16_t Weapon)
|
|||
|
||||
ASSERT(au);
|
||||
|
||||
setspritez(Weapon, ap->x, ap->y, ap->z - u->sz);
|
||||
setspritez_old(Weapon, ap->x, ap->y, ap->z - u->sz);
|
||||
sp->ang = NORM_ANGLE(ap->ang+1024);
|
||||
}
|
||||
|
||||
|
@ -10486,7 +10486,7 @@ DoMicro(int16_t Weapon)
|
|||
// last smoke
|
||||
if ((u->WaitTics -= MISSILEMOVETICS) <= 0)
|
||||
{
|
||||
setspritez(new,np->x,np->y,np->z);
|
||||
setspritez(new, (vec3_t *)np);
|
||||
NewStateGroup(Weapon, &sg_MicroMini[0]);
|
||||
sp->xrepeat = sp->yrepeat = 10;
|
||||
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||
|
@ -12987,7 +12987,7 @@ DoRing(int16_t Weapon)
|
|||
//sp->ang = NORM_ANGLE(sp->ang + 512);
|
||||
//updatesector(sp->x, sp->y);
|
||||
|
||||
setsprite(Weapon, sp->x, sp->y, sp->z);
|
||||
setsprite(Weapon, (vec3_t *)sp);
|
||||
sect = sp->sectnum;
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
|
@ -13131,7 +13131,7 @@ DoSerpRing(int16_t Weapon)
|
|||
sp->x += ((int) u->Dist * (int) sintable[NORM_ANGLE(u->slide_ang + 512)]) >> 14;
|
||||
sp->y += ((int) u->Dist * (int) sintable[u->slide_ang]) >> 14;
|
||||
|
||||
setsprite(Weapon, sp->x, sp->y, sp->z);
|
||||
setsprite(Weapon, (vec3_t *)sp);
|
||||
sect = sp->sectnum;
|
||||
|
||||
ASSERT(sp->sectnum >= 0);
|
||||
|
@ -17882,7 +17882,7 @@ HitscanSpriteAdjust(short SpriteNum, short hitwall)
|
|||
|
||||
// must have this
|
||||
sectnum = sp->sectnum;
|
||||
clipmove(&sp->x, &sp->y, &sp->z, §num, xvect, yvect,
|
||||
clipmove((vec3_t *)sp, §num, xvect, yvect,
|
||||
4L, 4L<<8, 4L<<8, CLIPMASK_MISSILE);
|
||||
clipmoveboxtracenum = 3;
|
||||
|
||||
|
@ -19232,7 +19232,7 @@ InitEnemyUzi(short SpriteNum)
|
|||
// Make sprite shade brighter
|
||||
u->Vis = 128;
|
||||
|
||||
setspritez(SpriteNum, sp->x, sp->y, sp->z);
|
||||
setspritez(SpriteNum, (vec3_t *)sp);
|
||||
|
||||
if (u->ID == ZILLA_RUN_R0)
|
||||
{
|
||||
|
@ -20770,7 +20770,7 @@ int QueueHole(short ang, short hitsect, short hitwall, int hitx, int hity, int h
|
|||
sectnum = sp->sectnum;
|
||||
|
||||
clipmoveboxtracenum = 1;
|
||||
clipmove(&sp->x, &sp->y, &sp->z, §num, nx, ny,
|
||||
clipmove((vec3_t *)sp, §num, nx, ny,
|
||||
0L, 0L, 0L, CLIPMASK_MISSILE);
|
||||
clipmoveboxtracenum = 3;
|
||||
|
||||
|
@ -21101,7 +21101,7 @@ int QueueWallBlood(short hitsprite, short ang)
|
|||
sectnum = sp->sectnum;
|
||||
|
||||
clipmoveboxtracenum = 1;
|
||||
clipmove(&sp->x, &sp->y, &sp->z, §num, nx, ny,
|
||||
clipmove((vec3_t *)sp, §num, nx, ny,
|
||||
0L, 0L, 0L, CLIPMASK_MISSILE);
|
||||
clipmoveboxtracenum = 3;
|
||||
|
||||
|
@ -21242,7 +21242,7 @@ int QueueGeneric(short SpriteNum, short pic)
|
|||
{
|
||||
// move old sprite to new sprite's place
|
||||
osp = &sprite[GenericQueue[GenericQueueHead]];
|
||||
//setspritez(GenericQueue[GenericQueueHead],sp->x,sp->y,sp->z);
|
||||
//setspritez(GenericQueue[GenericQueueHead], (vec3_t *)sp);
|
||||
osp->x = sp->x;
|
||||
osp->y = sp->y;
|
||||
osp->z = sp->z;
|
||||
|
@ -21800,7 +21800,7 @@ int QueueLoWangs(short SpriteNum)
|
|||
{
|
||||
// move old sprite to new sprite's place
|
||||
osp = &sprite[LoWangsQueue[LoWangsQueueHead]];
|
||||
setspritez(LoWangsQueue[LoWangsQueueHead],sp->x,sp->y,sp->z);
|
||||
setspritez(LoWangsQueue[LoWangsQueueHead], (vec3_t *)sp);
|
||||
NewSprite = LoWangsQueue[LoWangsQueueHead];
|
||||
ASSERT(sprite[NewSprite].statnum != MAXSTATUS);
|
||||
}
|
||||
|
|
|
@ -33,33 +33,6 @@ char setupfilename[BMAX_PATH] = SETUPFILENAME;
|
|||
#define TILE_TILT (MAXTILES-2)
|
||||
|
||||
|
||||
static int32_t clipmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist,
|
||||
int32_t ceildist, int32_t flordist, uint32_t cliptype) ATTRIBUTE((nonnull(1,2,3,4)));
|
||||
|
||||
static int32_t clipmove_old(int32_t *x, int32_t *y, int32_t *z, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist,
|
||||
int32_t ceildist, int32_t flordist, uint32_t cliptype)
|
||||
{
|
||||
vec3_t vector = { *x, *y, *z };
|
||||
|
||||
int32_t result = clipmove(&vector, sectnum, xvect, yvect, walldist, ceildist, flordist, cliptype);
|
||||
|
||||
*x = vector.x;
|
||||
*y = vector.y;
|
||||
*z = vector.z;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void getzrange_old(int32_t x, int32_t y, int32_t z, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz,
|
||||
int32_t *florhit, int32_t walldist, uint32_t cliptype) ATTRIBUTE((nonnull(5,6,7,8)));
|
||||
|
||||
static void getzrange_old(int32_t x, int32_t y, int32_t z, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz,
|
||||
int32_t *florhit, int32_t walldist, uint32_t cliptype)
|
||||
{
|
||||
const vec3_t vector = { x, y, z };
|
||||
getzrange(&vector, sectnum, ceilz, ceilhit, florz, florhit, walldist, cliptype);
|
||||
}
|
||||
|
||||
static int32_t setsprite_eyeheight(int16_t spritenum, const vec3_t *pos) ATTRIBUTE((nonnull(2)));
|
||||
static int32_t setsprite_eyeheight(int16_t spritenum, const vec3_t *pos)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue