mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
SW: Comment out unused vars, which would become
used if previously commented out code was uncommented (including a few instances of uninitialized var reads). git-svn-id: https://svn.eduke32.com/eduke32@8686 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/brooms.cpp # source/sw/src/cheats.cpp # source/sw/src/draw.cpp # source/sw/src/game.cpp # source/sw/src/jnstub.cpp # source/sw/src/menus.cpp # source/sw/src/rts.cpp # source/sw/src/sector.cpp # source/sw/src/setup.cpp # source/sw/src/sounds.cpp # source/sw/src/weapon.cpp
This commit is contained in:
parent
896de8aa1c
commit
d55871927a
19 changed files with 69 additions and 70 deletions
|
@ -383,7 +383,6 @@ DoActorPickClosePlayer(short SpriteNum)
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
// if actor can still see the player
|
// if actor can still see the player
|
||||||
int look_height = SPRITEp_TOS(sp);
|
int look_height = SPRITEp_TOS(sp);
|
||||||
SWBOOL ICanSee = FALSE;
|
|
||||||
SWBOOL found = FALSE;
|
SWBOOL found = FALSE;
|
||||||
int i,nexti;
|
int i,nexti;
|
||||||
|
|
||||||
|
@ -460,7 +459,7 @@ DoActorPickClosePlayer(short SpriteNum)
|
||||||
|
|
||||||
DISTANCE(sp->x, sp->y, pp->posx, pp->posy, dist, a, b, c);
|
DISTANCE(sp->x, sp->y, pp->posx, pp->posy, dist, a, b, c);
|
||||||
|
|
||||||
//ICanSee = FAFcansee(sp->x, sp->y, look_height, sp->sectnum, pp->SpriteP->x, pp->SpriteP->y, SPRITEp_UPPER(pp->SpriteP), pp->SpriteP->sectnum);
|
//SWBOOL ICanSee = FAFcansee(sp->x, sp->y, look_height, sp->sectnum, pp->SpriteP->x, pp->SpriteP->y, SPRITEp_UPPER(pp->SpriteP), pp->SpriteP->sectnum);
|
||||||
if (dist < near_dist && FAFcansee(sp->x, sp->y, look_height, sp->sectnum, pp->SpriteP->x, pp->SpriteP->y, SPRITEp_UPPER(pp->SpriteP), pp->SpriteP->sectnum))
|
if (dist < near_dist && FAFcansee(sp->x, sp->y, look_height, sp->sectnum, pp->SpriteP->x, pp->SpriteP->y, SPRITEp_UPPER(pp->SpriteP), pp->SpriteP->sectnum))
|
||||||
{
|
{
|
||||||
near_dist = dist;
|
near_dist = dist;
|
||||||
|
|
|
@ -84,7 +84,6 @@ PANEL_SPRITEp
|
||||||
pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int y, short x1, short y1, short x2, short y2)
|
pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int y, short x1, short y1, short x2, short y2)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp psp;
|
PANEL_SPRITEp psp;
|
||||||
extern SWBOOL DrawBeforeView;
|
|
||||||
|
|
||||||
psp = pSpawnSprite(pp, NULL, pri, x, y);
|
psp = pSpawnSprite(pp, NULL, pri, x, y);
|
||||||
|
|
||||||
|
@ -104,6 +103,7 @@ pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int
|
||||||
|
|
||||||
//SET(psp->flags, PANF_STATUS_AREA | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST | PANF_DRAW_BEFORE_VIEW | PANF_NOT_ALL_PAGES);
|
//SET(psp->flags, PANF_STATUS_AREA | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST | PANF_DRAW_BEFORE_VIEW | PANF_NOT_ALL_PAGES);
|
||||||
SET(psp->flags, PANF_STATUS_AREA | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST | PANF_DRAW_BEFORE_VIEW);
|
SET(psp->flags, PANF_STATUS_AREA | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST | PANF_DRAW_BEFORE_VIEW);
|
||||||
|
//extern SWBOOL DrawBeforeView;
|
||||||
//DrawBeforeView = TRUE;
|
//DrawBeforeView = TRUE;
|
||||||
|
|
||||||
//SET(psp->flags, PANF_SCREEN_CLIP | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST);
|
//SET(psp->flags, PANF_SCREEN_CLIP | PANF_KILL_AFTER_SHOW | PANF_IGNORE_START_MOST);
|
||||||
|
|
|
@ -1052,10 +1052,10 @@ SWBOOL NullActor(USERp u)
|
||||||
|
|
||||||
int HitBreakSprite(short BreakSprite, short type)
|
int HitBreakSprite(short BreakSprite, short type)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
|
||||||
SPRITEp bp = &sprite[BreakSprite];
|
SPRITEp bp = &sprite[BreakSprite];
|
||||||
USERp bu = User[BreakSprite];
|
USERp bu = User[BreakSprite];
|
||||||
|
|
||||||
|
//SPRITEp sp;
|
||||||
// ignore as a breakable if true
|
// ignore as a breakable if true
|
||||||
//if (sp->lotag == TAG_SPRITE_HIT_MATCH)
|
//if (sp->lotag == TAG_SPRITE_HIT_MATCH)
|
||||||
// return(FALSE);
|
// return(FALSE);
|
||||||
|
@ -1107,14 +1107,14 @@ void DoWallBreakMatch(short match)
|
||||||
short i,sectnum;
|
short i,sectnum;
|
||||||
int x,y,z;
|
int x,y,z;
|
||||||
WALLp wp;
|
WALLp wp;
|
||||||
short nw,wall_ang;
|
short wall_ang;
|
||||||
|
|
||||||
for (i=0; i<=numwalls; i++)
|
for (i=0; i<=numwalls; i++)
|
||||||
{
|
{
|
||||||
if (wall[i].hitag == match)
|
if (wall[i].hitag == match)
|
||||||
{
|
{
|
||||||
WallBreakPosition(i, §num, &x, &y, &z, &wall_ang);
|
WallBreakPosition(i, §num, &x, &y, &z, &wall_ang);
|
||||||
//nw = wall[i].point2;
|
//short nw = wall[i].point2;
|
||||||
//wall_ang = NORM_ANGLE(getangle(wall[nw].x - wall[i].x, wall[nw].y - wall[i].y)+512);
|
//wall_ang = NORM_ANGLE(getangle(wall[nw].x - wall[i].x, wall[nw].y - wall[i].y)+512);
|
||||||
wp = &wall[i];
|
wp = &wall[i];
|
||||||
wp->hitag = 0; // Reset the hitag
|
wp->hitag = 0; // Reset the hitag
|
||||||
|
|
|
@ -229,12 +229,12 @@ void ClipCheat(PLAYERp pp, const char *)
|
||||||
void WarpCheat(PLAYERp pp, const char *cheat_string)
|
void WarpCheat(PLAYERp pp, const char *cheat_string)
|
||||||
{
|
{
|
||||||
const char *cp = cheat_string;
|
const char *cp = cheat_string;
|
||||||
int episode_num;
|
|
||||||
int level_num;
|
int level_num;
|
||||||
|
|
||||||
cp += sizeof("swtrek")-1;
|
cp += sizeof("swtrek")-1;
|
||||||
level_num = atol(cp);
|
level_num = atol(cp);
|
||||||
|
|
||||||
|
//int episode_num;
|
||||||
//DSPRINTF(ds,"ep %d, lev %d",episode_num, level_num);
|
//DSPRINTF(ds,"ep %d, lev %d",episode_num, level_num);
|
||||||
//MONO_PRINT(ds);
|
//MONO_PRINT(ds);
|
||||||
|
|
||||||
|
|
|
@ -419,7 +419,6 @@ void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp perso
|
||||||
short wpn_cnt;
|
short wpn_cnt;
|
||||||
short depth = 0;
|
short depth = 0;
|
||||||
extern short TotalKillable;
|
extern short TotalKillable;
|
||||||
extern SWBOOL DebugSecret;
|
|
||||||
|
|
||||||
switch (u->ID)
|
switch (u->ID)
|
||||||
{
|
{
|
||||||
|
@ -441,6 +440,7 @@ void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp perso
|
||||||
{
|
{
|
||||||
TotalKillable++;
|
TotalKillable++;
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
extern SWBOOL DebugSecret;
|
||||||
if (DebugSecret)
|
if (DebugSecret)
|
||||||
{
|
{
|
||||||
sprintf(ds,"COUNTED: spnum %d, pic %d, x %d, y %d",SpriteNum,sp->picnum,sp->x,sp->y);
|
sprintf(ds,"COUNTED: spnum %d, pic %d, x %d, y %d",SpriteNum,sp->picnum,sp->x,sp->y);
|
||||||
|
|
|
@ -1508,7 +1508,6 @@ void CheatResChange(void)
|
||||||
void DrawCheckKeys(PLAYERp pp)
|
void DrawCheckKeys(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern SWBOOL ResCheat;
|
extern SWBOOL ResCheat;
|
||||||
extern SWBOOL PauseKeySet;
|
|
||||||
|
|
||||||
if (ResCheat)
|
if (ResCheat)
|
||||||
{
|
{
|
||||||
|
@ -1710,8 +1709,6 @@ void
|
||||||
PostDraw(void)
|
PostDraw(void)
|
||||||
{
|
{
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
short sectnum,statnum;
|
|
||||||
SPRITEp sp;
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FLOOR_SLOPE_DONT_DRAW], i, nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FLOOR_SLOPE_DONT_DRAW], i, nexti)
|
||||||
{
|
{
|
||||||
|
@ -1727,9 +1724,9 @@ PostDraw(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
sp = &sprite[i];
|
SPRITEp sp = &sprite[i];
|
||||||
statnum = sp->statnum;
|
short statnum = sp->statnum;
|
||||||
sectnum = sp->sectnum;
|
short sectnum = sp->sectnum;
|
||||||
memset(sp, 0xCC, sizeof(SPRITE));
|
memset(sp, 0xCC, sizeof(SPRITE));
|
||||||
sp->statnum = statnum;
|
sp->statnum = statnum;
|
||||||
sp->sectnum = sectnum;
|
sp->sectnum = sectnum;
|
||||||
|
|
|
@ -1601,9 +1601,6 @@ void SybexScreen(void)
|
||||||
void
|
void
|
||||||
TitleLevel(void)
|
TitleLevel(void)
|
||||||
{
|
{
|
||||||
int fin;
|
|
||||||
unsigned char backup_pal[256*3];
|
|
||||||
unsigned char pal[PAL_SIZE];
|
|
||||||
char tempbuf[256];
|
char tempbuf[256];
|
||||||
char *palook_bak = palookup[0];
|
char *palook_bak = palookup[0];
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -729,13 +729,13 @@ void InventoryKeys(PLAYERp pp)
|
||||||
|
|
||||||
void InvBorderRefresh(PLAYERp pp)
|
void InvBorderRefresh(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int x,y;
|
// int x,y;
|
||||||
|
|
||||||
if (pp != Player + myconnectindex)
|
if (pp != Player + myconnectindex)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
x = InventoryBarXpos[gs.BorderNum];
|
// x = InventoryBarXpos[gs.BorderNum];
|
||||||
y = InventoryBarYpos[gs.BorderNum];
|
// y = InventoryBarYpos[gs.BorderNum];
|
||||||
|
|
||||||
SetRedrawScreen(pp);
|
SetRedrawScreen(pp);
|
||||||
//BorderRefreshClip(pp, x-5, y-5, x + (MAX_INVENTORY * INVENTORY_ICON_WIDTH), y + 24);
|
//BorderRefreshClip(pp, x-5, y-5, x + (MAX_INVENTORY * INVENTORY_ICON_WIDTH), y + 24);
|
||||||
|
|
|
@ -258,7 +258,6 @@ JS_SpriteSetup(void)
|
||||||
for (i = 0; i < numwalls; i++)
|
for (i = 0; i < numwalls; i++)
|
||||||
{
|
{
|
||||||
short picnum;
|
short picnum;
|
||||||
short sndnum;
|
|
||||||
|
|
||||||
|
|
||||||
picnum = wall[i].picnum;
|
picnum = wall[i].picnum;
|
||||||
|
@ -282,6 +281,7 @@ JS_SpriteSetup(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
short sndnum;
|
||||||
if ((sndnum = CheckTileSound(picnum)) != -1)
|
if ((sndnum = CheckTileSound(picnum)) != -1)
|
||||||
{
|
{
|
||||||
SpawnWallSound(sndnum, i);
|
SpawnWallSound(sndnum, i);
|
||||||
|
@ -535,7 +535,6 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
int tposx, tposy; // Camera
|
int tposx, tposy; // Camera
|
||||||
int *longptr;
|
int *longptr;
|
||||||
fix16_t tang;
|
fix16_t tang;
|
||||||
char tvisibility;
|
|
||||||
|
|
||||||
// int tx, ty, tz, tpang; // Interpolate so mirror doesn't
|
// int tx, ty, tz, tpang; // Interpolate so mirror doesn't
|
||||||
// drift!
|
// drift!
|
||||||
|
@ -622,6 +621,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
|
|
||||||
ASSERT(sp);
|
ASSERT(sp);
|
||||||
|
|
||||||
|
// char tvisibility;
|
||||||
// tvisibility = g_visibility;
|
// tvisibility = g_visibility;
|
||||||
// g_visibility <<= 1; // Make mirror darker
|
// g_visibility <<= 1; // Make mirror darker
|
||||||
|
|
||||||
|
|
|
@ -1819,7 +1819,7 @@ PlayerInitCaltrops(PLAYERp pp)
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w;
|
short w;
|
||||||
short oclipdist, i;
|
short oclipdist;
|
||||||
|
|
||||||
|
|
||||||
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
||||||
|
@ -1832,7 +1832,7 @@ PlayerInitCaltrops(PLAYERp pp)
|
||||||
nz = pp->posz + pp->bob_z + Z(8);
|
nz = pp->posz + pp->bob_z + Z(8);
|
||||||
|
|
||||||
// Throw out several caltrops
|
// Throw out several caltrops
|
||||||
// for(i=0;i<3;i++)
|
// for(short i=0;i<3;i++)
|
||||||
// {
|
// {
|
||||||
// Spawn a shot
|
// Spawn a shot
|
||||||
// Inserting and setting up variables
|
// Inserting and setting up variables
|
||||||
|
|
|
@ -514,8 +514,6 @@ SpikeFloor(SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
int mx, my;
|
int mx, my;
|
||||||
int floorz;
|
int floorz;
|
||||||
SECTORp *sectp;
|
|
||||||
int j;
|
|
||||||
int x,y;
|
int x,y;
|
||||||
|
|
||||||
// z direction
|
// z direction
|
||||||
|
@ -553,6 +551,8 @@ SpikeFloor(SECTOR_OBJECTp sop)
|
||||||
SOBJ_AlignFloorToPoint(sop, mx, my, floorz + sop->morph_z);
|
SOBJ_AlignFloorToPoint(sop, mx, my, floorz + sop->morph_z);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
SECTORp *sectp;
|
||||||
|
int j;
|
||||||
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||||
{
|
{
|
||||||
if (SectUser[*sectp - sector] &&
|
if (SectUser[*sectp - sector] &&
|
||||||
|
|
|
@ -430,7 +430,7 @@ SW_SendMessage(short pnum, const char *text)
|
||||||
void
|
void
|
||||||
InitNetPlayerOptions(void)
|
InitNetPlayerOptions(void)
|
||||||
{
|
{
|
||||||
short pnum;
|
// short pnum;
|
||||||
PLAYERp pp = Player + myconnectindex;
|
PLAYERp pp = Player + myconnectindex;
|
||||||
PACKET_OPTIONS p;
|
PACKET_OPTIONS p;
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ InitNetPlayerOptions(void)
|
||||||
void
|
void
|
||||||
SendMulitNameChange(char *new_name)
|
SendMulitNameChange(char *new_name)
|
||||||
{
|
{
|
||||||
short pnum;
|
// short pnum;
|
||||||
PLAYERp pp = Player + myconnectindex;
|
PLAYERp pp = Player + myconnectindex;
|
||||||
PACKET_NAME_CHANGE p;
|
PACKET_NAME_CHANGE p;
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ SendMulitNameChange(char *new_name)
|
||||||
void
|
void
|
||||||
SendVersion(int version)
|
SendVersion(int version)
|
||||||
{
|
{
|
||||||
short pnum;
|
// short pnum;
|
||||||
PLAYERp pp = Player + myconnectindex;
|
PLAYERp pp = Player + myconnectindex;
|
||||||
PACKET_VERSION p;
|
PACKET_VERSION p;
|
||||||
|
|
||||||
|
@ -633,7 +633,7 @@ waitforeverybody(void)
|
||||||
// allow exit
|
// allow exit
|
||||||
//if (inputState.GetKeyStatus(KEYSC_ESC))
|
//if (inputState.GetKeyStatus(KEYSC_ESC))
|
||||||
{
|
{
|
||||||
short pnum;
|
// short pnum;
|
||||||
//TRAVERSE_CONNECT(pnum)
|
//TRAVERSE_CONNECT(pnum)
|
||||||
{
|
{
|
||||||
//if (pnum != myconnectindex)
|
//if (pnum != myconnectindex)
|
||||||
|
|
|
@ -2988,7 +2988,6 @@ void
|
||||||
SpawnShotgunShell(PANEL_SPRITEp psp)
|
SpawnShotgunShell(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
PLAYERp pp = psp->PlayerP;
|
PLAYERp pp = psp->PlayerP;
|
||||||
PANEL_SPRITEp shell;
|
|
||||||
|
|
||||||
|
|
||||||
SpawnShell(pp->PlayerSprite,-4);
|
SpawnShell(pp->PlayerSprite,-4);
|
||||||
|
@ -3001,6 +3000,7 @@ SpawnShotgunShell(PANEL_SPRITEp psp)
|
||||||
PANEL_STATEp state[2];
|
PANEL_STATEp state[2];
|
||||||
} PANEL_SHRAP, *PANEL_SHRAPp;
|
} PANEL_SHRAP, *PANEL_SHRAPp;
|
||||||
|
|
||||||
|
PANEL_SPRITEp shell;
|
||||||
|
|
||||||
static PANEL_SHRAP ShellShrap[] =
|
static PANEL_SHRAP ShellShrap[] =
|
||||||
{
|
{
|
||||||
|
@ -5613,7 +5613,7 @@ InitWeaponGrenade(PLAYERp pp)
|
||||||
void
|
void
|
||||||
pGrenadeRecoilDown(PANEL_SPRITEp psp)
|
pGrenadeRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
short picnum = psp->picndx;
|
// short picnum = psp->picndx;
|
||||||
|
|
||||||
int x = FIXED(psp->x, psp->xfract);
|
int x = FIXED(psp->x, psp->xfract);
|
||||||
int y = FIXED(psp->y, psp->yfract);
|
int y = FIXED(psp->y, psp->yfract);
|
||||||
|
@ -6611,7 +6611,8 @@ pFistPresent(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pFistSlide(PANEL_SPRITEp psp)
|
pFistSlide(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
int nx, ny;
|
// int nx;
|
||||||
|
int ny;
|
||||||
short vel_adj;
|
short vel_adj;
|
||||||
|
|
||||||
//nx = FIXED(psp->x, psp->xfract);
|
//nx = FIXED(psp->x, psp->xfract);
|
||||||
|
@ -6741,7 +6742,8 @@ pFistSlideDown(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pFistSlideR(PANEL_SPRITEp psp)
|
pFistSlideR(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
int nx, ny;
|
// int nx
|
||||||
|
int ny;
|
||||||
short vel_adj;
|
short vel_adj;
|
||||||
|
|
||||||
//nx = FIXED(psp->x, psp->xfract);
|
//nx = FIXED(psp->x, psp->xfract);
|
||||||
|
|
|
@ -1312,7 +1312,7 @@ void
|
||||||
DoPlayerTeleportPause(PLAYERp pp)
|
DoPlayerTeleportPause(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
SPRITEp sp = pp->SpriteP;
|
// SPRITEp sp = pp->SpriteP;
|
||||||
|
|
||||||
// set this so we don't get stuck in teleporting loop
|
// set this so we don't get stuck in teleporting loop
|
||||||
pp->lastcursectnum = pp->cursectnum;
|
pp->lastcursectnum = pp->cursectnum;
|
||||||
|
@ -3772,7 +3772,7 @@ DoPlayerFall(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerBeginClimb(PLAYERp pp)
|
DoPlayerBeginClimb(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
// USERp u = User[pp->PlayerSprite];
|
||||||
SPRITEp sp = pp->SpriteP;
|
SPRITEp sp = pp->SpriteP;
|
||||||
|
|
||||||
RESET(pp->Flags, PF_JUMPING|PF_FALLING);
|
RESET(pp->Flags, PF_JUMPING|PF_FALLING);
|
||||||
|
@ -4303,7 +4303,7 @@ DoPlayerCrawl(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerBeginFly(PLAYERp pp)
|
DoPlayerBeginFly(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
// USERp u = User[pp->PlayerSprite];
|
||||||
|
|
||||||
RESET(pp->Flags, PF_FALLING | PF_JUMPING | PF_CRAWLING);
|
RESET(pp->Flags, PF_FALLING | PF_JUMPING | PF_CRAWLING);
|
||||||
SET(pp->Flags, PF_FLYING);
|
SET(pp->Flags, PF_FLYING);
|
||||||
|
@ -6390,8 +6390,6 @@ DoPlayerBeginDie(PLAYERp pp)
|
||||||
DoPlayerDeathDrown,
|
DoPlayerDeathDrown,
|
||||||
};
|
};
|
||||||
|
|
||||||
short random;
|
|
||||||
|
|
||||||
#define PLAYER_DEATH_TILT_VALUE (32)
|
#define PLAYER_DEATH_TILT_VALUE (32)
|
||||||
#define PLAYER_DEATH_HORIZ_UP_VALUE (165)
|
#define PLAYER_DEATH_HORIZ_UP_VALUE (165)
|
||||||
#define PLAYER_DEATH_HORIZ_JUMP_VALUE (150)
|
#define PLAYER_DEATH_HORIZ_JUMP_VALUE (150)
|
||||||
|
@ -6434,6 +6432,8 @@ DoPlayerBeginDie(PLAYERp pp)
|
||||||
RESET(pp->Flags, PF_JUMPING|PF_FALLING|PF_DIVING|PF_FLYING|PF_CLIMBING|PF_CRAWLING|PF_LOCK_CRAWL);
|
RESET(pp->Flags, PF_JUMPING|PF_FALLING|PF_DIVING|PF_FLYING|PF_CLIMBING|PF_CRAWLING|PF_LOCK_CRAWL);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
short random;
|
||||||
|
|
||||||
// get tilt value
|
// get tilt value
|
||||||
random = RANDOM_P2(1024);
|
random = RANDOM_P2(1024);
|
||||||
if (random < 128)
|
if (random < 128)
|
||||||
|
@ -7795,10 +7795,11 @@ void
|
||||||
domovethings(void)
|
domovethings(void)
|
||||||
{
|
{
|
||||||
extern SWBOOL DebugAnim;
|
extern SWBOOL DebugAnim;
|
||||||
|
#if DEBUG
|
||||||
extern SWBOOL DebugPanel;
|
extern SWBOOL DebugPanel;
|
||||||
|
#endif
|
||||||
extern SWBOOL DebugSector;
|
extern SWBOOL DebugSector;
|
||||||
extern SWBOOL DebugActorFreeze;
|
extern SWBOOL DebugActorFreeze;
|
||||||
extern SWBOOL ResCheat;
|
|
||||||
extern int PlayClock;
|
extern int PlayClock;
|
||||||
short i, pnum;
|
short i, pnum;
|
||||||
extern SWBOOL GamePaused;
|
extern SWBOOL GamePaused;
|
||||||
|
@ -7886,6 +7887,7 @@ domovethings(void)
|
||||||
|
|
||||||
|
|
||||||
#if 0 // has been moved to draw code
|
#if 0 // has been moved to draw code
|
||||||
|
extern SWBOOL ResCheat;
|
||||||
if (ResCheat)
|
if (ResCheat)
|
||||||
{
|
{
|
||||||
ResCheat = FALSE;
|
ResCheat = FALSE;
|
||||||
|
@ -7934,7 +7936,6 @@ domovethings(void)
|
||||||
extern short screenpeek;
|
extern short screenpeek;
|
||||||
extern SWBOOL PlayerTrackingMode;
|
extern SWBOOL PlayerTrackingMode;
|
||||||
extern PLAYERp GlobPlayerP;
|
extern PLAYERp GlobPlayerP;
|
||||||
extern SWBOOL ScrollMode2D;
|
|
||||||
|
|
||||||
pp = Player + pnum;
|
pp = Player + pnum;
|
||||||
GlobPlayerP = pp;
|
GlobPlayerP = pp;
|
||||||
|
@ -7962,6 +7963,7 @@ domovethings(void)
|
||||||
DoPlayerSectorUpdatePreMove(pp);
|
DoPlayerSectorUpdatePreMove(pp);
|
||||||
ChopsCheck(pp);
|
ChopsCheck(pp);
|
||||||
|
|
||||||
|
// extern SWBOOL ScrollMode2D;
|
||||||
//if (!ScrollMode2D)
|
//if (!ScrollMode2D)
|
||||||
if (pp->DoPlayerAction) pp->DoPlayerAction(pp);
|
if (pp->DoPlayerAction) pp->DoPlayerAction(pp);
|
||||||
|
|
||||||
|
|
|
@ -646,10 +646,10 @@ SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid)
|
||||||
void
|
void
|
||||||
DoSpringBoard(PLAYERp pp, short sectnum)
|
DoSpringBoard(PLAYERp pp, short sectnum)
|
||||||
{
|
{
|
||||||
int sb;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
int sb;
|
||||||
|
int i;
|
||||||
i = AnimGetGoal(§or[sectnum].floorz);
|
i = AnimGetGoal(§or[sectnum].floorz);
|
||||||
|
|
||||||
// if in motion return
|
// if in motion return
|
||||||
|
@ -1408,7 +1408,6 @@ WeaponExplodeSectorInRange(short weapon)
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
int dist;
|
int dist;
|
||||||
int radius;
|
int radius;
|
||||||
short match;
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPRITE_HIT_MATCH], i, nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPRITE_HIT_MATCH], i, nexti)
|
||||||
{
|
{
|
||||||
|
@ -1428,10 +1427,11 @@ WeaponExplodeSectorInRange(short weapon)
|
||||||
if (!FAFcansee(wp->x,wp->y,wp->z,wp->sectnum,sp->x,sp->y,sp->z,sp->sectnum))
|
if (!FAFcansee(wp->x,wp->y,wp->z,wp->sectnum,sp->x,sp->y,sp->z,sp->sectnum))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// short match;
|
||||||
match = sp->hitag;
|
match = sp->hitag;
|
||||||
// this and every other crack sprite of this type is now dead
|
// this and every other crack sprite of this type is now dead
|
||||||
// don't use them
|
// don't use them
|
||||||
#if 0
|
|
||||||
KillMatchingCrackSprites(match);
|
KillMatchingCrackSprites(match);
|
||||||
DoExplodeSector(match);
|
DoExplodeSector(match);
|
||||||
DoMatchEverything(NULL, match, -1);
|
DoMatchEverything(NULL, match, -1);
|
||||||
|
@ -2927,11 +2927,11 @@ DoAnim(int numtics)
|
||||||
void
|
void
|
||||||
AnimClear(void)
|
AnimClear(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
AnimCnt = 0;
|
AnimCnt = 0;
|
||||||
#else
|
#else
|
||||||
|
int i;
|
||||||
|
|
||||||
for (i = AnimCnt - 1; i >= 0; i--)
|
for (i = AnimCnt - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (Anim[i].extra)
|
if (Anim[i].extra)
|
||||||
|
|
|
@ -1018,9 +1018,7 @@ SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int
|
||||||
void
|
void
|
||||||
PicAnimOff(short picnum)
|
PicAnimOff(short picnum)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
short anim_type = TEST(picanm[picnum].sf, PICANM_ANIMTYPE_MASK) >> PICANM_ANIMTYPE_SHIFT;
|
short anim_type = TEST(picanm[picnum].sf, PICANM_ANIMTYPE_MASK) >> PICANM_ANIMTYPE_SHIFT;
|
||||||
short num;
|
|
||||||
|
|
||||||
ASSERT(picnum >= 0 && picnum < MAXTILES);
|
ASSERT(picnum >= 0 && picnum < MAXTILES);
|
||||||
|
|
||||||
|
@ -1028,6 +1026,8 @@ PicAnimOff(short picnum)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
int i;
|
||||||
|
short num;
|
||||||
num = picanm[picnum].num;
|
num = picanm[picnum].num;
|
||||||
ASSERT(num < 20);
|
ASSERT(num < 20);
|
||||||
|
|
||||||
|
@ -7444,7 +7444,7 @@ move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int
|
||||||
|
|
||||||
if (retval) // ran into a white wall
|
if (retval) // ran into a white wall
|
||||||
{
|
{
|
||||||
int new_loz,new_hiz;
|
//int new_loz,new_hiz;
|
||||||
|
|
||||||
// back up and try to clip UP
|
// back up and try to clip UP
|
||||||
//dasectnum = lastsectnum = sp->sectnum;
|
//dasectnum = lastsectnum = sp->sectnum;
|
||||||
|
|
|
@ -131,7 +131,6 @@ EnemySync(void)
|
||||||
unsigned short crc = 0;
|
unsigned short crc = 0;
|
||||||
short j, nextj;
|
short j, nextj;
|
||||||
SPRITEp spr;
|
SPRITEp spr;
|
||||||
extern char DemoTmpName[];
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], j, nextj)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], j, nextj)
|
||||||
{
|
{
|
||||||
|
@ -143,6 +142,7 @@ EnemySync(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
extern char DemoTmpName[];
|
||||||
//DSPRINTF(ds, "Demo Tmp Name %s", DemoTmpName);
|
//DSPRINTF(ds, "Demo Tmp Name %s", DemoTmpName);
|
||||||
MONO_PRINT(ds);
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
|
|
|
@ -729,8 +729,6 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
|
||||||
SWBOOL FoundOutsideLoop = FALSE;
|
SWBOOL FoundOutsideLoop = FALSE;
|
||||||
SWBOOL SectorInBounds;
|
SWBOOL SectorInBounds;
|
||||||
SECTORp *sectp;
|
SECTORp *sectp;
|
||||||
PLAYERp pp;
|
|
||||||
short pnum;
|
|
||||||
USERp u = User[sop->sp_child - sprite];
|
USERp u = User[sop->sp_child - sprite];
|
||||||
|
|
||||||
static unsigned char StatList[] =
|
static unsigned char StatList[] =
|
||||||
|
@ -782,6 +780,8 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// look for players on sector object
|
// look for players on sector object
|
||||||
|
PLAYERp pp;
|
||||||
|
short pnum;
|
||||||
TRAVERSE_CONNECT(pnum)
|
TRAVERSE_CONNECT(pnum)
|
||||||
{
|
{
|
||||||
pp = &Player[pnum];
|
pp = &Player[pnum];
|
||||||
|
|
|
@ -3476,13 +3476,13 @@ AutoShrap:
|
||||||
short spnum;
|
short spnum;
|
||||||
short size;
|
short size;
|
||||||
SPRITEp ep;
|
SPRITEp ep;
|
||||||
USERp eu;
|
// USERp eu;
|
||||||
|
|
||||||
spnum = SpawnLargeExp(ParentNum);
|
spnum = SpawnLargeExp(ParentNum);
|
||||||
ASSERT(spnum >= 0);
|
ASSERT(spnum >= 0);
|
||||||
//spnum = SpawnSectorExp(ParentNum);
|
//spnum = SpawnSectorExp(ParentNum);
|
||||||
ep = &sprite[spnum];
|
ep = &sprite[spnum];
|
||||||
eu = User[spnum];
|
// eu = User[spnum];
|
||||||
|
|
||||||
//eu->xchange = MOVEx(92, ep->ang);
|
//eu->xchange = MOVEx(92, ep->ang);
|
||||||
//eu->ychange = MOVEy(92, ep->ang);
|
//eu->ychange = MOVEy(92, ep->ang);
|
||||||
|
@ -3498,13 +3498,13 @@ AutoShrap:
|
||||||
short spnum;
|
short spnum;
|
||||||
short size;
|
short size;
|
||||||
SPRITEp ep;
|
SPRITEp ep;
|
||||||
USERp eu;
|
// USERp eu;
|
||||||
|
|
||||||
//spnum = SpawnSectorExp(ParentNum);
|
//spnum = SpawnSectorExp(ParentNum);
|
||||||
spnum = SpawnLargeExp(ParentNum);
|
spnum = SpawnLargeExp(ParentNum);
|
||||||
ASSERT(spnum >= 0);
|
ASSERT(spnum >= 0);
|
||||||
ep = &sprite[spnum];
|
ep = &sprite[spnum];
|
||||||
eu = User[spnum];
|
// eu = User[spnum];
|
||||||
|
|
||||||
//eu->xchange = MOVEx(92, ep->ang);
|
//eu->xchange = MOVEx(92, ep->ang);
|
||||||
//eu->ychange = MOVEy(92, ep->ang);
|
//eu->ychange = MOVEy(92, ep->ang);
|
||||||
|
@ -11540,7 +11540,6 @@ SpawnGrenadeExp(int16_t Weapon)
|
||||||
SPRITEp exp;
|
SPRITEp exp;
|
||||||
USERp eu;
|
USERp eu;
|
||||||
short explosion;
|
short explosion;
|
||||||
short ang;
|
|
||||||
int dx,dy,dz;
|
int dx,dy,dz;
|
||||||
|
|
||||||
ASSERT(u);
|
ASSERT(u);
|
||||||
|
@ -11598,6 +11597,7 @@ SpawnGrenadeExp(int16_t Weapon)
|
||||||
SpawnVis(-1, exp->sectnum, exp->x, exp->y, exp->z, 0);
|
SpawnVis(-1, exp->sectnum, exp->x, exp->y, exp->z, 0);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
short ang;
|
||||||
ang = RANDOM_P2(2048);
|
ang = RANDOM_P2(2048);
|
||||||
SpawnGrenadeSecondaryExp(explosion, ang);
|
SpawnGrenadeSecondaryExp(explosion, ang);
|
||||||
ang = ang + 512 + RANDOM_P2(256);
|
ang = ang + 512 + RANDOM_P2(256);
|
||||||
|
@ -12578,13 +12578,13 @@ DoMirv(int16_t Weapon)
|
||||||
SPRITEp sp = &sprite[Weapon], np;
|
SPRITEp sp = &sprite[Weapon], np;
|
||||||
USERp u = User[Weapon], nu;
|
USERp u = User[Weapon], nu;
|
||||||
short New;
|
short New;
|
||||||
int ox, oy, oz;
|
// int ox, oy, oz;
|
||||||
|
|
||||||
u = User[Weapon];
|
u = User[Weapon];
|
||||||
|
|
||||||
ox = sp->x;
|
// ox = sp->x;
|
||||||
oy = sp->y;
|
// oy = sp->y;
|
||||||
oz = sp->z;
|
// oz = sp->z;
|
||||||
|
|
||||||
u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||||
|
|
||||||
|
@ -16602,7 +16602,8 @@ InitEnemyRail(short SpriteNum)
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz, dist, nang;
|
int nx, ny, nz, dist, nang;
|
||||||
short w;
|
short w;
|
||||||
short oclipdist,pnum=0;
|
short pnum=0;
|
||||||
|
// short oclipdist;
|
||||||
|
|
||||||
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
||||||
|
|
||||||
|
@ -17350,8 +17351,9 @@ int
|
||||||
InitSpearTrap(short SpriteNum)
|
InitSpearTrap(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum], wp;
|
SPRITEp sp = &sprite[SpriteNum], wp;
|
||||||
USERp u = User[SpriteNum], wu;
|
USERp wu;
|
||||||
int nx, ny, nz, dist;
|
//USERp u = User[SpriteNum];
|
||||||
|
int nx, ny, nz;
|
||||||
short w;
|
short w;
|
||||||
//short nang;
|
//short nang;
|
||||||
|
|
||||||
|
@ -17386,7 +17388,7 @@ InitSpearTrap(short SpriteNum)
|
||||||
//MissileSetPos(w, DoStar, 400);
|
//MissileSetPos(w, DoStar, 400);
|
||||||
|
|
||||||
// find the distance to the target (player)
|
// find the distance to the target (player)
|
||||||
//dist = Distance(wp->x, wp->y, u->tgt_sp->x, u->tgt_sp->y);
|
//int dist = Distance(wp->x, wp->y, u->tgt_sp->x, u->tgt_sp->y);
|
||||||
|
|
||||||
//if (dist != 0)
|
//if (dist != 0)
|
||||||
//wu->zchange = wp->zvel = (wp->xvel * (SPRITEp_UPPER(u->tgt_sp) - wp->z)) / dist;
|
//wu->zchange = wp->zvel = (wp->xvel * (SPRITEp_UPPER(u->tgt_sp) - wp->z)) / dist;
|
||||||
|
@ -17610,7 +17612,7 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, short hit_sect, short hit_wall, in
|
||||||
SPRITEp hsp = &sprite[hit_sprite];
|
SPRITEp hsp = &sprite[hit_sprite];
|
||||||
USERp hu = User[hit_sprite];
|
USERp hu = User[hit_sprite];
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
USERp wu;
|
// USERp wu;
|
||||||
short New;
|
short New;
|
||||||
short id;
|
short id;
|
||||||
|
|
||||||
|
@ -17631,7 +17633,7 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, short hit_sect, short hit_wall, in
|
||||||
|
|
||||||
New = SpawnSprite(STAT_MISSILE, id, s_UziSmoke, 0, hit_x, hit_y, hit_z, sp->ang, 0);
|
New = SpawnSprite(STAT_MISSILE, id, s_UziSmoke, 0, hit_x, hit_y, hit_z, sp->ang, 0);
|
||||||
wp = &sprite[New];
|
wp = &sprite[New];
|
||||||
wu = User[New];
|
// wu = User[New];
|
||||||
wp->shade = -40;
|
wp->shade = -40;
|
||||||
|
|
||||||
if (hu->PlayerP)
|
if (hu->PlayerP)
|
||||||
|
@ -17695,7 +17697,6 @@ int SpawnWallHole(short hit_sect, short hit_wall, int hit_x, int hit_y, int hit_
|
||||||
{
|
{
|
||||||
short w,nw,wall_ang;
|
short w,nw,wall_ang;
|
||||||
short SpriteNum;
|
short SpriteNum;
|
||||||
int nx,ny;
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
|
|
||||||
SpriteNum = COVERinsertsprite(hit_sect, STAT_DEFAULT);
|
SpriteNum = COVERinsertsprite(hit_sect, STAT_DEFAULT);
|
||||||
|
@ -17718,6 +17719,7 @@ int SpawnWallHole(short hit_sect, short hit_wall, int hit_x, int hit_y, int hit_
|
||||||
|
|
||||||
sp->ang = NORM_ANGLE(wall_ang + 1024);
|
sp->ang = NORM_ANGLE(wall_ang + 1024);
|
||||||
|
|
||||||
|
// int nx,ny;
|
||||||
//nx = (sintable[(512 + Player[0].pang) & 2047] >> 7);
|
//nx = (sintable[(512 + Player[0].pang) & 2047] >> 7);
|
||||||
//ny = (sintable[Player[0].pang] >> 7);
|
//ny = (sintable[Player[0].pang] >> 7);
|
||||||
//sp->x -= nx;
|
//sp->x -= nx;
|
||||||
|
@ -19247,7 +19249,6 @@ InitGrenade(PLAYERp pp)
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w;
|
short w;
|
||||||
short oclipdist;
|
short oclipdist;
|
||||||
int dist;
|
|
||||||
int zvel;
|
int zvel;
|
||||||
SWBOOL auto_aim = FALSE;
|
SWBOOL auto_aim = FALSE;
|
||||||
|
|
||||||
|
@ -19322,6 +19323,7 @@ InitGrenade(PLAYERp pp)
|
||||||
|
|
||||||
pp->SpriteP->clipdist = oclipdist;
|
pp->SpriteP->clipdist = oclipdist;
|
||||||
|
|
||||||
|
// int dist;
|
||||||
//dist = FindDistance2D(pp->xvect, pp->yvect)>>12;
|
//dist = FindDistance2D(pp->xvect, pp->yvect)>>12;
|
||||||
//dist = dist - (dist/2);
|
//dist = dist - (dist/2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue