mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
SW: Remove a ton of unused vars
git-svn-id: https://svn.eduke32.com/eduke32@8685 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/anim.cpp # source/sw/src/border.cpp # source/sw/src/brooms.cpp # source/sw/src/config.cpp # source/sw/src/console.cpp # source/sw/src/coolie.cpp # source/sw/src/draw.cpp # source/sw/src/game.cpp # source/sw/src/hornet.cpp # source/sw/src/jbhlp.cpp # source/sw/src/jnstub.cpp # source/sw/src/jsector.cpp # source/sw/src/menus.cpp # source/sw/src/miscactr.cpp # source/sw/src/network.cpp # source/sw/src/ninja.cpp # source/sw/src/player.cpp # source/sw/src/save.cpp # source/sw/src/serp.cpp # source/sw/src/setup.cpp # source/sw/src/sounds.cpp # source/sw/src/sprite.cpp # source/sw/src/swconfig.cpp # source/sw/src/weapon.cpp
This commit is contained in:
parent
5a6096c740
commit
896de8aa1c
51 changed files with 186 additions and 984 deletions
|
@ -499,8 +499,8 @@ DoFireFly(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoGenerateSewerDebris(short SpriteNum)
|
DoGenerateSewerDebris(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum], np;
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum], nu;
|
USERp u = User[SpriteNum];
|
||||||
short n;
|
short n;
|
||||||
|
|
||||||
static STATEp Debris[] =
|
static STATEp Debris[] =
|
||||||
|
@ -518,8 +518,6 @@ DoGenerateSewerDebris(short SpriteNum)
|
||||||
u->Tics = u->WaitTics;
|
u->Tics = u->WaitTics;
|
||||||
|
|
||||||
n = SpawnSprite(STAT_DEAD_ACTOR, 0, Debris[RANDOM_P2(4<<8)>>8], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 200);
|
n = SpawnSprite(STAT_DEAD_ACTOR, 0, Debris[RANDOM_P2(4<<8)>>8], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 200);
|
||||||
np = &sprite[n];
|
|
||||||
nu = User[n];
|
|
||||||
|
|
||||||
SetOwner(SpriteNum, n);
|
SetOwner(SpriteNum, n);
|
||||||
}
|
}
|
||||||
|
@ -805,8 +803,6 @@ DoActorStopFall(short SpriteNum)
|
||||||
// don't stand on face or wall sprites - jump again
|
// don't stand on face or wall sprites - jump again
|
||||||
if (u->lo_sp && !TEST(u->lo_sp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR))
|
if (u->lo_sp && !TEST(u->lo_sp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR))
|
||||||
{
|
{
|
||||||
USERp tu = User[u->lo_sp - sprite];
|
|
||||||
|
|
||||||
//sp->ang = NORM_ANGLE(sp->ang + (RANDOM_P2(64<<8)>>8) - 32);
|
//sp->ang = NORM_ANGLE(sp->ang + (RANDOM_P2(64<<8)>>8) - 32);
|
||||||
sp->ang = NORM_ANGLE(sp->ang + 1024 + (RANDOM_P2(512<<8)>>8));
|
sp->ang = NORM_ANGLE(sp->ang + 1024 + (RANDOM_P2(512<<8)>>8));
|
||||||
u->jump_speed = -350;
|
u->jump_speed = -350;
|
||||||
|
@ -878,7 +874,6 @@ int
|
||||||
DoBeginJump(short SpriteNum)
|
DoBeginJump(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
SET(u->Flags, SPR_JUMPING);
|
SET(u->Flags, SPR_JUMPING);
|
||||||
RESET(u->Flags, SPR_FALLING);
|
RESET(u->Flags, SPR_FALLING);
|
||||||
|
|
|
@ -64,7 +64,6 @@ void DebugMoveHit(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
extern SWBOOL DebugActor;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -102,7 +101,6 @@ void DebugMoveHit(short SpriteNum)
|
||||||
SWBOOL ActorMoveHitReact(short SpriteNum)
|
SWBOOL ActorMoveHitReact(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
// Should only return TRUE if there is a reaction to what was hit that
|
// Should only return TRUE if there is a reaction to what was hit that
|
||||||
// would cause the calling function to abort
|
// would cause the calling function to abort
|
||||||
|
@ -112,11 +110,9 @@ SWBOOL ActorMoveHitReact(short SpriteNum)
|
||||||
case HIT_SPRITE:
|
case HIT_SPRITE:
|
||||||
{
|
{
|
||||||
short HitSprite = NORM_SPRITE(u->ret);
|
short HitSprite = NORM_SPRITE(u->ret);
|
||||||
SPRITEp hsp;
|
|
||||||
USERp hu;
|
USERp hu;
|
||||||
ANIMATORp action;
|
ANIMATORp action;
|
||||||
|
|
||||||
hsp = &sprite[HitSprite];
|
|
||||||
hu = User[HitSprite];
|
hu = User[HitSprite];
|
||||||
|
|
||||||
|
|
||||||
|
@ -317,7 +313,7 @@ CanSeePlayer(short SpriteNum)
|
||||||
int
|
int
|
||||||
CanHitPlayer(short SpriteNum)
|
CanHitPlayer(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum], hu;
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP, hp;
|
SPRITEp sp = User[SpriteNum]->SpriteP, hp;
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
int xvect,yvect,zvect;
|
int xvect,yvect,zvect;
|
||||||
|
@ -331,7 +327,6 @@ CanHitPlayer(short SpriteNum)
|
||||||
zhs = sp->z - DIV2(SPRITEp_SIZE_Z(sp));
|
zhs = sp->z - DIV2(SPRITEp_SIZE_Z(sp));
|
||||||
|
|
||||||
hp = u->tgt_sp;
|
hp = u->tgt_sp;
|
||||||
hu = User[u->tgt_sp - sprite];
|
|
||||||
|
|
||||||
// get angle to target
|
// get angle to target
|
||||||
ang = getangle(hp->x - sp->x, hp->y - sp->y);
|
ang = getangle(hp->x - sp->x, hp->y - sp->y);
|
||||||
|
@ -385,7 +380,7 @@ DoActorPickClosePlayer(short SpriteNum)
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
int dist, near_dist = MAX_ACTIVE_RANGE, a,b,c;
|
int dist, near_dist = MAX_ACTIVE_RANGE, a,b,c;
|
||||||
short pnum;
|
short pnum;
|
||||||
PLAYERp pp,tp;
|
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 ICanSee = FALSE;
|
||||||
|
@ -506,7 +501,6 @@ int
|
||||||
GetPlayerSpriteNum(short SpriteNum)
|
GetPlayerSpriteNum(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
short pnum;
|
short pnum;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
|
|
||||||
|
@ -628,9 +622,7 @@ DoActorActionDecide(short SpriteNum)
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
int dist;
|
int dist;
|
||||||
short pnum;
|
|
||||||
ANIMATORp action;
|
ANIMATORp action;
|
||||||
PLAYERp pp;
|
|
||||||
USERp pu=NULL;
|
USERp pu=NULL;
|
||||||
SWBOOL ICanSee=FALSE;
|
SWBOOL ICanSee=FALSE;
|
||||||
|
|
||||||
|
@ -1275,8 +1267,6 @@ FindTrackToPlayer(USERp u)
|
||||||
short
|
short
|
||||||
FindTrackAwayFromPlayer(USERp u)
|
FindTrackAwayFromPlayer(USERp u)
|
||||||
{
|
{
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
|
|
||||||
short point, track_dir, track;
|
short point, track_dir, track;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
@ -1322,8 +1312,6 @@ FindTrackAwayFromPlayer(USERp u)
|
||||||
short
|
short
|
||||||
FindWanderTrack(USERp u)
|
FindWanderTrack(USERp u)
|
||||||
{
|
{
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
|
|
||||||
short point, track_dir, track;
|
short point, track_dir, track;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
@ -1396,7 +1384,6 @@ int
|
||||||
InitActorRunToward(short SpriteNum)
|
InitActorRunToward(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
//MONO_PRINT("InitActorRunToward\n");
|
//MONO_PRINT("InitActorRunToward\n");
|
||||||
|
|
||||||
|
@ -1501,7 +1488,6 @@ InitActorAttack(short SpriteNum)
|
||||||
{
|
{
|
||||||
//#define SUICIDE_HEALTH_VALUE 26
|
//#define SUICIDE_HEALTH_VALUE 26
|
||||||
#define SUICIDE_HEALTH_VALUE 38
|
#define SUICIDE_HEALTH_VALUE 38
|
||||||
extern STATEp sg_NinjaGrabThroat[];
|
|
||||||
//#define SUICIDE_HEALTH_VALUE 50
|
//#define SUICIDE_HEALTH_VALUE 50
|
||||||
|
|
||||||
if (u->Health < SUICIDE_HEALTH_VALUE)
|
if (u->Health < SUICIDE_HEALTH_VALUE)
|
||||||
|
@ -1685,7 +1671,6 @@ int
|
||||||
DoActorDuck(short SpriteNum)
|
DoActorDuck(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if ((u->WaitTics -= ACTORMOVETICS) < 0)
|
if ((u->WaitTics -= ACTORMOVETICS) < 0)
|
||||||
{
|
{
|
||||||
|
@ -2070,7 +2055,6 @@ int
|
||||||
InitActorPause(short SpriteNum)
|
InitActorPause(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
u->ActorActionFunc = DoActorPause;
|
u->ActorActionFunc = DoActorPause;
|
||||||
|
|
||||||
|
@ -2087,7 +2071,6 @@ int
|
||||||
DoActorPause(short SpriteNum)
|
DoActorPause(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
// Using Vis instead of WaitTics, var name sucks, but it's the same type
|
// Using Vis instead of WaitTics, var name sucks, but it's the same type
|
||||||
// WaitTics is used by too much other actor code and causes problems here
|
// WaitTics is used by too much other actor code and causes problems here
|
||||||
|
|
|
@ -227,7 +227,7 @@ void
|
||||||
playanm(short anim_num)
|
playanm(short anim_num)
|
||||||
{
|
{
|
||||||
unsigned char *animbuf;
|
unsigned char *animbuf;
|
||||||
int i, j, k, length = 0, numframes = 0;
|
int i, length = 0, numframes = 0;
|
||||||
int32_t handle = -1;
|
int32_t handle = -1;
|
||||||
|
|
||||||
ANIMnum = anim_num;
|
ANIMnum = anim_num;
|
||||||
|
|
|
@ -561,7 +561,6 @@ void SetBorder(PLAYERp pp, int value)
|
||||||
void
|
void
|
||||||
SetRedrawScreen(PLAYERp pp)
|
SetRedrawScreen(PLAYERp pp)
|
||||||
{
|
{
|
||||||
BORDER_INFO *b;
|
|
||||||
|
|
||||||
if (pp != Player + myconnectindex)
|
if (pp != Player + myconnectindex)
|
||||||
return;
|
return;
|
||||||
|
@ -575,8 +574,6 @@ SetRedrawScreen(PLAYERp pp)
|
||||||
// Redraw the BORDER_TILE only if getting smaller
|
// Redraw the BORDER_TILE only if getting smaller
|
||||||
BorderInfo = BorderInfoValues[gs.BorderNum];
|
BorderInfo = BorderInfoValues[gs.BorderNum];
|
||||||
|
|
||||||
b = &BorderInfo;
|
|
||||||
|
|
||||||
// test at redrawing the whole screen
|
// test at redrawing the whole screen
|
||||||
RedrawScreen = TRUE;
|
RedrawScreen = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -764,7 +764,6 @@ int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, sh
|
||||||
WALLp wp;
|
WALLp wp;
|
||||||
int nx,ny;
|
int nx,ny;
|
||||||
short wall_ang;
|
short wall_ang;
|
||||||
int ret=0;
|
|
||||||
|
|
||||||
w = hit_wall;
|
w = hit_wall;
|
||||||
wp = &wall[w];
|
wp = &wall[w];
|
||||||
|
@ -827,7 +826,6 @@ int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, sh
|
||||||
// If the tough parameter is not set, then it can't break tough walls and sprites
|
// If the tough parameter is not set, then it can't break tough walls and sprites
|
||||||
SWBOOL HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, short ang, short type)
|
SWBOOL HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, short ang, short type)
|
||||||
{
|
{
|
||||||
short SpriteNum;
|
|
||||||
short match = wp->hitag;
|
short match = wp->hitag;
|
||||||
|
|
||||||
if (match > 0)
|
if (match > 0)
|
||||||
|
@ -854,7 +852,6 @@ int KillBreakSprite(short BreakSprite)
|
||||||
{
|
{
|
||||||
SPRITEp bp = &sprite[BreakSprite];
|
SPRITEp bp = &sprite[BreakSprite];
|
||||||
USERp bu = User[BreakSprite];
|
USERp bu = User[BreakSprite];
|
||||||
short i;
|
|
||||||
|
|
||||||
// Does not actually kill the sprite so it will be valid for the rest
|
// Does not actually kill the sprite so it will be valid for the rest
|
||||||
// of the loop traversal.
|
// of the loop traversal.
|
||||||
|
@ -1058,10 +1055,6 @@ int HitBreakSprite(short BreakSprite, short type)
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
SPRITEp bp = &sprite[BreakSprite];
|
SPRITEp bp = &sprite[BreakSprite];
|
||||||
USERp bu = User[BreakSprite];
|
USERp bu = User[BreakSprite];
|
||||||
short match = bp->lotag;
|
|
||||||
short match_extra;
|
|
||||||
short SpriteNum;
|
|
||||||
BREAK_INFOp break_info;
|
|
||||||
|
|
||||||
// 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)
|
||||||
|
|
|
@ -827,7 +827,6 @@ GetBunnyJumpHeight(short jump_speed, short jump_grav)
|
||||||
int
|
int
|
||||||
PickBunnyJumpSpeed(short SpriteNum, int pix_height)
|
PickBunnyJumpSpeed(short SpriteNum, int pix_height)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
ASSERT(pix_height < 128);
|
ASSERT(pix_height < 128);
|
||||||
|
@ -858,7 +857,6 @@ DoBunnyBeginJumpAttack(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
||||||
int dist;
|
|
||||||
int CanSeePlayer(short SpriteNum);
|
int CanSeePlayer(short SpriteNum);
|
||||||
short tang;
|
short tang;
|
||||||
|
|
||||||
|
@ -1110,7 +1108,6 @@ DoBunnyQuickJump(short SpriteNum)
|
||||||
int
|
int
|
||||||
NullBunny(short SpriteNum)
|
NullBunny(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
|
|
||||||
|
@ -1137,7 +1134,6 @@ NullBunny(short SpriteNum)
|
||||||
|
|
||||||
int DoBunnyPain(short SpriteNum)
|
int DoBunnyPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullBunny(SpriteNum);
|
NullBunny(SpriteNum);
|
||||||
|
@ -1257,9 +1253,8 @@ void BunnyHatch(short Weapon)
|
||||||
int BunnyHatch2(short Weapon)
|
int BunnyHatch2(short Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp wp = &sprite[Weapon];
|
SPRITEp wp = &sprite[Weapon];
|
||||||
USERp wu = User[Weapon];
|
|
||||||
|
|
||||||
short New,i;
|
short New;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
|
|
||||||
|
@ -1466,7 +1461,6 @@ DoBunnyScrew(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
int dist;
|
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
||||||
{
|
{
|
||||||
|
|
|
@ -550,8 +550,6 @@ CHEAT_INFO ci[] =
|
||||||
// !JIM! My simplified version of CheatInput which simply processes MessageInputString
|
// !JIM! My simplified version of CheatInput which simply processes MessageInputString
|
||||||
void CheatInput(void)
|
void CheatInput(void)
|
||||||
{
|
{
|
||||||
static SWBOOL cur_show;
|
|
||||||
int ret;
|
|
||||||
SWBOOL match = FALSE;
|
SWBOOL match = FALSE;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
|
|
@ -589,12 +589,10 @@ NewCoolg(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoCoolgBirth(short New)
|
DoCoolgBirth(short New)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
|
||||||
USERp u;
|
USERp u;
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
u = User[New];
|
u = User[New];
|
||||||
sp = &sprite[New];
|
|
||||||
|
|
||||||
u->Health = HEALTH_COOLIE_GHOST;
|
u->Health = HEALTH_COOLIE_GHOST;
|
||||||
u->Attrib = &CoolgAttrib;
|
u->Attrib = &CoolgAttrib;
|
||||||
|
@ -617,7 +615,6 @@ DoCoolgBirth(short New)
|
||||||
int NullCoolg(short SpriteNum)
|
int NullCoolg(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
u->ShellNum -= ACTORMOVETICS;
|
u->ShellNum -= ACTORMOVETICS;
|
||||||
|
|
||||||
|
@ -751,7 +748,6 @@ int DoCoolgCircle(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp tsp = User[SpriteNum]->tgt_sp;
|
|
||||||
int nx,ny,bound;
|
int nx,ny,bound;
|
||||||
|
|
||||||
|
|
||||||
|
@ -924,7 +920,6 @@ int DoCoolgMove(short SpriteNum)
|
||||||
|
|
||||||
int DoCoolgPain(short SpriteNum)
|
int DoCoolgPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullCoolg(SpriteNum);
|
NullCoolg(SpriteNum);
|
||||||
|
|
|
@ -574,7 +574,6 @@ SetupCoolie(short SpriteNum)
|
||||||
int NewCoolg(short);
|
int NewCoolg(short);
|
||||||
int SpawnCoolg(short SpriteNum)
|
int SpawnCoolg(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
// Don't do a ghost every time
|
// Don't do a ghost every time
|
||||||
if (RANDOM_RANGE(1000) > 700)
|
if (RANDOM_RANGE(1000) > 700)
|
||||||
|
@ -593,7 +592,6 @@ int SpawnCoolg(short SpriteNum)
|
||||||
int CooliePain(short SpriteNum)
|
int CooliePain(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
DoActorSlide(SpriteNum);
|
DoActorSlide(SpriteNum);
|
||||||
|
@ -612,7 +610,6 @@ int CooliePain(short SpriteNum)
|
||||||
int NullCoolie(short SpriteNum)
|
int NullCoolie(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
DoActorSlide(SpriteNum);
|
DoActorSlide(SpriteNum);
|
||||||
|
@ -659,7 +656,6 @@ int DoCoolieMove(short SpriteNum)
|
||||||
int InitCoolieCharge(short SpriteNum)
|
int InitCoolieCharge(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
if (RANDOM_P2(1024) > 950)
|
if (RANDOM_P2(1024) > 950)
|
||||||
PlaySound(DIGI_COOLIESCREAM, sp, v3df_follow);
|
PlaySound(DIGI_COOLIESCREAM, sp, v3df_follow);
|
||||||
|
@ -677,11 +673,9 @@ int InitCoolieCharge(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoCoolieWaitBirth(short SpriteNum)
|
DoCoolieWaitBirth(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
|
||||||
USERp u;
|
USERp u;
|
||||||
|
|
||||||
u = User[SpriteNum];
|
u = User[SpriteNum];
|
||||||
sp = &sprite[SpriteNum];
|
|
||||||
|
|
||||||
if ((u->Counter -= ACTORMOVETICS) <= 0)
|
if ((u->Counter -= ACTORMOVETICS) <= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -382,7 +382,6 @@ DemoPlayBack(void)
|
||||||
static int buf_ndx;
|
static int buf_ndx;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
ControlInfo info;
|
ControlInfo info;
|
||||||
int Xdim, Ydim, ScreenSize;
|
|
||||||
|
|
||||||
// Initialize Game part of network code (When ready2send != 0)
|
// Initialize Game part of network code (When ready2send != 0)
|
||||||
InitNetVars();
|
InitNetVars();
|
||||||
|
|
|
@ -104,11 +104,9 @@ GetRotation(short tSpriteNum, int viewx, int viewy)
|
||||||
static short RotTable8[] = {0, 7, 6, 5, 4, 3, 2, 1};
|
static short RotTable8[] = {0, 7, 6, 5, 4, 3, 2, 1};
|
||||||
static short RotTable5[] = {0, 1, 2, 3, 4, 3, 2, 1};
|
static short RotTable5[] = {0, 1, 2, 3, 4, 3, 2, 1};
|
||||||
short rotation;
|
short rotation;
|
||||||
extern short screenpeek;
|
|
||||||
|
|
||||||
tspriteptr_t tsp = &tsprite[tSpriteNum];
|
tspriteptr_t tsp = &tsprite[tSpriteNum];
|
||||||
USERp tu = User[tsp->owner];
|
USERp tu = User[tsp->owner];
|
||||||
PLAYERp pp = Player + screenpeek;
|
|
||||||
short angle2;
|
short angle2;
|
||||||
|
|
||||||
if (tu->RotNum == 0)
|
if (tu->RotNum == 0)
|
||||||
|
@ -243,7 +241,6 @@ DoShadowFindGroundPoint(tspriteptr_t sp)
|
||||||
int ceilhit, florhit;
|
int ceilhit, florhit;
|
||||||
int hiz, loz = u->loz;
|
int hiz, loz = u->loz;
|
||||||
short save_cstat, bak_cstat;
|
short save_cstat, bak_cstat;
|
||||||
SWBOOL found = FALSE;
|
|
||||||
|
|
||||||
// recursive routine to find the ground - either sector or floor sprite
|
// recursive routine to find the ground - either sector or floor sprite
|
||||||
// skips over enemy and other types of sprites
|
// skips over enemy and other types of sprites
|
||||||
|
@ -666,8 +663,8 @@ void DoStarView(tspriteptr_t tsp, USERp tu, int viewz)
|
||||||
void
|
void
|
||||||
analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
|
analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
|
||||||
{
|
{
|
||||||
int tSpriteNum, j, k;
|
int tSpriteNum;
|
||||||
short SpriteNum, pnum;
|
short SpriteNum;
|
||||||
int smr4, smr2;
|
int smr4, smr2;
|
||||||
USERp tu;
|
USERp tu;
|
||||||
static int ang = 0;
|
static int ang = 0;
|
||||||
|
@ -1149,7 +1146,7 @@ BackView(int *nx, int *ny, int *nz, short *vsect, short *nang, short horiz)
|
||||||
vec3_t n = { *nx, *ny, *nz };
|
vec3_t n = { *nx, *ny, *nz };
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
int i, vx, vy, vz, hx, hy, hz;
|
int i, vx, vy, vz, hx, hy;
|
||||||
short bakcstat, daang;
|
short bakcstat, daang;
|
||||||
PLAYERp pp = &Player[screenpeek];
|
PLAYERp pp = &Player[screenpeek];
|
||||||
short ang;
|
short ang;
|
||||||
|
@ -1268,7 +1265,7 @@ CircleCamera(int *nx, int *ny, int *nz, short *vsect, short *nang, short horiz)
|
||||||
vec3_t n = { *nx, *ny, *nz };
|
vec3_t n = { *nx, *ny, *nz };
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
int i, vx, vy, vz, hx, hy, hz;
|
int i, vx, vy, vz, hx, hy;
|
||||||
short bakcstat, daang;
|
short bakcstat, daang;
|
||||||
PLAYERp pp = &Player[screenpeek];
|
PLAYERp pp = &Player[screenpeek];
|
||||||
short ang;
|
short ang;
|
||||||
|
@ -1555,7 +1552,6 @@ void DrawMessageInput(PLAYERp pp)
|
||||||
|
|
||||||
void DrawCrosshair(PLAYERp pp)
|
void DrawCrosshair(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern int CrosshairX, CrosshairY;
|
|
||||||
extern SWBOOL DemoMode,CameraTestMode;
|
extern SWBOOL DemoMode,CameraTestMode;
|
||||||
|
|
||||||
if (!cl_crosshair)
|
if (!cl_crosshair)
|
||||||
|
@ -1813,16 +1809,9 @@ void PreDrawStackedWater(void)
|
||||||
{
|
{
|
||||||
short si,snexti;
|
short si,snexti;
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
SPRITEp sp,np;
|
SPRITEp sp;
|
||||||
USERp u,nu;
|
USERp u,nu;
|
||||||
short New;
|
short New;
|
||||||
int smr4,smr2;
|
|
||||||
int x,y,z;
|
|
||||||
short ang;
|
|
||||||
PLAYERp pp = Player + screenpeek;
|
|
||||||
|
|
||||||
smr4 = smoothratio + (((int) MoveSkip4) << 16);
|
|
||||||
smr2 = smoothratio + (((int) MoveSkip2) << 16);
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_CEILING_FLOOR_PIC_OVERRIDE], si, snexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_CEILING_FLOOR_PIC_OVERRIDE], si, snexti)
|
||||||
{
|
{
|
||||||
|
@ -1846,8 +1835,6 @@ void PreDrawStackedWater(void)
|
||||||
New = ConnectCopySprite((uspritetype const *)sp);
|
New = ConnectCopySprite((uspritetype const *)sp);
|
||||||
if (New >= 0)
|
if (New >= 0)
|
||||||
{
|
{
|
||||||
np = &sprite[New];
|
|
||||||
|
|
||||||
// spawn a user
|
// spawn a user
|
||||||
User[New] = nu = (USERp)CallocMem(sizeof(USER), 1);
|
User[New] = nu = (USERp)CallocMem(sizeof(USER), 1);
|
||||||
ASSERT(nu != NULL);
|
ASSERT(nu != NULL);
|
||||||
|
@ -1946,10 +1933,9 @@ void
|
||||||
drawscreen(PLAYERp pp)
|
drawscreen(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern SWBOOL DemoMode,CameraTestMode;
|
extern SWBOOL DemoMode,CameraTestMode;
|
||||||
int tx, ty, tz,thoriz,pp_siz;
|
int tx, ty, tz,thoriz;
|
||||||
short tang,tsectnum;
|
short tang,tsectnum;
|
||||||
short i,j;
|
short i,j;
|
||||||
int tiltlock;
|
|
||||||
int bob_amt = 0;
|
int bob_amt = 0;
|
||||||
int quake_z, quake_x, quake_y;
|
int quake_z, quake_x, quake_y;
|
||||||
short quake_ang;
|
short quake_ang;
|
||||||
|
@ -2064,7 +2050,6 @@ drawscreen(PLAYERp pp)
|
||||||
pp->six = tx;
|
pp->six = tx;
|
||||||
pp->siy = ty;
|
pp->siy = ty;
|
||||||
pp->siz = tz - pp->posz;
|
pp->siz = tz - pp->posz;
|
||||||
pp_siz = tz;
|
|
||||||
pp->siang = tang;
|
pp->siang = tang;
|
||||||
|
|
||||||
if (pp->sop_riding || pp->sop_control)
|
if (pp->sop_riding || pp->sop_control)
|
||||||
|
@ -2320,7 +2305,6 @@ DrawCompass(PLAYERp pp)
|
||||||
short x;
|
short x;
|
||||||
short i;
|
short i;
|
||||||
int flags;
|
int flags;
|
||||||
PANEL_SPRITEp psp;
|
|
||||||
|
|
||||||
static short CompassPic[32] =
|
static short CompassPic[32] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -448,7 +448,6 @@ NewEel(short SpriteNum)
|
||||||
int NullEel(short SpriteNum)
|
int NullEel(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
DoActorSlide(SpriteNum);
|
DoActorSlide(SpriteNum);
|
||||||
|
@ -604,7 +603,6 @@ DoEelDeath(short SpriteNum)
|
||||||
|
|
||||||
int DoEelMove(short SpriteNum)
|
int DoEelMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
ASSERT(u->Rot != NULL);
|
ASSERT(u->Rot != NULL);
|
||||||
|
|
|
@ -599,9 +599,6 @@ setup2dscreen(void)
|
||||||
|
|
||||||
void TerminateGame(void)
|
void TerminateGame(void)
|
||||||
{
|
{
|
||||||
int i,j;
|
|
||||||
int oldtotalclock;
|
|
||||||
|
|
||||||
DemoTerm();
|
DemoTerm();
|
||||||
|
|
||||||
ErrorCorrectionQuit();
|
ErrorCorrectionQuit();
|
||||||
|
@ -944,9 +941,7 @@ void InitNewGame(void)
|
||||||
|
|
||||||
void FindLevelInfo(char *map_name, short *level)
|
void FindLevelInfo(char *map_name, short *level)
|
||||||
{
|
{
|
||||||
char *ptr;
|
short j;
|
||||||
char buff[16];
|
|
||||||
short i,j;
|
|
||||||
|
|
||||||
for (j = 1; j <= MAX_LEVELS; j++)
|
for (j = 1; j <= MAX_LEVELS; j++)
|
||||||
{
|
{
|
||||||
|
@ -1440,7 +1435,6 @@ void PlayTheme()
|
||||||
|
|
||||||
void LogoLevel(void)
|
void LogoLevel(void)
|
||||||
{
|
{
|
||||||
char called;
|
|
||||||
int fin;
|
int fin;
|
||||||
|
|
||||||
if (userConfig.nologo) return;
|
if (userConfig.nologo) return;
|
||||||
|
@ -1507,9 +1501,6 @@ void LogoLevel(void)
|
||||||
|
|
||||||
void CreditsLevel(void)
|
void CreditsLevel(void)
|
||||||
{
|
{
|
||||||
char called;
|
|
||||||
int fin;
|
|
||||||
int i;
|
|
||||||
int curpic;
|
int curpic;
|
||||||
int handle;
|
int handle;
|
||||||
uint32_t timer = 0;
|
uint32_t timer = 0;
|
||||||
|
@ -1610,7 +1601,6 @@ void SybexScreen(void)
|
||||||
void
|
void
|
||||||
TitleLevel(void)
|
TitleLevel(void)
|
||||||
{
|
{
|
||||||
char called;
|
|
||||||
int fin;
|
int fin;
|
||||||
unsigned char backup_pal[256*3];
|
unsigned char backup_pal[256*3];
|
||||||
unsigned char pal[PAL_SIZE];
|
unsigned char pal[PAL_SIZE];
|
||||||
|
@ -1707,8 +1697,6 @@ void IntroAnimLevel(void)
|
||||||
|
|
||||||
void MenuLevel(void)
|
void MenuLevel(void)
|
||||||
{
|
{
|
||||||
char called;
|
|
||||||
int fin;
|
|
||||||
short w,h;
|
short w,h;
|
||||||
|
|
||||||
M_StartControlPanel(false);
|
M_StartControlPanel(false);
|
||||||
|
@ -1795,7 +1783,6 @@ void MenuLevel(void)
|
||||||
{
|
{
|
||||||
if (MultiPlayQuitFlag)
|
if (MultiPlayQuitFlag)
|
||||||
{
|
{
|
||||||
short pnum;
|
|
||||||
uint8_t pbuf[1];
|
uint8_t pbuf[1];
|
||||||
QuitFlag = TRUE;
|
QuitFlag = TRUE;
|
||||||
pbuf[0] = PACKET_TYPE_MENU_LEVEL_QUIT;
|
pbuf[0] = PACKET_TYPE_MENU_LEVEL_QUIT;
|
||||||
|
@ -1876,7 +1863,6 @@ void LoadingLevelScreen(char *level_name)
|
||||||
{
|
{
|
||||||
short w,h;
|
short w,h;
|
||||||
extern SWBOOL DemoMode;
|
extern SWBOOL DemoMode;
|
||||||
extern char *MNU_LevelName[28];
|
|
||||||
DrawLoadLevelScreen();
|
DrawLoadLevelScreen();
|
||||||
|
|
||||||
if (DemoMode)
|
if (DemoMode)
|
||||||
|
@ -1955,10 +1941,7 @@ void BonusScreen(PLAYERp pp)
|
||||||
int minutes,seconds,second_tics;
|
int minutes,seconds,second_tics;
|
||||||
|
|
||||||
short w,h;
|
short w,h;
|
||||||
short pic,limit;
|
short limit;
|
||||||
int zero=0;
|
|
||||||
int handle = 0;
|
|
||||||
short LI_Num;
|
|
||||||
|
|
||||||
|
|
||||||
#define BONUS_SCREEN_PIC 5120
|
#define BONUS_SCREEN_PIC 5120
|
||||||
|
@ -2221,14 +2204,8 @@ void EndGameSequence(void)
|
||||||
|
|
||||||
void StatScreen(PLAYERp mpp)
|
void StatScreen(PLAYERp mpp)
|
||||||
{
|
{
|
||||||
int minutes,seconds,second_tics;
|
|
||||||
extern SWBOOL FinishedLevel;
|
extern SWBOOL FinishedLevel;
|
||||||
extern int PlayClock;
|
|
||||||
extern short LevelSecrets;
|
|
||||||
extern short TotalKillable;
|
|
||||||
short w,h;
|
short w,h;
|
||||||
int zero=0;
|
|
||||||
int handle=0;
|
|
||||||
|
|
||||||
short rows,cols,i,j;
|
short rows,cols,i,j;
|
||||||
PLAYERp pp = NULL;
|
PLAYERp pp = NULL;
|
||||||
|
@ -2542,7 +2519,6 @@ void InitPlayerGameSettings(void)
|
||||||
|
|
||||||
void InitRunLevel(void)
|
void InitRunLevel(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
if (DemoEdit)
|
if (DemoEdit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2627,7 +2603,6 @@ void faketimerhandler();
|
||||||
|
|
||||||
void RunLevel(void)
|
void RunLevel(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
InitRunLevel();
|
InitRunLevel();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -2755,13 +2730,10 @@ void CommandLineHelp(char const * const * argv)
|
||||||
int32_t GameInterface::app_main()
|
int32_t GameInterface::app_main()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int stat, nexti;
|
|
||||||
char type;
|
|
||||||
extern int MovesPerPacket;
|
extern int MovesPerPacket;
|
||||||
void DoSector(void);
|
void DoSector(void);
|
||||||
void gameinput(void);
|
void gameinput(void);
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
uint32_t TotalMemory;
|
|
||||||
|
|
||||||
automapping = 1;
|
automapping = 1;
|
||||||
BorderAdjust = true;
|
BorderAdjust = true;
|
||||||
|
@ -2803,7 +2775,6 @@ int32_t GameInterface::app_main()
|
||||||
void ManualPlayerInsert(PLAYERp pp)
|
void ManualPlayerInsert(PLAYERp pp)
|
||||||
{
|
{
|
||||||
PLAYERp npp = Player + numplayers;
|
PLAYERp npp = Player + numplayers;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (numplayers < MAX_SW_PLAYERS)
|
if (numplayers < MAX_SW_PLAYERS)
|
||||||
{
|
{
|
||||||
|
@ -2834,7 +2805,6 @@ void ManualPlayerInsert(PLAYERp pp)
|
||||||
void BotPlayerInsert(PLAYERp pp)
|
void BotPlayerInsert(PLAYERp pp)
|
||||||
{
|
{
|
||||||
PLAYERp npp = Player + numplayers;
|
PLAYERp npp = Player + numplayers;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (numplayers < MAX_SW_PLAYERS)
|
if (numplayers < MAX_SW_PLAYERS)
|
||||||
{
|
{
|
||||||
|
@ -2867,7 +2837,6 @@ void ManualPlayerDelete(PLAYERp cur_pp)
|
||||||
{
|
{
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
USERp u;
|
USERp u;
|
||||||
short save_myconnectindex;
|
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (numplayers > 1)
|
||||||
|
@ -2903,7 +2872,6 @@ char WangBangMacro[10][64];
|
||||||
void
|
void
|
||||||
FunctionKeys(PLAYERp pp)
|
FunctionKeys(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern SWBOOL GamePaused;
|
|
||||||
static int rts_delay = 0;
|
static int rts_delay = 0;
|
||||||
int fn_key = 0;
|
int fn_key = 0;
|
||||||
|
|
||||||
|
@ -3002,7 +2970,6 @@ FunctionKeys(PLAYERp pp)
|
||||||
void PauseKey(PLAYERp pp)
|
void PauseKey(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern SWBOOL GamePaused,CheatInputMode;
|
extern SWBOOL GamePaused,CheatInputMode;
|
||||||
extern SWBOOL enabled;
|
|
||||||
|
|
||||||
if (inputState.GetKeyStatus(sc_Pause) && !CommEnabled && !InputMode && !M_Active() && !CheatInputMode && !ConPanel)
|
if (inputState.GetKeyStatus(sc_Pause) && !CommEnabled && !InputMode && !M_Active() && !CheatInputMode && !ConPanel)
|
||||||
{
|
{
|
||||||
|
@ -3051,11 +3018,9 @@ short MirrorDelay;
|
||||||
|
|
||||||
void getinput(SW_PACKET *loc)
|
void getinput(SW_PACKET *loc)
|
||||||
{
|
{
|
||||||
SWBOOL found = FALSE;
|
|
||||||
int i;
|
int i;
|
||||||
PLAYERp pp = Player + myconnectindex;
|
PLAYERp pp = Player + myconnectindex;
|
||||||
PLAYERp newpp = Player + myconnectindex;
|
PLAYERp newpp = Player + myconnectindex;
|
||||||
int pnum = myconnectindex;
|
|
||||||
int inv_hotkey = 0;
|
int inv_hotkey = 0;
|
||||||
|
|
||||||
#define TURBOTURNTIME (120/8)
|
#define TURBOTURNTIME (120/8)
|
||||||
|
|
|
@ -721,7 +721,6 @@ SetupGirlNinja(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u;
|
USERp u;
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
short pic = sp->picnum;
|
|
||||||
|
|
||||||
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||||
{
|
{
|
||||||
|
@ -757,7 +756,6 @@ int
|
||||||
DoGirlNinjaMove(short SpriteNum)
|
DoGirlNinjaMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
// jumping and falling
|
// jumping and falling
|
||||||
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING) && !TEST(u->Flags, SPR_CLIMBING))
|
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING) && !TEST(u->Flags, SPR_CLIMBING))
|
||||||
|
@ -821,7 +819,6 @@ int
|
||||||
NullGirlNinja(short SpriteNum)
|
NullGirlNinja(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (u->WaitTics > 0) u->WaitTics -= ACTORMOVETICS;
|
if (u->WaitTics > 0) u->WaitTics -= ACTORMOVETICS;
|
||||||
|
|
||||||
|
@ -839,7 +836,6 @@ NullGirlNinja(short SpriteNum)
|
||||||
|
|
||||||
int DoGirlNinjaPain(short SpriteNum)
|
int DoGirlNinjaPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullGirlNinja(SpriteNum);
|
NullGirlNinja(SpriteNum);
|
||||||
|
|
|
@ -517,7 +517,6 @@ SetupGoro(short SpriteNum)
|
||||||
|
|
||||||
int NullGoro(short SpriteNum)
|
int NullGoro(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
ASSERT(SpriteNum >= 0);
|
ASSERT(SpriteNum >= 0);
|
||||||
|
@ -533,7 +532,6 @@ int NullGoro(short SpriteNum)
|
||||||
|
|
||||||
int DoGoroPain(short SpriteNum)
|
int DoGoroPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
ASSERT(SpriteNum >= 0);
|
ASSERT(SpriteNum >= 0);
|
||||||
|
@ -547,7 +545,6 @@ int DoGoroPain(short SpriteNum)
|
||||||
|
|
||||||
int DoGoroMove(short SpriteNum)
|
int DoGoroMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
ASSERT(SpriteNum >= 0);
|
ASSERT(SpriteNum >= 0);
|
||||||
|
|
|
@ -337,7 +337,6 @@ SetupHornet(short SpriteNum)
|
||||||
int NullHornet(short SpriteNum)
|
int NullHornet(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
DoActorSlide(SpriteNum);
|
DoActorSlide(SpriteNum);
|
||||||
|
@ -460,7 +459,6 @@ int DoHornetCircle(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp tsp = User[SpriteNum]->tgt_sp;
|
|
||||||
int nx,ny,bound;
|
int nx,ny,bound;
|
||||||
|
|
||||||
sp->ang = NORM_ANGLE(sp->ang + u->Counter2);
|
sp->ang = NORM_ANGLE(sp->ang + u->Counter2);
|
||||||
|
|
|
@ -110,9 +110,7 @@ void PanelInvTestSuicide(PANEL_SPRITEp psp);
|
||||||
void UpdateMiniBar(PLAYERp pp)
|
void UpdateMiniBar(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
short i;
|
|
||||||
int x,y;
|
int x,y;
|
||||||
SWBOOL found;
|
|
||||||
INVENTORY_DATAp id;
|
INVENTORY_DATAp id;
|
||||||
extern SWBOOL PanelUpdateMode;
|
extern SWBOOL PanelUpdateMode;
|
||||||
|
|
||||||
|
@ -258,7 +256,6 @@ void KillAllPanelInv(PLAYERp pp)
|
||||||
PANEL_SPRITEp SpawnIcon(PLAYERp pp, PANEL_STATEp state)
|
PANEL_SPRITEp SpawnIcon(PLAYERp pp, PANEL_STATEp state)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp psp;
|
PANEL_SPRITEp psp;
|
||||||
short i;
|
|
||||||
|
|
||||||
psp = pSpawnSprite(pp, state, PRI_FRONT, 0, 0);
|
psp = pSpawnSprite(pp, state, PRI_FRONT, 0, 0);
|
||||||
|
|
||||||
|
@ -352,8 +349,6 @@ void UseInventoryMedkit(PLAYERp pp)
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
void UseInventoryChemBomb(PLAYERp pp)
|
void UseInventoryChemBomb(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short diff;
|
|
||||||
short inv = INVENTORY_CHEMBOMB;
|
short inv = INVENTORY_CHEMBOMB;
|
||||||
|
|
||||||
if (!pp->InventoryAmount[inv])
|
if (!pp->InventoryAmount[inv])
|
||||||
|
@ -377,8 +372,6 @@ void UseInventoryChemBomb(PLAYERp pp)
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
void UseInventoryFlashBomb(PLAYERp pp)
|
void UseInventoryFlashBomb(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short diff;
|
|
||||||
short inv = INVENTORY_FLASHBOMB;
|
short inv = INVENTORY_FLASHBOMB;
|
||||||
|
|
||||||
if (!pp->InventoryAmount[inv])
|
if (!pp->InventoryAmount[inv])
|
||||||
|
@ -402,8 +395,6 @@ void UseInventoryFlashBomb(PLAYERp pp)
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
void UseInventoryCaltrops(PLAYERp pp)
|
void UseInventoryCaltrops(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short diff;
|
|
||||||
short inv = INVENTORY_CALTROPS;
|
short inv = INVENTORY_CALTROPS;
|
||||||
|
|
||||||
if (!pp->InventoryAmount[inv])
|
if (!pp->InventoryAmount[inv])
|
||||||
|
@ -428,7 +419,6 @@ void UseInventoryCaltrops(PLAYERp pp)
|
||||||
|
|
||||||
void UseInventoryRepairKit(PLAYERp pp)
|
void UseInventoryRepairKit(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
short inv = INVENTORY_REPAIR_KIT;
|
short inv = INVENTORY_REPAIR_KIT;
|
||||||
|
|
||||||
//PlaySound(DIGI_TOOLBOX, pp, v3df_none);
|
//PlaySound(DIGI_TOOLBOX, pp, v3df_none);
|
||||||
|
@ -585,7 +575,6 @@ DoPlayerNightVisionPalette(PLAYERp pp)
|
||||||
void
|
void
|
||||||
UseInventoryNightVision(PLAYERp pp)
|
UseInventoryNightVision(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
#define NIGHT_INVENTORY_TIME 30
|
#define NIGHT_INVENTORY_TIME 30
|
||||||
|
|
||||||
if (pp->InventoryActive[pp->InventoryNum])
|
if (pp->InventoryActive[pp->InventoryNum])
|
||||||
|
@ -606,8 +595,6 @@ UseInventoryNightVision(PLAYERp pp)
|
||||||
void
|
void
|
||||||
StopInventoryNightVision(PLAYERp pp, short InventoryNum)
|
StopInventoryNightVision(PLAYERp pp, short InventoryNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
|
|
||||||
pp->InventoryActive[InventoryNum] = FALSE;
|
pp->InventoryActive[InventoryNum] = FALSE;
|
||||||
|
|
||||||
if (pp->InventoryPercent[InventoryNum] <= 0)
|
if (pp->InventoryPercent[InventoryNum] <= 0)
|
||||||
|
@ -951,9 +938,6 @@ void (*InventoryDisplayString)(PLAYERp, short, short, short, const char *);
|
||||||
|
|
||||||
void PlayerUpdateInventory(PLAYERp pp, short InventoryNum)
|
void PlayerUpdateInventory(PLAYERp pp, short InventoryNum)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short w,h;
|
|
||||||
|
|
||||||
// Check for items that need to go translucent from use
|
// Check for items that need to go translucent from use
|
||||||
if (pp->InventoryBarTics)
|
if (pp->InventoryBarTics)
|
||||||
{
|
{
|
||||||
|
@ -1037,7 +1021,6 @@ void PlayerUpdateInventory(PLAYERp pp, short InventoryNum)
|
||||||
|
|
||||||
void PlayerUpdateInventoryPercent(PLAYERp pp)
|
void PlayerUpdateInventoryPercent(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short x,y;
|
short x,y;
|
||||||
INVENTORY_DATAp id = &InventoryData[pp->InventoryNum];
|
INVENTORY_DATAp id = &InventoryData[pp->InventoryNum];
|
||||||
|
|
||||||
|
@ -1058,7 +1041,6 @@ void PlayerUpdateInventoryPercent(PLAYERp pp)
|
||||||
|
|
||||||
void PlayerUpdateInventoryPic(PLAYERp pp)
|
void PlayerUpdateInventoryPic(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
PANEL_SPRITEp psp;
|
PANEL_SPRITEp psp;
|
||||||
short pic;
|
short pic;
|
||||||
short x,y;
|
short x,y;
|
||||||
|
@ -1076,7 +1058,6 @@ void PlayerUpdateInventoryPic(PLAYERp pp)
|
||||||
|
|
||||||
void PlayerUpdateInventoryState(PLAYERp pp)
|
void PlayerUpdateInventoryState(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short x,y;
|
short x,y;
|
||||||
INVENTORY_DATAp id = &InventoryData[pp->InventoryNum];
|
INVENTORY_DATAp id = &InventoryData[pp->InventoryNum];
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ void addconquote(const char *daquote)
|
||||||
#define CON_ROT_FLAGS (ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK)
|
#define CON_ROT_FLAGS (ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK)
|
||||||
void operateconfta(void)
|
void operateconfta(void)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j;
|
||||||
|
|
||||||
if (!ConPanel) return; // If panel isn't up, don't draw anything
|
if (!ConPanel) return; // If panel isn't up, don't draw anything
|
||||||
|
|
||||||
|
@ -422,7 +422,6 @@ void computergetinput(int snum, SW_PACKET *syn)
|
||||||
walltype *wal;
|
walltype *wal;
|
||||||
int myx, myy, myz, myang, mycursectnum;
|
int myx, myy, myz, myang, mycursectnum;
|
||||||
USERp u;
|
USERp u;
|
||||||
short weap;
|
|
||||||
//extern SWBOOL Pachinko_Win_Cheat;
|
//extern SWBOOL Pachinko_Win_Cheat;
|
||||||
|
|
||||||
if (!MoveSkip4) return; // Make it so the bots don't slow the game down so bad!
|
if (!MoveSkip4) return; // Make it so the bots don't slow the game down so bad!
|
||||||
|
|
|
@ -57,8 +57,6 @@ short mirrorcnt; //, floormirrorcnt;
|
||||||
//short floormirrorsector[MAXMIRRORS];
|
//short floormirrorsector[MAXMIRRORS];
|
||||||
SWBOOL mirrorinview;
|
SWBOOL mirrorinview;
|
||||||
|
|
||||||
static char tempbuf[/*max(576, */ MAXXDIM /*)*/];
|
|
||||||
|
|
||||||
SWBOOL MirrorMoveSkip16 = 0;
|
SWBOOL MirrorMoveSkip16 = 0;
|
||||||
|
|
||||||
// Voxel stuff
|
// Voxel stuff
|
||||||
|
@ -174,15 +172,14 @@ void
|
||||||
JS_SpriteSetup(void)
|
JS_SpriteSetup(void)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
short SpriteNum = 0, NextSprite, ndx;
|
short SpriteNum = 0, NextSprite;
|
||||||
USERp u;
|
USERp u;
|
||||||
short i, num;
|
short i;
|
||||||
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[0], SpriteNum, NextSprite)
|
TRAVERSE_SPRITE_STAT(headspritestat[0], SpriteNum, NextSprite)
|
||||||
{
|
{
|
||||||
short tag;
|
short tag;
|
||||||
short bit;
|
|
||||||
|
|
||||||
sp = &sprite[SpriteNum];
|
sp = &sprite[SpriteNum];
|
||||||
tag = sp->hitag;
|
tag = sp->hitag;
|
||||||
|
@ -304,11 +301,9 @@ JS_SpriteSetup(void)
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
void JS_InitMirrors(void)
|
void JS_InitMirrors(void)
|
||||||
{
|
{
|
||||||
short startwall, endwall, dasector;
|
short startwall, endwall;
|
||||||
int i, j, k, s, dax, day, daz, dax2, day2;
|
int i, j, s;
|
||||||
short SpriteNum = 0, NextSprite;
|
short SpriteNum = 0, NextSprite;
|
||||||
SPRITEp sp;
|
|
||||||
static short on_cam = 0;
|
|
||||||
SWBOOL Found_Cam = FALSE;
|
SWBOOL Found_Cam = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -351,7 +346,6 @@ void JS_InitMirrors(void)
|
||||||
{
|
{
|
||||||
short ii, nextii;
|
short ii, nextii;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u;
|
|
||||||
|
|
||||||
mirror[mirrorcnt].ismagic = TRUE;
|
mirror[mirrorcnt].ismagic = TRUE;
|
||||||
Found_Cam = FALSE;
|
Found_Cam = FALSE;
|
||||||
|
@ -536,14 +530,12 @@ short camplayerview = 1; // Don't show yourself!
|
||||||
void
|
void
|
||||||
JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
{
|
{
|
||||||
int j, dx, dy, top, bot, cnt;
|
int j, cnt;
|
||||||
int x1, y1, x2, y2, ox1, oy1, ox2, oy2, dist, maxdist;
|
int dist;
|
||||||
int tposx, tposy, thoriz;
|
int tposx, tposy; // Camera
|
||||||
int tcx, tcy, tcz; // Camera
|
int *longptr;
|
||||||
int tiltlock, *longptr;
|
|
||||||
fix16_t tang;
|
fix16_t tang;
|
||||||
char ch, *ptr, *ptr2, *ptr3, *ptr4;
|
char tvisibility;
|
||||||
char tvisibility, palok;
|
|
||||||
|
|
||||||
// int tx, ty, tz, tpang; // Interpolate so mirror doesn't
|
// int tx, ty, tz, tpang; // Interpolate so mirror doesn't
|
||||||
// drift!
|
// drift!
|
||||||
|
@ -620,7 +612,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
{
|
{
|
||||||
SPRITEp sp=NULL;
|
SPRITEp sp=NULL;
|
||||||
int camhoriz;
|
int camhoriz;
|
||||||
short wall_ang, w, nw, da, tda;
|
short w;
|
||||||
int dx, dy, dz, tdx, tdy, tdz, midx, midy;
|
int dx, dy, dz, tdx, tdy, tdz, midx, midy;
|
||||||
|
|
||||||
|
|
||||||
|
@ -639,7 +631,6 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
|
|
||||||
// Calculate the angle of the mirror wall
|
// Calculate the angle of the mirror wall
|
||||||
w = mirror[cnt].mirrorwall;
|
w = mirror[cnt].mirrorwall;
|
||||||
nw = wall[w].point2;
|
|
||||||
|
|
||||||
// Get wall midpoint for offset in mirror view
|
// Get wall midpoint for offset in mirror view
|
||||||
midx = (wall[w].x + wall[wall[w].point2].x) / 2;
|
midx = (wall[w].x + wall[wall[w].point2].x) / 2;
|
||||||
|
@ -811,8 +802,6 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
void
|
void
|
||||||
DoAutoSize(tspriteptr_t tspr)
|
DoAutoSize(tspriteptr_t tspr)
|
||||||
{
|
{
|
||||||
short i;
|
|
||||||
|
|
||||||
if (!bAutoSize)
|
if (!bAutoSize)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -963,8 +952,6 @@ short rotang = 0;
|
||||||
void
|
void
|
||||||
JAnalyzeSprites(tspriteptr_t tspr)
|
JAnalyzeSprites(tspriteptr_t tspr)
|
||||||
{
|
{
|
||||||
int i, currsprite;
|
|
||||||
|
|
||||||
rotang += 4;
|
rotang += 4;
|
||||||
if (rotang > 2047)
|
if (rotang > 2047)
|
||||||
rotang = 0;
|
rotang = 0;
|
||||||
|
@ -1024,8 +1011,6 @@ OrgTileList orgsectorfloorlist; // The list containing orginal sector
|
||||||
void
|
void
|
||||||
InsertOrgTile(OrgTileP tp, OrgTileListP thelist)
|
InsertOrgTile(OrgTileP tp, OrgTileListP thelist)
|
||||||
{
|
{
|
||||||
OrgTileP cur, nxt;
|
|
||||||
|
|
||||||
ASSERT(tp);
|
ASSERT(tp);
|
||||||
ASSERT(ValidPtr(tp));
|
ASSERT(ValidPtr(tp));
|
||||||
|
|
||||||
|
@ -1045,7 +1030,6 @@ InsertOrgTile(OrgTileP tp, OrgTileListP thelist)
|
||||||
OrgTileP
|
OrgTileP
|
||||||
InitOrgTile(OrgTileListP thelist)
|
InitOrgTile(OrgTileListP thelist)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
OrgTileP tp;
|
OrgTileP tp;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1158,8 +1142,7 @@ JS_PlockError(short wall_num, short t)
|
||||||
void
|
void
|
||||||
JS_InitLockouts(void)
|
JS_InitLockouts(void)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
short i;
|
||||||
short i, num;
|
|
||||||
OrgTileP tp;
|
OrgTileP tp;
|
||||||
|
|
||||||
INITLIST(&orgwalllist); // The list containing orginal wall
|
INITLIST(&orgwalllist); // The list containing orginal wall
|
||||||
|
@ -1249,8 +1232,7 @@ JS_InitLockouts(void)
|
||||||
void
|
void
|
||||||
JS_ToggleLockouts(void)
|
JS_ToggleLockouts(void)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
short i;
|
||||||
short i, num;
|
|
||||||
OrgTileP tp;
|
OrgTileP tp;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -379,7 +379,6 @@ DoBloodSpray(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &sprite[Weapon];
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
int32_t dax, day, daz;
|
|
||||||
int cz,fz;
|
int cz,fz;
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
|
@ -428,10 +427,9 @@ DoBloodSpray(int16_t Weapon)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case HIT_SPRITE:
|
case HIT_SPRITE:
|
||||||
{
|
{
|
||||||
short wall_ang, dang;
|
short wall_ang;
|
||||||
short hit_sprite = NORM_SPRITE(u->ret);
|
short hit_sprite = NORM_SPRITE(u->ret);
|
||||||
SPRITEp hsp = &sprite[hit_sprite];
|
SPRITEp hsp = &sprite[hit_sprite];
|
||||||
USERp hu = User[hit_sprite];
|
|
||||||
|
|
||||||
if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL))
|
if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL))
|
||||||
{
|
{
|
||||||
|
@ -456,7 +454,7 @@ DoBloodSpray(int16_t Weapon)
|
||||||
|
|
||||||
case HIT_WALL:
|
case HIT_WALL:
|
||||||
{
|
{
|
||||||
short hit_wall, nw, wall_ang, dang;
|
short hit_wall, nw, wall_ang;
|
||||||
WALLp wph;
|
WALLp wph;
|
||||||
short wb;
|
short wb;
|
||||||
|
|
||||||
|
@ -610,7 +608,6 @@ DoPhosphorus(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &sprite[Weapon];
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
int32_t dax, day, daz;
|
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
{
|
{
|
||||||
|
@ -642,7 +639,7 @@ DoPhosphorus(int16_t Weapon)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case HIT_SPRITE:
|
case HIT_SPRITE:
|
||||||
{
|
{
|
||||||
short wall_ang, dang;
|
short wall_ang;
|
||||||
short hit_sprite = -2;
|
short hit_sprite = -2;
|
||||||
SPRITEp hsp;
|
SPRITEp hsp;
|
||||||
USERp hu;
|
USERp hu;
|
||||||
|
@ -680,7 +677,7 @@ DoPhosphorus(int16_t Weapon)
|
||||||
|
|
||||||
case HIT_WALL:
|
case HIT_WALL:
|
||||||
{
|
{
|
||||||
short hit_wall, nw, wall_ang, dang;
|
short hit_wall, nw, wall_ang;
|
||||||
WALLp wph;
|
WALLp wph;
|
||||||
|
|
||||||
hit_wall = NORM_WALL(u->ret);
|
hit_wall = NORM_WALL(u->ret);
|
||||||
|
@ -837,7 +834,6 @@ DoChemBomb(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &sprite[Weapon];
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
int32_t dax, day, daz;
|
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
{
|
{
|
||||||
|
@ -869,7 +865,7 @@ DoChemBomb(int16_t Weapon)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case HIT_SPRITE:
|
case HIT_SPRITE:
|
||||||
{
|
{
|
||||||
short wall_ang, dang;
|
short wall_ang;
|
||||||
short hit_sprite;
|
short hit_sprite;
|
||||||
SPRITEp hsp;
|
SPRITEp hsp;
|
||||||
|
|
||||||
|
@ -907,7 +903,7 @@ DoChemBomb(int16_t Weapon)
|
||||||
|
|
||||||
case HIT_WALL:
|
case HIT_WALL:
|
||||||
{
|
{
|
||||||
short hit_wall, nw, wall_ang, dang;
|
short hit_wall, nw, wall_ang;
|
||||||
WALLp wph;
|
WALLp wph;
|
||||||
|
|
||||||
hit_wall = NORM_WALL(u->ret);
|
hit_wall = NORM_WALL(u->ret);
|
||||||
|
@ -1099,7 +1095,6 @@ DoCaltrops(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &sprite[Weapon];
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
int32_t dax, day, daz;
|
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
{
|
{
|
||||||
|
@ -1128,7 +1123,7 @@ DoCaltrops(int16_t Weapon)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case HIT_SPRITE:
|
case HIT_SPRITE:
|
||||||
{
|
{
|
||||||
short wall_ang, dang;
|
short wall_ang;
|
||||||
short hit_sprite;
|
short hit_sprite;
|
||||||
SPRITEp hsp;
|
SPRITEp hsp;
|
||||||
|
|
||||||
|
@ -1155,7 +1150,7 @@ DoCaltrops(int16_t Weapon)
|
||||||
|
|
||||||
case HIT_WALL:
|
case HIT_WALL:
|
||||||
{
|
{
|
||||||
short hit_wall, nw, wall_ang, dang;
|
short hit_wall, nw, wall_ang;
|
||||||
WALLp wph;
|
WALLp wph;
|
||||||
|
|
||||||
hit_wall = NORM_WALL(u->ret);
|
hit_wall = NORM_WALL(u->ret);
|
||||||
|
@ -1382,9 +1377,8 @@ PlayerInitChemBomb(PLAYERp pp)
|
||||||
USERp wu;
|
USERp wu;
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w, hit_sprite;
|
short w;
|
||||||
short oclipdist;
|
short oclipdist;
|
||||||
int dist;
|
|
||||||
|
|
||||||
|
|
||||||
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
||||||
|
@ -1469,9 +1463,7 @@ InitSpriteChemBomb(int16_t SpriteNum)
|
||||||
USERp wu;
|
USERp wu;
|
||||||
SPRITEp sp = &sprite[SpriteNum], wp;
|
SPRITEp sp = &sprite[SpriteNum], wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w, hit_sprite;
|
short w;
|
||||||
short oclipdist;
|
|
||||||
int dist;
|
|
||||||
|
|
||||||
|
|
||||||
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
|
||||||
|
@ -1525,9 +1517,7 @@ InitChemBomb(short SpriteNum)
|
||||||
USERp wu;
|
USERp wu;
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w, hit_sprite;
|
short w;
|
||||||
short oclipdist;
|
|
||||||
int dist;
|
|
||||||
|
|
||||||
|
|
||||||
// Need to make it take away from inventory weapon list
|
// Need to make it take away from inventory weapon list
|
||||||
|
@ -1599,12 +1589,12 @@ InitChemBomb(short SpriteNum)
|
||||||
int
|
int
|
||||||
PlayerInitFlashBomb(PLAYERp pp)
|
PlayerInitFlashBomb(PLAYERp pp)
|
||||||
{
|
{
|
||||||
short pnum, i, nexti;
|
short i, nexti;
|
||||||
unsigned int stat;
|
unsigned int stat;
|
||||||
int dist, tx, ty, tmin;
|
int dist, tx, ty, tmin;
|
||||||
short damage;
|
short damage;
|
||||||
SPRITEp sp = pp->SpriteP, hp;
|
SPRITEp sp = pp->SpriteP, hp;
|
||||||
USERp u = User[pp->PlayerSprite], hu;
|
USERp hu;
|
||||||
|
|
||||||
PlaySound(DIGI_GASPOP, pp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_GASPOP, pp, v3df_dontpan | v3df_doppler);
|
||||||
|
|
||||||
|
@ -1668,12 +1658,12 @@ PlayerInitFlashBomb(PLAYERp pp)
|
||||||
int
|
int
|
||||||
InitFlashBomb(int16_t SpriteNum)
|
InitFlashBomb(int16_t SpriteNum)
|
||||||
{
|
{
|
||||||
short pnum, i, nexti;
|
short i, nexti;
|
||||||
unsigned int stat;
|
unsigned int stat;
|
||||||
int dist, tx, ty, tmin;
|
int dist, tx, ty, tmin;
|
||||||
short damage;
|
short damage;
|
||||||
SPRITEp sp = &sprite[SpriteNum], hp;
|
SPRITEp sp = &sprite[SpriteNum], hp;
|
||||||
USERp u = User[SpriteNum], hu;
|
USERp hu;
|
||||||
PLAYERp pp = Player + screenpeek;
|
PLAYERp pp = Player + screenpeek;
|
||||||
|
|
||||||
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_GASPOP, sp, v3df_dontpan | v3df_doppler);
|
||||||
|
@ -1828,9 +1818,8 @@ PlayerInitCaltrops(PLAYERp pp)
|
||||||
USERp wu;
|
USERp wu;
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w, hit_sprite;
|
short w;
|
||||||
short oclipdist, i;
|
short oclipdist, i;
|
||||||
int dist;
|
|
||||||
|
|
||||||
|
|
||||||
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_THROW, pp, v3df_dontpan | v3df_doppler);
|
||||||
|
@ -1913,9 +1902,7 @@ InitCaltrops(int16_t SpriteNum)
|
||||||
USERp wu;
|
USERp wu;
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w, hit_sprite;
|
short w;
|
||||||
short oclipdist, i;
|
|
||||||
int dist;
|
|
||||||
|
|
||||||
|
|
||||||
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_THROW, sp, v3df_dontpan | v3df_doppler);
|
||||||
|
@ -1966,9 +1953,8 @@ InitPhosphorus(int16_t SpriteNum)
|
||||||
USERp wu;
|
USERp wu;
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w, hit_sprite;
|
short w;
|
||||||
short oclipdist, i, daang;
|
short daang;
|
||||||
int dist;
|
|
||||||
|
|
||||||
|
|
||||||
PlaySound(DIGI_FIREBALL1, sp, v3df_follow);
|
PlaySound(DIGI_FIREBALL1, sp, v3df_follow);
|
||||||
|
@ -2026,9 +2012,8 @@ InitBloodSpray(int16_t SpriteNum, SWBOOL dogib, short velocity)
|
||||||
USERp wu;
|
USERp wu;
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w, hit_sprite;
|
short w;
|
||||||
short oclipdist, i, cnt, ang, vel, rnd;
|
short i, cnt, ang, vel, rnd;
|
||||||
int dist;
|
|
||||||
|
|
||||||
|
|
||||||
if (dogib)
|
if (dogib)
|
||||||
|
@ -2112,7 +2097,6 @@ int
|
||||||
BloodSprayFall(int16_t SpriteNum)
|
BloodSprayFall(int16_t SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
sp->z += 1500;
|
sp->z += 1500;
|
||||||
|
|
||||||
|
@ -2155,9 +2139,7 @@ int
|
||||||
DoFlagRangeTest(short Weapon, short range)
|
DoFlagRangeTest(short Weapon, short range)
|
||||||
{
|
{
|
||||||
SPRITEp wp = &sprite[Weapon];
|
SPRITEp wp = &sprite[Weapon];
|
||||||
USERp wu = User[Weapon];
|
|
||||||
|
|
||||||
USERp u;
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
unsigned int stat;
|
unsigned int stat;
|
||||||
|
@ -2169,7 +2151,6 @@ DoFlagRangeTest(short Weapon, short range)
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[StatDamageList[stat]], i, nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[StatDamageList[stat]], i, nexti)
|
||||||
{
|
{
|
||||||
sp = &sprite[i];
|
sp = &sprite[i];
|
||||||
u = User[i];
|
|
||||||
|
|
||||||
|
|
||||||
DISTANCE(sp->x, sp->y, wp->x, wp->y, dist, tx, ty, tmin);
|
DISTANCE(sp->x, sp->y, wp->x, wp->y, dist, tx, ty, tmin);
|
||||||
|
@ -2483,10 +2464,8 @@ InitShell(int16_t SpriteNum, int16_t ShellNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum], wp;
|
SPRITEp sp = &sprite[SpriteNum], wp;
|
||||||
int nx, ny, nz;
|
int nx, ny, nz;
|
||||||
short w;
|
short w;
|
||||||
short oclipdist,id=0,velocity=0;
|
short id=0,velocity=0;
|
||||||
int dist;
|
|
||||||
STATEp p=NULL;
|
STATEp p=NULL;
|
||||||
int zvel;
|
|
||||||
extern STATE s_UziShellShrap[];
|
extern STATE s_UziShellShrap[];
|
||||||
extern STATE s_ShotgunShellShrap[];
|
extern STATE s_ShotgunShellShrap[];
|
||||||
|
|
||||||
|
|
|
@ -489,7 +489,6 @@ SetupLava(short SpriteNum)
|
||||||
|
|
||||||
int NullLava(short SpriteNum)
|
int NullLava(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
@ -503,7 +502,6 @@ int NullLava(short SpriteNum)
|
||||||
|
|
||||||
int DoLavaMove(short SpriteNum)
|
int DoLavaMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
|
|
@ -54,7 +54,6 @@ BEGIN_SW_NS
|
||||||
void SectorLightShade(SPRITEp sp, short intensity)
|
void SectorLightShade(SPRITEp sp, short intensity)
|
||||||
{
|
{
|
||||||
short w, startwall, endwall;
|
short w, startwall, endwall;
|
||||||
void *void_ptr;
|
|
||||||
int8_t* wall_shade;
|
int8_t* wall_shade;
|
||||||
short base_shade;
|
short base_shade;
|
||||||
short wallcount;
|
short wallcount;
|
||||||
|
@ -286,7 +285,6 @@ void DoLighting(void)
|
||||||
{
|
{
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
short count;
|
|
||||||
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_LIGHTING],i,nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_LIGHTING],i,nexti)
|
||||||
|
|
|
@ -282,8 +282,6 @@ int MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int ox[MAX_CLIPBOX],oy[MAX_CLIPBOX];
|
int ox[MAX_CLIPBOX],oy[MAX_CLIPBOX];
|
||||||
SPRITEp sp = pp->sop->sp_child;
|
|
||||||
USERp u = User[sp - sprite];
|
|
||||||
SECTOR_OBJECTp sop = pp->sop;
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
short ang;
|
short ang;
|
||||||
short min_ndx = 0;
|
short min_ndx = 0;
|
||||||
|
@ -446,13 +444,8 @@ int testquadinsect(int *point_num, vec2_t const * q, short sectnum)
|
||||||
//Ken gives the tank clippin' a try...
|
//Ken gives the tank clippin' a try...
|
||||||
int RectClipMove(PLAYERp pp, int *qx, int *qy)
|
int RectClipMove(PLAYERp pp, int *qx, int *qy)
|
||||||
{
|
{
|
||||||
SECTORp *sectp;
|
|
||||||
SECTOR_OBJECTp sop = pp->sop;
|
|
||||||
WALLp wp;
|
|
||||||
int count=0;
|
|
||||||
int i;
|
int i;
|
||||||
vec2_t xy[4];
|
vec2_t xy[4];
|
||||||
short startwall,endwall;
|
|
||||||
int point_num;
|
int point_num;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
@ -533,8 +526,6 @@ short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy
|
||||||
int i;
|
int i;
|
||||||
vec2_t xy[4];
|
vec2_t xy[4];
|
||||||
SECTOR_OBJECTp sop = pp->sop;
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
int ret;
|
|
||||||
short ang;
|
|
||||||
short rot_ang;
|
short rot_ang;
|
||||||
int point_num;
|
int point_num;
|
||||||
|
|
||||||
|
|
|
@ -535,7 +535,7 @@ void SetFadeAmt(PLAYERp pp, short damage, unsigned char startcolor)
|
||||||
#define MAXFADETICS 5
|
#define MAXFADETICS 5
|
||||||
void DoPaletteFlash(PLAYERp pp)
|
void DoPaletteFlash(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int i, palreg, tmpreg1 = 0, tmpreg2 = 0;
|
int palreg, tmpreg1 = 0, tmpreg2 = 0;
|
||||||
unsigned char* pal_ptr = &ppalette[screenpeek][0];
|
unsigned char* pal_ptr = &ppalette[screenpeek][0];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -156,8 +156,6 @@ int DoToiletGirl(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short rnd_range = 0;
|
|
||||||
static int handle=0;
|
|
||||||
SWBOOL ICanSee = FALSE;
|
SWBOOL ICanSee = FALSE;
|
||||||
|
|
||||||
DoActorPickClosePlayer(SpriteNum);
|
DoActorPickClosePlayer(SpriteNum);
|
||||||
|
@ -247,7 +245,6 @@ int NullToiletGirl(short SpriteNum)
|
||||||
int ToiletGirlUzi(short SpriteNum)
|
int ToiletGirlUzi(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
KeepActorOnFloor(SpriteNum);
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
@ -264,7 +261,6 @@ int ToiletGirlUzi(short SpriteNum)
|
||||||
|
|
||||||
int ToiletGirlPain(short SpriteNum)
|
int ToiletGirlPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullToiletGirl(SpriteNum);
|
NullToiletGirl(SpriteNum);
|
||||||
|
@ -399,7 +395,6 @@ int DoWashGirl(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short rnd_range = 0;
|
|
||||||
SWBOOL ICanSee = FALSE;
|
SWBOOL ICanSee = FALSE;
|
||||||
|
|
||||||
DoActorPickClosePlayer(SpriteNum);
|
DoActorPickClosePlayer(SpriteNum);
|
||||||
|
@ -495,7 +490,6 @@ int NullWashGirl(short SpriteNum)
|
||||||
int WashGirlUzi(short SpriteNum)
|
int WashGirlUzi(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
KeepActorOnFloor(SpriteNum);
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
@ -512,7 +506,6 @@ int WashGirlUzi(short SpriteNum)
|
||||||
|
|
||||||
int WashGirlPain(short SpriteNum)
|
int WashGirlPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullWashGirl(SpriteNum);
|
NullWashGirl(SpriteNum);
|
||||||
|
@ -611,8 +604,6 @@ int DoTrashCan(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short rnd_range = 0;
|
|
||||||
static int handle=0;
|
|
||||||
|
|
||||||
//(*u->ActorActionFunc) (SpriteNum);
|
//(*u->ActorActionFunc) (SpriteNum);
|
||||||
|
|
||||||
|
@ -633,7 +624,6 @@ int DoTrashCan(short SpriteNum)
|
||||||
int TrashCanPain(short SpriteNum)
|
int TrashCanPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
DoActorSlide(SpriteNum);
|
DoActorSlide(SpriteNum);
|
||||||
|
@ -885,9 +875,7 @@ int PachinkoCheckWin(short SpriteNum)
|
||||||
int Pachinko1Operate(short SpriteNum)
|
int Pachinko1Operate(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
short rnd;
|
short rnd;
|
||||||
PLAYERp pp = Player + myconnectindex;
|
|
||||||
|
|
||||||
rnd = RANDOM_RANGE(1000);
|
rnd = RANDOM_RANGE(1000);
|
||||||
if (rnd > 900)
|
if (rnd > 900)
|
||||||
|
@ -1279,8 +1267,6 @@ int DoCarGirl(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short rnd_range = 0;
|
|
||||||
static int handle=0;
|
|
||||||
SWBOOL ICanSee = FALSE;
|
SWBOOL ICanSee = FALSE;
|
||||||
|
|
||||||
DoActorPickClosePlayer(SpriteNum);
|
DoActorPickClosePlayer(SpriteNum);
|
||||||
|
@ -1368,7 +1354,6 @@ int NullCarGirl(short SpriteNum)
|
||||||
int CarGirlUzi(short SpriteNum)
|
int CarGirlUzi(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
KeepActorOnFloor(SpriteNum);
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
@ -1385,7 +1370,6 @@ int CarGirlUzi(short SpriteNum)
|
||||||
|
|
||||||
int CarGirlPain(short SpriteNum)
|
int CarGirlPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullCarGirl(SpriteNum);
|
NullCarGirl(SpriteNum);
|
||||||
|
@ -1502,8 +1486,6 @@ int DoMechanicGirl(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short rnd_range = 0;
|
|
||||||
static int handle=0;
|
|
||||||
SWBOOL ICanSee = FALSE;
|
SWBOOL ICanSee = FALSE;
|
||||||
|
|
||||||
DoActorPickClosePlayer(SpriteNum);
|
DoActorPickClosePlayer(SpriteNum);
|
||||||
|
@ -1591,7 +1573,6 @@ int NullMechanicGirl(short SpriteNum)
|
||||||
int MechanicGirlDrill(short SpriteNum)
|
int MechanicGirlDrill(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
KeepActorOnFloor(SpriteNum);
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
@ -1608,7 +1589,6 @@ int MechanicGirlDrill(short SpriteNum)
|
||||||
|
|
||||||
int MechanicGirlPain(short SpriteNum)
|
int MechanicGirlPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullMechanicGirl(SpriteNum);
|
NullMechanicGirl(SpriteNum);
|
||||||
|
@ -1726,8 +1706,6 @@ int DoSailorGirl(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short rnd_range = 0;
|
|
||||||
static int handle=0;
|
|
||||||
SWBOOL ICanSee = FALSE;
|
SWBOOL ICanSee = FALSE;
|
||||||
|
|
||||||
DoActorPickClosePlayer(SpriteNum);
|
DoActorPickClosePlayer(SpriteNum);
|
||||||
|
@ -1824,7 +1802,6 @@ int NullSailorGirl(short SpriteNum)
|
||||||
int SailorGirlThrow(short SpriteNum)
|
int SailorGirlThrow(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
KeepActorOnFloor(SpriteNum);
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
@ -1841,7 +1818,6 @@ int SailorGirlThrow(short SpriteNum)
|
||||||
|
|
||||||
int SailorGirlPain(short SpriteNum)
|
int SailorGirlPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullSailorGirl(SpriteNum);
|
NullSailorGirl(SpriteNum);
|
||||||
|
@ -1942,7 +1918,6 @@ int DoPruneGirl(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short rnd_range = 0;
|
|
||||||
SWBOOL ICanSee = FALSE;
|
SWBOOL ICanSee = FALSE;
|
||||||
|
|
||||||
DoActorPickClosePlayer(SpriteNum);
|
DoActorPickClosePlayer(SpriteNum);
|
||||||
|
@ -2045,7 +2020,6 @@ int NullPruneGirl(short SpriteNum)
|
||||||
int PruneGirlUzi(short SpriteNum)
|
int PruneGirlUzi(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (!TEST(u->Flags,SPR_CLIMBING))
|
if (!TEST(u->Flags,SPR_CLIMBING))
|
||||||
KeepActorOnFloor(SpriteNum);
|
KeepActorOnFloor(SpriteNum);
|
||||||
|
@ -2062,7 +2036,6 @@ int PruneGirlUzi(short SpriteNum)
|
||||||
|
|
||||||
int PruneGirlPain(short SpriteNum)
|
int PruneGirlPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullPruneGirl(SpriteNum);
|
NullPruneGirl(SpriteNum);
|
||||||
|
|
|
@ -515,7 +515,6 @@ void
|
||||||
CheckVersion(int GameVersion)
|
CheckVersion(int GameVersion)
|
||||||
{
|
{
|
||||||
short pnum;
|
short pnum;
|
||||||
PACKET_VERSION p;
|
|
||||||
#define VERSION_MSG "You cannot play with different versions!"
|
#define VERSION_MSG "You cannot play with different versions!"
|
||||||
|
|
||||||
if (!CommEnabled)
|
if (!CommEnabled)
|
||||||
|
@ -554,9 +553,6 @@ CheckVersion(int GameVersion)
|
||||||
void
|
void
|
||||||
Connect(void)
|
Connect(void)
|
||||||
{
|
{
|
||||||
int players_found, i, yline;
|
|
||||||
short other;
|
|
||||||
|
|
||||||
if (CommEnabled)
|
if (CommEnabled)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -586,7 +582,6 @@ void
|
||||||
waitforeverybody(void)
|
waitforeverybody(void)
|
||||||
{
|
{
|
||||||
int i, size = 1;
|
int i, size = 1;
|
||||||
short other;
|
|
||||||
|
|
||||||
if (!CommEnabled)
|
if (!CommEnabled)
|
||||||
return;
|
return;
|
||||||
|
@ -689,7 +684,6 @@ SWBOOL MyCommPlayerQuit(void)
|
||||||
{
|
{
|
||||||
if (TEST_SYNC_KEY(Player + i, SK_QUIT_GAME))
|
if (TEST_SYNC_KEY(Player + i, SK_QUIT_GAME))
|
||||||
{
|
{
|
||||||
short pnum;
|
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
|
|
||||||
quit_player_index = i;
|
quit_player_index = i;
|
||||||
|
@ -761,7 +755,6 @@ SWBOOL MyCommPlayerQuit(void)
|
||||||
|
|
||||||
SWBOOL MenuCommPlayerQuit(short quit_player)
|
SWBOOL MenuCommPlayerQuit(short quit_player)
|
||||||
{
|
{
|
||||||
PLAYERp pp;
|
|
||||||
short i;
|
short i;
|
||||||
short prev_player = 0;
|
short prev_player = 0;
|
||||||
short pnum;
|
short pnum;
|
||||||
|
@ -778,8 +771,6 @@ SWBOOL MenuCommPlayerQuit(short quit_player)
|
||||||
|
|
||||||
TRAVERSE_CONNECT(i)
|
TRAVERSE_CONNECT(i)
|
||||||
{
|
{
|
||||||
pp = Player + i;
|
|
||||||
|
|
||||||
// have to reorder the connect list
|
// have to reorder the connect list
|
||||||
if (i != quit_player)
|
if (i != quit_player)
|
||||||
{
|
{
|
||||||
|
@ -813,7 +804,7 @@ SWBOOL MenuCommPlayerQuit(short quit_player)
|
||||||
void ErrorCorrectionQuit(void)
|
void ErrorCorrectionQuit(void)
|
||||||
{
|
{
|
||||||
int oldtotalclock;
|
int oldtotalclock;
|
||||||
short i,j;
|
short j;
|
||||||
|
|
||||||
if (CommPlayers > 1)
|
if (CommPlayers > 1)
|
||||||
{
|
{
|
||||||
|
@ -910,10 +901,8 @@ AddSyncInfoToPacket(int *j)
|
||||||
void
|
void
|
||||||
faketimerhandler(void)
|
faketimerhandler(void)
|
||||||
{
|
{
|
||||||
short other, packbufleng;
|
int i, j, k;
|
||||||
int i, j, k, l;
|
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
short pnum;
|
|
||||||
extern SWBOOL BotMode;
|
extern SWBOOL BotMode;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -1231,7 +1220,7 @@ void
|
||||||
getpackets(void)
|
getpackets(void)
|
||||||
{
|
{
|
||||||
int otherconnectindex, packbufleng;
|
int otherconnectindex, packbufleng;
|
||||||
int i, j, k, l, fifoCheck, sb;
|
int i, j, sb;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
SW_PACKET tempinput;
|
SW_PACKET tempinput;
|
||||||
|
|
||||||
|
|
|
@ -1981,7 +1981,6 @@ DoNinjaGrabThroat(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
short cnt,i;
|
|
||||||
|
|
||||||
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
if ((u->WaitTics -= ACTORMOVETICS) <= 0)
|
||||||
{
|
{
|
||||||
|
@ -2021,7 +2020,6 @@ int
|
||||||
DoNinjaMove(short SpriteNum)
|
DoNinjaMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (TEST(u->Flags2, SPR2_DYING))
|
if (TEST(u->Flags2, SPR2_DYING))
|
||||||
{
|
{
|
||||||
|
@ -2101,7 +2099,6 @@ int
|
||||||
NullNinja(short SpriteNum)
|
NullNinja(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (u->WaitTics > 0) u->WaitTics -= ACTORMOVETICS;
|
if (u->WaitTics > 0) u->WaitTics -= ACTORMOVETICS;
|
||||||
|
|
||||||
|
@ -2119,7 +2116,6 @@ NullNinja(short SpriteNum)
|
||||||
|
|
||||||
int DoNinjaPain(short SpriteNum)
|
int DoNinjaPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullNinja(SpriteNum);
|
NullNinja(SpriteNum);
|
||||||
|
@ -2181,8 +2177,7 @@ DoNinjaCeiling(short SpriteNum)
|
||||||
void
|
void
|
||||||
InitAllPlayerSprites(void)
|
InitAllPlayerSprites(void)
|
||||||
{
|
{
|
||||||
short i, sp_num;
|
short i;
|
||||||
USERp u;
|
|
||||||
|
|
||||||
TRAVERSE_CONNECT(i)
|
TRAVERSE_CONNECT(i)
|
||||||
{
|
{
|
||||||
|
@ -2393,7 +2388,6 @@ void
|
||||||
PlayerSpriteLoadLevel(short SpriteNum)
|
PlayerSpriteLoadLevel(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
ChangeState(SpriteNum, s_NinjaRun[0]);
|
ChangeState(SpriteNum, s_NinjaRun[0]);
|
||||||
u->Rot = sg_NinjaRun;
|
u->Rot = sg_NinjaRun;
|
||||||
|
@ -2403,7 +2397,7 @@ PlayerSpriteLoadLevel(short SpriteNum)
|
||||||
void
|
void
|
||||||
InitPlayerSprite(PLAYERp pp)
|
InitPlayerSprite(PLAYERp pp)
|
||||||
{
|
{
|
||||||
short i, sp_num;
|
short sp_num;
|
||||||
SPRITE *sp;
|
SPRITE *sp;
|
||||||
USERp u;
|
USERp u;
|
||||||
int pnum = pp - Player;
|
int pnum = pp - Player;
|
||||||
|
|
|
@ -132,7 +132,6 @@ void pNullAnimator(PANEL_SPRITEp psp)
|
||||||
|
|
||||||
PANEL_SPRITEp pFindMatchingSprite(PLAYERp pp, int x, int y, short pri)
|
PANEL_SPRITEp pFindMatchingSprite(PLAYERp pp, int x, int y, short pri)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp nsp;
|
|
||||||
PANEL_SPRITEp psp=NULL, next;
|
PANEL_SPRITEp psp=NULL, next;
|
||||||
|
|
||||||
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
||||||
|
@ -152,7 +151,6 @@ PANEL_SPRITEp pFindMatchingSprite(PLAYERp pp, int x, int y, short pri)
|
||||||
|
|
||||||
PANEL_SPRITEp pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pri)
|
PANEL_SPRITEp pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pri)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp nsp;
|
|
||||||
PANEL_SPRITEp psp=NULL, next;
|
PANEL_SPRITEp psp=NULL, next;
|
||||||
|
|
||||||
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
||||||
|
@ -172,7 +170,6 @@ PANEL_SPRITEp pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pr
|
||||||
|
|
||||||
SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id)
|
SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp nsp=NULL;
|
|
||||||
PANEL_SPRITEp psp=NULL, next;
|
PANEL_SPRITEp psp=NULL, next;
|
||||||
SWBOOL found = FALSE;
|
SWBOOL found = FALSE;
|
||||||
|
|
||||||
|
@ -418,7 +415,7 @@ void PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
short x,y;
|
short x,y;
|
||||||
short WeaponNum,min_ammo;
|
short WeaponNum;
|
||||||
|
|
||||||
#define PANEL_AMMO_BOX_X 197
|
#define PANEL_AMMO_BOX_X 197
|
||||||
#define PANEL_AMMO_XOFF 1
|
#define PANEL_AMMO_XOFF 1
|
||||||
|
@ -578,8 +575,6 @@ void PlayerUpdateWeapon(PLAYERp pp, short WeaponNum)
|
||||||
|
|
||||||
void PlayerUpdateKills(PLAYERp pp, short value)
|
void PlayerUpdateKills(PLAYERp pp, short value)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
#define PANEL_KILLS_X 31
|
#define PANEL_KILLS_X 31
|
||||||
#define PANEL_KILLS_Y 164
|
#define PANEL_KILLS_Y 164
|
||||||
|
|
||||||
|
@ -626,7 +621,6 @@ void PlayerUpdateKills(PLAYERp pp, short value)
|
||||||
|
|
||||||
void PlayerUpdateArmor(PLAYERp pp, short value)
|
void PlayerUpdateArmor(PLAYERp pp, short value)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short x,y;
|
short x,y;
|
||||||
|
|
||||||
#define PANEL_ARMOR_BOX_X 56
|
#define PANEL_ARMOR_BOX_X 56
|
||||||
|
@ -666,7 +660,6 @@ void PlayerUpdateKeys(PLAYERp pp)
|
||||||
#define PANEL_KEYS_YOFF 2
|
#define PANEL_KEYS_YOFF 2
|
||||||
#define KEYS_ERASE 2402
|
#define KEYS_ERASE 2402
|
||||||
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short x,y;
|
short x,y;
|
||||||
short row,col;
|
short row,col;
|
||||||
short i, xsize, ysize;
|
short i, xsize, ysize;
|
||||||
|
@ -743,8 +736,6 @@ void PlayerUpdateKeys(PLAYERp pp)
|
||||||
|
|
||||||
void PlayerUpdateTimeLimit(PLAYERp pp)
|
void PlayerUpdateTimeLimit(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
short x,y;
|
|
||||||
int seconds;
|
int seconds;
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
|
@ -770,7 +761,6 @@ void PlayerUpdateTimeLimit(PLAYERp pp)
|
||||||
void PlayerUpdatePanelInfo(PLAYERp pp)
|
void PlayerUpdatePanelInfo(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
int i;
|
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return;
|
return;
|
||||||
|
@ -1740,8 +1730,6 @@ PANEL_STATE ps_RetractStar[] =
|
||||||
void
|
void
|
||||||
pStarRestTest(PANEL_SPRITEp psp)
|
pStarRestTest(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
|
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT))
|
if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT))
|
||||||
{
|
{
|
||||||
if (FLAG_KEY_PRESSED(psp->PlayerP, SK_SHOOT))
|
if (FLAG_KEY_PRESSED(psp->PlayerP, SK_SHOOT))
|
||||||
|
@ -2931,8 +2919,6 @@ void
|
||||||
SpawnUziShell(PANEL_SPRITEp psp)
|
SpawnUziShell(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
PLAYERp pp = psp->PlayerP;
|
PLAYERp pp = psp->PlayerP;
|
||||||
PANEL_SPRITEp shell;
|
|
||||||
int i, rand_val;
|
|
||||||
|
|
||||||
if (psp->State && TEST(psp->State->flags, psf_Xflip))
|
if (psp->State && TEST(psp->State->flags, psf_Xflip))
|
||||||
{
|
{
|
||||||
|
@ -3236,7 +3222,6 @@ pShotgunSetRecoil(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pShotgunRecoilDown(PANEL_SPRITEp psp)
|
pShotgunRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
short picnum = psp->picndx;
|
|
||||||
int targetvel;
|
int targetvel;
|
||||||
|
|
||||||
int x = FIXED(psp->x, psp->xfract);
|
int x = FIXED(psp->x, psp->xfract);
|
||||||
|
@ -3749,8 +3734,6 @@ pRailSetRecoil(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pRailRecoilDown(PANEL_SPRITEp psp)
|
pRailRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
|
||||||
|
@ -4197,8 +4180,6 @@ InitWeaponHothead(PLAYERp pp)
|
||||||
void
|
void
|
||||||
pHotheadRestTest(PANEL_SPRITEp psp)
|
pHotheadRestTest(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
|
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT))
|
if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT))
|
||||||
{
|
{
|
||||||
if (FLAG_KEY_PRESSED(psp->PlayerP, SK_SHOOT))
|
if (FLAG_KEY_PRESSED(psp->PlayerP, SK_SHOOT))
|
||||||
|
@ -4645,8 +4626,6 @@ InitWeaponMicro(PLAYERp pp)
|
||||||
void
|
void
|
||||||
pMicroRecoilDown(PANEL_SPRITEp psp)
|
pMicroRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
|
||||||
|
@ -7323,9 +7302,7 @@ pDisplaySprites(PLAYERp pp)
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
PANEL_SPRITEp psp=NULL, next=NULL;
|
PANEL_SPRITEp psp=NULL, next=NULL;
|
||||||
short shade, picnum, overlay_shade = 0;
|
short shade, picnum, overlay_shade = 0;
|
||||||
char KenFlags;
|
|
||||||
int x, y;
|
int x, y;
|
||||||
int smoothratio;
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
uint8_t pal = 0;
|
uint8_t pal = 0;
|
||||||
|
@ -7339,7 +7316,6 @@ pDisplaySprites(PLAYERp pp)
|
||||||
{
|
{
|
||||||
ASSERT(ValidPtr(psp));
|
ASSERT(ValidPtr(psp));
|
||||||
ang = psp->rotate_ang;
|
ang = psp->rotate_ang;
|
||||||
KenFlags = 0;
|
|
||||||
shade = 0;
|
shade = 0;
|
||||||
flags = 0;
|
flags = 0;
|
||||||
x = psp->x;
|
x = psp->x;
|
||||||
|
|
|
@ -1096,7 +1096,6 @@ DoPlayerSpriteThrow(PLAYERp pp)
|
||||||
int
|
int
|
||||||
DoPlayerSpriteReset(short SpriteNum)
|
DoPlayerSpriteReset(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
|
|
||||||
|
@ -1337,8 +1336,6 @@ DoPlayerTeleportPause(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerTeleportToSprite(PLAYERp pp, SPRITEp sp)
|
DoPlayerTeleportToSprite(PLAYERp pp, SPRITEp sp)
|
||||||
{
|
{
|
||||||
int cz, fz;
|
|
||||||
|
|
||||||
pp->pang = pp->oang = sp->ang;
|
pp->pang = pp->oang = sp->ang;
|
||||||
pp->posx = pp->oposx = pp->oldposx = sp->x;
|
pp->posx = pp->oposx = pp->oldposx = sp->x;
|
||||||
pp->posy = pp->oposy = pp->oldposy = sp->y;
|
pp->posy = pp->oposy = pp->oldposy = sp->y;
|
||||||
|
@ -1356,8 +1353,6 @@ DoPlayerTeleportToSprite(PLAYERp pp, SPRITEp sp)
|
||||||
void
|
void
|
||||||
DoPlayerTeleportToOffset(PLAYERp pp)
|
DoPlayerTeleportToOffset(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int fz,cz;
|
|
||||||
|
|
||||||
pp->oposx = pp->oldposx = pp->posx;
|
pp->oposx = pp->oldposx = pp->posx;
|
||||||
pp->oposy = pp->oldposy = pp->posy;
|
pp->oposy = pp->oldposy = pp->posy;
|
||||||
|
|
||||||
|
@ -1371,7 +1366,6 @@ DoSpawnTeleporterEffect(SPRITEp sp)
|
||||||
{
|
{
|
||||||
extern STATE s_TeleportEffect[];
|
extern STATE s_TeleportEffect[];
|
||||||
short effect;
|
short effect;
|
||||||
USERp eu;
|
|
||||||
int nx, ny;
|
int nx, ny;
|
||||||
SPRITEp ep;
|
SPRITEp ep;
|
||||||
|
|
||||||
|
@ -1386,7 +1380,6 @@ DoSpawnTeleporterEffect(SPRITEp sp)
|
||||||
sp->ang, 0);
|
sp->ang, 0);
|
||||||
|
|
||||||
ep = &sprite[effect];
|
ep = &sprite[effect];
|
||||||
eu = User[effect];
|
|
||||||
|
|
||||||
setspritez(effect, (vec3_t *)ep);
|
setspritez(effect, (vec3_t *)ep);
|
||||||
|
|
||||||
|
@ -1404,8 +1397,6 @@ DoSpawnTeleporterEffectPlace(SPRITEp sp)
|
||||||
{
|
{
|
||||||
extern STATE s_TeleportEffect[];
|
extern STATE s_TeleportEffect[];
|
||||||
short effect;
|
short effect;
|
||||||
USERp eu;
|
|
||||||
int nx, ny;
|
|
||||||
SPRITEp ep;
|
SPRITEp ep;
|
||||||
|
|
||||||
effect = SpawnSprite(STAT_MISSILE, 0, s_TeleportEffect, sp->sectnum,
|
effect = SpawnSprite(STAT_MISSILE, 0, s_TeleportEffect, sp->sectnum,
|
||||||
|
@ -1413,7 +1404,6 @@ DoSpawnTeleporterEffectPlace(SPRITEp sp)
|
||||||
sp->ang, 0);
|
sp->ang, 0);
|
||||||
|
|
||||||
ep = &sprite[effect];
|
ep = &sprite[effect];
|
||||||
eu = User[effect];
|
|
||||||
|
|
||||||
setspritez(effect, (vec3_t *)ep);
|
setspritez(effect, (vec3_t *)ep);
|
||||||
|
|
||||||
|
@ -1428,8 +1418,8 @@ DoSpawnTeleporterEffectPlace(SPRITEp sp)
|
||||||
void
|
void
|
||||||
DoPlayerWarpTeleporter(PLAYERp pp)
|
DoPlayerWarpTeleporter(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite], eu;
|
USERp u = User[pp->PlayerSprite];
|
||||||
SPRITEp sp = pp->SpriteP, ep;
|
SPRITEp sp = pp->SpriteP;
|
||||||
short pnum;
|
short pnum;
|
||||||
SPRITEp sp_warp;
|
SPRITEp sp_warp;
|
||||||
|
|
||||||
|
@ -1552,7 +1542,6 @@ DoPlayerCrawlHeight(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerTurn(PLAYERp pp)
|
DoPlayerTurn(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int doubvel;
|
|
||||||
short angvel;
|
short angvel;
|
||||||
|
|
||||||
#define TURN_SHIFT 2
|
#define TURN_SHIFT 2
|
||||||
|
@ -1977,7 +1966,6 @@ DoPlayerHorizon(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerBob(PLAYERp pp)
|
DoPlayerBob(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern uint32_t MoveThingsCount;
|
|
||||||
int dist;
|
int dist;
|
||||||
int amt;
|
int amt;
|
||||||
|
|
||||||
|
@ -2042,8 +2030,6 @@ DoPlayerBeginRecoil(PLAYERp pp, short pix_amt)
|
||||||
void
|
void
|
||||||
DoPlayerRecoil(PLAYERp pp)
|
DoPlayerRecoil(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int dist;
|
|
||||||
|
|
||||||
// controls how fast you move through the sin table
|
// controls how fast you move through the sin table
|
||||||
pp->recoil_ndx += pp->recoil_speed;
|
pp->recoil_ndx += pp->recoil_speed;
|
||||||
|
|
||||||
|
@ -2064,7 +2050,6 @@ DoPlayerRecoil(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerSpriteBob(PLAYERp pp, short player_height, short bob_amt, short bob_speed)
|
DoPlayerSpriteBob(PLAYERp pp, short player_height, short bob_amt, short bob_speed)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
SPRITEp sp = pp->SpriteP;
|
SPRITEp sp = pp->SpriteP;
|
||||||
|
|
||||||
pp->bob_ndx = (pp->bob_ndx + (synctics << bob_speed)) & 2047;
|
pp->bob_ndx = (pp->bob_ndx + (synctics << bob_speed)) & 2047;
|
||||||
|
@ -2343,7 +2328,6 @@ DoPlayerSlide(PLAYERp pp)
|
||||||
void PlayerMoveHitDebug(short ret)
|
void PlayerMoveHitDebug(short ret)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
extern SWBOOL DebugActor;
|
|
||||||
|
|
||||||
switch (TEST(ret, HIT_MASK))
|
switch (TEST(ret, HIT_MASK))
|
||||||
{
|
{
|
||||||
|
@ -2554,13 +2538,9 @@ void PlayerSectorBound(PLAYERp pp, int amt)
|
||||||
void
|
void
|
||||||
DoPlayerMove(PLAYERp pp)
|
DoPlayerMove(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int i, ceilhit, florhit;
|
|
||||||
short nvel,svel;
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
SWBOOL slow = FALSE;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
int friction;
|
int friction;
|
||||||
int oposz;
|
|
||||||
int save_cstat;
|
int save_cstat;
|
||||||
int push_ret = 0;
|
int push_ret = 0;
|
||||||
void SlipSlope(PLAYERp pp);
|
void SlipSlope(PLAYERp pp);
|
||||||
|
@ -2808,11 +2788,10 @@ void StopSOsound(short sectnum)
|
||||||
void
|
void
|
||||||
DoPlayerMoveBoat(PLAYERp pp)
|
DoPlayerMoveBoat(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int xvect, yvect, z;
|
int z;
|
||||||
int floor_dist;
|
int floor_dist;
|
||||||
int ret;
|
int ret;
|
||||||
short save_sectnum;
|
short save_sectnum;
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
SECTOR_OBJECTp sop = pp->sop;
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
|
||||||
SW_PACKET last_input;
|
SW_PACKET last_input;
|
||||||
|
@ -2906,9 +2885,6 @@ void DoTankTreads(PLAYERp pp)
|
||||||
int j;
|
int j;
|
||||||
int dot;
|
int dot;
|
||||||
SWBOOL reverse = FALSE;
|
SWBOOL reverse = FALSE;
|
||||||
WALLp wp;
|
|
||||||
short startwall,endwall;
|
|
||||||
int k;
|
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return;
|
return;
|
||||||
|
@ -3044,12 +3020,10 @@ DriveCrush(PLAYERp pp, int *x, int *y)
|
||||||
int testpointinquad(int x, int y, int *qx, int *qy);
|
int testpointinquad(int x, int y, int *qx, int *qy);
|
||||||
|
|
||||||
SECTOR_OBJECTp sop = pp->sop_control;
|
SECTOR_OBJECTp sop = pp->sop_control;
|
||||||
int radius;
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u;
|
USERp u;
|
||||||
int i,nexti;
|
int i,nexti;
|
||||||
short stat;
|
short stat;
|
||||||
int dot;
|
|
||||||
SECTORp *sectp;
|
SECTORp *sectp;
|
||||||
|
|
||||||
if (MoveSkip4 == 0)
|
if (MoveSkip4 == 0)
|
||||||
|
@ -3059,8 +3033,6 @@ DriveCrush(PLAYERp pp, int *x, int *y)
|
||||||
if ((pp->xvect|pp->yvect) == 0 && pp->input.angvel == 0)
|
if ((pp->xvect|pp->yvect) == 0 && pp->input.angvel == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
radius = sop->clipdist;
|
|
||||||
|
|
||||||
// main sector
|
// main sector
|
||||||
TRAVERSE_SPRITE_SECT(headspritesect[sop->op_main_sector], i, nexti)
|
TRAVERSE_SPRITE_SECT(headspritesect[sop->op_main_sector], i, nexti)
|
||||||
{
|
{
|
||||||
|
@ -3201,14 +3173,12 @@ DriveCrush(PLAYERp pp, int *x, int *y)
|
||||||
void
|
void
|
||||||
DoPlayerMoveTank(PLAYERp pp)
|
DoPlayerMoveTank(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int xvect, yvect, z;
|
int z;
|
||||||
int floor_dist;
|
int floor_dist;
|
||||||
int ret;
|
|
||||||
short save_sectnum;
|
short save_sectnum;
|
||||||
SPRITEp sp = pp->sop->sp_child;
|
SPRITEp sp = pp->sop->sp_child;
|
||||||
USERp u = User[sp - sprite];
|
USERp u = User[sp - sprite];
|
||||||
int save_cstat;
|
int save_cstat;
|
||||||
int angvel;
|
|
||||||
int x[4], y[4], ox[4], oy[4];
|
int x[4], y[4], ox[4], oy[4];
|
||||||
int wallcount;
|
int wallcount;
|
||||||
int count=0;
|
int count=0;
|
||||||
|
@ -3309,7 +3279,6 @@ DoPlayerMoveTank(PLAYERp pp)
|
||||||
|
|
||||||
if (RectClip)
|
if (RectClip)
|
||||||
{
|
{
|
||||||
int nx,ny;
|
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
int vel;
|
int vel;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -3410,12 +3379,6 @@ DoPlayerMoveTank(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerMoveTurret(PLAYERp pp)
|
DoPlayerMoveTurret(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int xvect, yvect, z;
|
|
||||||
int floor_dist;
|
|
||||||
int ret;
|
|
||||||
short save_sectnum;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
DoPlayerTurnTurret(pp);
|
DoPlayerTurnTurret(pp);
|
||||||
|
|
||||||
if (PLAYER_MOVING(pp) == 0)
|
if (PLAYER_MOVING(pp) == 0)
|
||||||
|
@ -3834,13 +3797,11 @@ DoPlayerClimb(PLAYERp pp)
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
int climb_amt;
|
int climb_amt;
|
||||||
char i;
|
char i;
|
||||||
short oldang, delta_ang;
|
|
||||||
SPRITEp sp = pp->SpriteP;
|
SPRITEp sp = pp->SpriteP;
|
||||||
int climbvel;
|
int climbvel;
|
||||||
int dot;
|
int dot;
|
||||||
short sec,wal,spr;
|
short sec,wal,spr;
|
||||||
int dist;
|
int dist;
|
||||||
short lastsectnum;
|
|
||||||
SWBOOL LadderUpdate = FALSE;
|
SWBOOL LadderUpdate = FALSE;
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
|
@ -4059,7 +4020,6 @@ int
|
||||||
DoPlayerWadeSuperJump(PLAYERp pp)
|
DoPlayerWadeSuperJump(PLAYERp pp)
|
||||||
{
|
{
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
//short angs[3];
|
//short angs[3];
|
||||||
static short angs[3] = {0, 0, 0};
|
static short angs[3] = {0, 0, 0};
|
||||||
|
@ -4315,8 +4275,6 @@ DoPlayerCrawl(PLAYERp pp)
|
||||||
|
|
||||||
if (!TEST(pp->Flags, PF_PLAYER_MOVED))
|
if (!TEST(pp->Flags, PF_PLAYER_MOVED))
|
||||||
{
|
{
|
||||||
extern STATEp sg_NinjaCrawl[];
|
|
||||||
|
|
||||||
NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Crawl);
|
NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Crawl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4346,7 +4304,6 @@ void
|
||||||
DoPlayerBeginFly(PLAYERp pp)
|
DoPlayerBeginFly(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
extern STATEp sg_NinjaFly[];
|
|
||||||
|
|
||||||
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);
|
||||||
|
@ -4377,9 +4334,6 @@ int GetSinNdx(int range, int bob_amt)
|
||||||
|
|
||||||
void PlayerWarpUpdatePos(PLAYERp pp)
|
void PlayerWarpUpdatePos(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -4413,8 +4367,6 @@ SWBOOL PlayerFloorHit(PLAYERp pp, int zlimit)
|
||||||
void
|
void
|
||||||
DoPlayerFly(PLAYERp pp)
|
DoPlayerFly(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
if (pp->cursectnum >= 0 && SectorIsUnderwaterArea(pp->cursectnum))
|
if (pp->cursectnum >= 0 && SectorIsUnderwaterArea(pp->cursectnum))
|
||||||
{
|
{
|
||||||
DoPlayerBeginDiveNoWarp(pp);
|
DoPlayerBeginDiveNoWarp(pp);
|
||||||
|
@ -4502,7 +4454,6 @@ PlayerOnLadder(PLAYERp pp)
|
||||||
short sec, wal, spr;
|
short sec, wal, spr;
|
||||||
int dist, nx, ny;
|
int dist, nx, ny;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
SPRITEp lsp;
|
SPRITEp lsp;
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
int dir;
|
int dir;
|
||||||
|
@ -4613,7 +4564,6 @@ int
|
||||||
PlayerInDiveArea(PLAYERp pp)
|
PlayerInDiveArea(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SECTORp sectp;
|
SECTORp sectp;
|
||||||
SWBOOL InMasked=FALSE;
|
|
||||||
|
|
||||||
if (pp->lo_sectp)
|
if (pp->lo_sectp)
|
||||||
{
|
{
|
||||||
|
@ -4858,7 +4808,6 @@ void
|
||||||
DoPlayerWarpToUnderwater(PLAYERp pp)
|
DoPlayerWarpToUnderwater(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
SPRITEp sp = &sprite[pp->PlayerSprite];
|
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
SECT_USERp sectu = SectUser[pp->cursectnum];
|
SECT_USERp sectu = SectUser[pp->cursectnum];
|
||||||
SPRITEp under_sp = NULL, over_sp = NULL;
|
SPRITEp under_sp = NULL, over_sp = NULL;
|
||||||
|
@ -4934,7 +4883,6 @@ void
|
||||||
DoPlayerWarpToSurface(PLAYERp pp)
|
DoPlayerWarpToSurface(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
SPRITEp sp = &sprite[pp->PlayerSprite];
|
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
SECT_USERp sectu = SectUser[pp->cursectnum];
|
SECT_USERp sectu = SectUser[pp->cursectnum];
|
||||||
short over, under;
|
short over, under;
|
||||||
|
@ -5137,9 +5085,6 @@ void DoPlayerBeginDiveNoWarp(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerStopDiveNoWarp(PLAYERp pp)
|
DoPlayerStopDiveNoWarp(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[pp->PlayerSprite];
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -5168,7 +5113,6 @@ DoPlayerStopDiveNoWarp(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerStopDive(PLAYERp pp)
|
DoPlayerStopDive(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
SPRITEp sp = &sprite[pp->PlayerSprite];
|
SPRITEp sp = &sprite[pp->PlayerSprite];
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
|
@ -5199,9 +5143,8 @@ DoPlayerStopDive(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerDiveMeter(PLAYERp pp)
|
DoPlayerDiveMeter(PLAYERp pp)
|
||||||
{
|
{
|
||||||
short color=0,i=0,metertics,meterunit;
|
short color=0,metertics,meterunit;
|
||||||
int y;
|
int y;
|
||||||
extern char buffer[];
|
|
||||||
|
|
||||||
|
|
||||||
if (NoMeters) return;
|
if (NoMeters) return;
|
||||||
|
@ -5409,7 +5352,6 @@ DoPlayerDive(PLAYERp pp)
|
||||||
(PLAYER_MOVING(pp) && (RANDOM_P2(1024<<5)>>5) < 64))
|
(PLAYER_MOVING(pp) && (RANDOM_P2(1024<<5)>>5) < 64))
|
||||||
{
|
{
|
||||||
short bubble;
|
short bubble;
|
||||||
USERp bu;
|
|
||||||
SPRITEp bp;
|
SPRITEp bp;
|
||||||
int nx,ny;
|
int nx,ny;
|
||||||
|
|
||||||
|
@ -5417,7 +5359,6 @@ DoPlayerDive(PLAYERp pp)
|
||||||
bubble = SpawnBubble(pp->SpriteP - sprite);
|
bubble = SpawnBubble(pp->SpriteP - sprite);
|
||||||
if (bubble >= 0)
|
if (bubble >= 0)
|
||||||
{
|
{
|
||||||
bu = User[bubble];
|
|
||||||
bp = &sprite[bubble];
|
bp = &sprite[bubble];
|
||||||
|
|
||||||
// back it up a bit to get it out of your face
|
// back it up a bit to get it out of your face
|
||||||
|
@ -5835,8 +5776,6 @@ void
|
||||||
DoPlayerBeginOperate(PLAYERp pp)
|
DoPlayerBeginOperate(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
int cz, fz;
|
int cz, fz;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -5934,8 +5873,6 @@ DoPlayerBeginOperate(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
|
DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
int cz, fz;
|
int cz, fz;
|
||||||
int i;
|
int i;
|
||||||
short save_sectnum;
|
short save_sectnum;
|
||||||
|
@ -6110,7 +6047,6 @@ DoPlayerStopOperate(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerOperateTurret(PLAYERp pp)
|
DoPlayerOperateTurret(PLAYERp pp)
|
||||||
{
|
{
|
||||||
short oldang;
|
|
||||||
short save_sectnum;
|
short save_sectnum;
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(pp, SK_OPERATE))
|
if (TEST_SYNC_KEY(pp, SK_OPERATE))
|
||||||
|
@ -6151,7 +6087,6 @@ DoPlayerOperateTurret(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerOperateBoat(PLAYERp pp)
|
DoPlayerOperateBoat(PLAYERp pp)
|
||||||
{
|
{
|
||||||
short oldang;
|
|
||||||
short save_sectnum;
|
short save_sectnum;
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(pp, SK_OPERATE))
|
if (TEST_SYNC_KEY(pp, SK_OPERATE))
|
||||||
|
@ -6191,7 +6126,6 @@ DoPlayerOperateBoat(PLAYERp pp)
|
||||||
void
|
void
|
||||||
DoPlayerOperateTank(PLAYERp pp)
|
DoPlayerOperateTank(PLAYERp pp)
|
||||||
{
|
{
|
||||||
short oldang;
|
|
||||||
short save_sectnum;
|
short save_sectnum;
|
||||||
|
|
||||||
//ASSERT(!TEST_SYNC_KEY(pp, SK_OPERATE));
|
//ASSERT(!TEST_SYNC_KEY(pp, SK_OPERATE));
|
||||||
|
@ -6405,7 +6339,6 @@ void
|
||||||
DoPlayerDeathMessage(PLAYERp pp, PLAYERp killer)
|
DoPlayerDeathMessage(PLAYERp pp, PLAYERp killer)
|
||||||
{
|
{
|
||||||
int pnum;
|
int pnum;
|
||||||
short i;
|
|
||||||
SWBOOL SEND_OK = FALSE;
|
SWBOOL SEND_OK = FALSE;
|
||||||
|
|
||||||
killer->KilledPlayer[pp-Player]++;
|
killer->KilledPlayer[pp-Player]++;
|
||||||
|
@ -6722,7 +6655,6 @@ DoPlayerDeathTilt(PLAYERp pp, short target, short speed)
|
||||||
void
|
void
|
||||||
DoPlayerDeathZrange(PLAYERp pp)
|
DoPlayerDeathZrange(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
|
|
||||||
// make sure we don't land on a regular sprite
|
// make sure we don't land on a regular sprite
|
||||||
|
@ -6739,9 +6671,6 @@ DoPlayerDeathZrange(PLAYERp pp)
|
||||||
|
|
||||||
void DoPlayerDeathHurl(PLAYERp pp)
|
void DoPlayerDeathHurl(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (numplayers > 1)
|
||||||
{
|
{
|
||||||
if (TEST_SYNC_KEY(pp, SK_SHOOT))
|
if (TEST_SYNC_KEY(pp, SK_SHOOT))
|
||||||
|
@ -6770,9 +6699,6 @@ void DoPlayerDeathHurl(PLAYERp pp)
|
||||||
|
|
||||||
void DoPlayerDeathFollowKiller(PLAYERp pp)
|
void DoPlayerDeathFollowKiller(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
// if it didn't make it to this angle because of a low ceiling or something
|
// if it didn't make it to this angle because of a low ceiling or something
|
||||||
// continue on to it
|
// continue on to it
|
||||||
DoPlayerDeathHoriz(pp, PLAYER_DEATH_HORIZ_UP_VALUE, 4);
|
DoPlayerDeathHoriz(pp, PLAYER_DEATH_HORIZ_UP_VALUE, 4);
|
||||||
|
@ -6807,7 +6733,6 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
|
||||||
SPRITEp sp = pp->SpriteP;
|
SPRITEp sp = pp->SpriteP;
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
extern SWBOOL DemoMode,DemoDone;
|
extern SWBOOL DemoMode,DemoDone;
|
||||||
extern SWBOOL InputMode;
|
|
||||||
|
|
||||||
//if (TEST_SYNC_KEY(pp, SK_OPERATE))
|
//if (TEST_SYNC_KEY(pp, SK_OPERATE))
|
||||||
if (TEST_SYNC_KEY(pp, SK_SPACE_BAR))
|
if (TEST_SYNC_KEY(pp, SK_SPACE_BAR))
|
||||||
|
@ -6975,8 +6900,8 @@ SPRITEp DoPlayerDeathCheckKick(PLAYERp pp)
|
||||||
|
|
||||||
void DoPlayerDeathMoveHead(PLAYERp pp)
|
void DoPlayerDeathMoveHead(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP, hp;
|
SPRITEp sp = pp->SpriteP;
|
||||||
USERp u = User[pp->PlayerSprite], hu;
|
USERp u = User[pp->PlayerSprite];
|
||||||
int dax,day;
|
int dax,day;
|
||||||
short sectnum;
|
short sectnum;
|
||||||
|
|
||||||
|
@ -7053,9 +6978,6 @@ void DoPlayerDeathMoveHead(PLAYERp pp)
|
||||||
|
|
||||||
void DoPlayerDeathFlip(PLAYERp pp)
|
void DoPlayerDeathFlip(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -7092,7 +7014,6 @@ void DoPlayerDeathFlip(PLAYERp pp)
|
||||||
void DoPlayerDeathDrown(PLAYERp pp)
|
void DoPlayerDeathDrown(PLAYERp pp)
|
||||||
{
|
{
|
||||||
SPRITEp sp = pp->SpriteP;
|
SPRITEp sp = pp->SpriteP;
|
||||||
USERp u = User[pp->PlayerSprite];
|
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return;
|
return;
|
||||||
|
@ -7763,8 +7684,6 @@ void UpdateScrollingMessages(void)
|
||||||
|
|
||||||
void UpdateConMessages(void)
|
void UpdateConMessages(void)
|
||||||
{
|
{
|
||||||
short i;
|
|
||||||
|
|
||||||
if (!ConInputMode) return;
|
if (!ConInputMode) return;
|
||||||
|
|
||||||
if ((klabs(conbotgoal-conbot) <= 12))
|
if ((klabs(conbotgoal-conbot) <= 12))
|
||||||
|
@ -7877,18 +7796,14 @@ domovethings(void)
|
||||||
{
|
{
|
||||||
extern SWBOOL DebugAnim;
|
extern SWBOOL DebugAnim;
|
||||||
extern SWBOOL DebugPanel;
|
extern SWBOOL DebugPanel;
|
||||||
extern SWBOOL DebugActor;
|
|
||||||
extern SWBOOL DebugSector;
|
extern SWBOOL DebugSector;
|
||||||
extern SWBOOL DebugActorFreeze;
|
extern SWBOOL DebugActorFreeze;
|
||||||
extern SWBOOL ResCheat;
|
extern SWBOOL ResCheat;
|
||||||
extern int PlayClock;
|
extern int PlayClock;
|
||||||
short i, j, pnum, nexti;
|
short i, pnum;
|
||||||
extern SWBOOL GamePaused;
|
extern SWBOOL GamePaused;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
USERp u;
|
|
||||||
SPRITEp sp;
|
|
||||||
extern unsigned int MoveThingsCount;
|
extern unsigned int MoveThingsCount;
|
||||||
extern SWBOOL ScrollMode2D;
|
|
||||||
extern SWBOOL ReloadPrompt;
|
extern SWBOOL ReloadPrompt;
|
||||||
extern int FinishTimer;
|
extern int FinishTimer;
|
||||||
|
|
||||||
|
@ -8360,7 +8275,6 @@ InitMultiPlayerInfo(void)
|
||||||
int
|
int
|
||||||
DoFootPrints(short SpriteNum)
|
DoFootPrints(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (u->PlayerP)
|
if (u->PlayerP)
|
||||||
|
|
|
@ -120,7 +120,6 @@ DoPrediction(PLAYERp ppp)
|
||||||
USERp u;
|
USERp u;
|
||||||
SPRITE spr;
|
SPRITE spr;
|
||||||
int bakrandomseed;
|
int bakrandomseed;
|
||||||
short angvel;
|
|
||||||
|
|
||||||
// routine called from MoveLoop
|
// routine called from MoveLoop
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,6 @@ int
|
||||||
SetGunQuake(int16_t SpriteNum)
|
SetGunQuake(int16_t SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 40, 8, 40000);
|
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 40, 8, 40000);
|
||||||
|
|
||||||
|
|
|
@ -884,7 +884,6 @@ GetJumpHeight(short jump_speed, short jump_grav)
|
||||||
int
|
int
|
||||||
PickJumpSpeed(short SpriteNum, int pix_height)
|
PickJumpSpeed(short SpriteNum, int pix_height)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
//ASSERT(pix_height < 128);
|
//ASSERT(pix_height < 128);
|
||||||
|
@ -945,7 +944,6 @@ InitRipperHang(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
int dist;
|
int dist;
|
||||||
short ang2;
|
|
||||||
|
|
||||||
hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
|
hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
|
||||||
|
|
||||||
|
@ -1005,7 +1003,6 @@ InitRipperHang(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipperHang(short SpriteNum)
|
DoRipperHang(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if ((u->WaitTics -= ACTORMOVETICS) > 0)
|
if ((u->WaitTics -= ACTORMOVETICS) > 0)
|
||||||
|
@ -1060,9 +1057,7 @@ DoRipperMoveHang(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipperHangJF(short SpriteNum)
|
DoRipperHangJF(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
int nx, ny;
|
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
||||||
{
|
{
|
||||||
|
@ -1096,7 +1091,6 @@ DoRipperBeginJumpAttack(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
||||||
int dist;
|
|
||||||
int CanSeePlayer(short SpriteNum);
|
int CanSeePlayer(short SpriteNum);
|
||||||
short tang;
|
short tang;
|
||||||
|
|
||||||
|
@ -1132,7 +1126,6 @@ DoRipperBeginJumpAttack(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipperMoveJump(short SpriteNum)
|
DoRipperMoveJump(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
||||||
|
@ -1162,7 +1155,6 @@ DoRipperMoveJump(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipperQuickJump(short SpriteNum)
|
DoRipperQuickJump(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
// Tests to see if ripper is on top of a player/enemy and then immediatly
|
// Tests to see if ripper is on top of a player/enemy and then immediatly
|
||||||
|
@ -1188,7 +1180,6 @@ DoRipperQuickJump(short SpriteNum)
|
||||||
int
|
int
|
||||||
NullRipper(short SpriteNum)
|
NullRipper(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
@ -1202,7 +1193,6 @@ NullRipper(short SpriteNum)
|
||||||
|
|
||||||
int DoRipperPain(short SpriteNum)
|
int DoRipperPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullRipper(SpriteNum);
|
NullRipper(SpriteNum);
|
||||||
|
@ -1236,7 +1226,6 @@ int DoRipperRipHeart(short SpriteNum)
|
||||||
int DoRipperStandHeart(short SpriteNum)
|
int DoRipperStandHeart(short SpriteNum)
|
||||||
// CTW MODIFICATION END
|
// CTW MODIFICATION END
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullRipper(SpriteNum);
|
NullRipper(SpriteNum);
|
||||||
|
@ -1300,7 +1289,6 @@ void RipperHatch(short Weapon)
|
||||||
int
|
int
|
||||||
DoRipperMove(short SpriteNum)
|
DoRipperMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (u->scale_speed)
|
if (u->scale_speed)
|
||||||
|
|
|
@ -944,7 +944,6 @@ InitRipper2Hang(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
int dist;
|
int dist;
|
||||||
short ang2;
|
|
||||||
|
|
||||||
hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
|
hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
|
||||||
|
|
||||||
|
@ -1003,7 +1002,6 @@ InitRipper2Hang(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipper2Hang(short SpriteNum)
|
DoRipper2Hang(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if ((u->WaitTics -= ACTORMOVETICS) > 0)
|
if ((u->WaitTics -= ACTORMOVETICS) > 0)
|
||||||
|
@ -1066,9 +1064,7 @@ DoRipper2MoveHang(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipper2HangJF(short SpriteNum)
|
DoRipper2HangJF(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
int nx, ny;
|
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
||||||
{
|
{
|
||||||
|
@ -1102,7 +1098,6 @@ DoRipper2BeginJumpAttack(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
SPRITEp psp = User[SpriteNum]->tgt_sp;
|
||||||
int dist;
|
|
||||||
int CanSeePlayer(short SpriteNum);
|
int CanSeePlayer(short SpriteNum);
|
||||||
short tang;
|
short tang;
|
||||||
|
|
||||||
|
@ -1145,7 +1140,6 @@ DoRipper2BeginJumpAttack(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipper2MoveJump(short SpriteNum)
|
DoRipper2MoveJump(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
|
||||||
|
@ -1175,7 +1169,6 @@ DoRipper2MoveJump(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoRipper2QuickJump(short SpriteNum)
|
DoRipper2QuickJump(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
// Tests to see if ripper2 is on top of a player/enemy and then immediatly
|
// Tests to see if ripper2 is on top of a player/enemy and then immediatly
|
||||||
|
@ -1201,7 +1194,6 @@ DoRipper2QuickJump(short SpriteNum)
|
||||||
int
|
int
|
||||||
NullRipper2(short SpriteNum)
|
NullRipper2(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
@ -1215,7 +1207,6 @@ NullRipper2(short SpriteNum)
|
||||||
|
|
||||||
int DoRipper2Pain(short SpriteNum)
|
int DoRipper2Pain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullRipper2(SpriteNum);
|
NullRipper2(SpriteNum);
|
||||||
|
@ -1357,9 +1348,6 @@ DoRipper2Move(short SpriteNum)
|
||||||
|
|
||||||
int InitRipper2Charge(short SpriteNum)
|
int InitRipper2Charge(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
DoActorSetSpeed(SpriteNum, FAST_SPEED);
|
DoActorSetSpeed(SpriteNum, FAST_SPEED);
|
||||||
|
|
||||||
InitActorMoveCloser(SpriteNum);
|
InitActorMoveCloser(SpriteNum);
|
||||||
|
|
|
@ -92,7 +92,6 @@ FAF_Sector(short sectnum)
|
||||||
{
|
{
|
||||||
short SpriteNum, Next;
|
short SpriteNum, Next;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
SWBOOL found = FALSE;
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_SECT(headspritesect[sectnum], SpriteNum, Next)
|
TRAVERSE_SPRITE_SECT(headspritesect[sectnum], SpriteNum, Next)
|
||||||
{
|
{
|
||||||
|
@ -173,7 +172,6 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum,
|
||||||
// hitscan warping
|
// hitscan warping
|
||||||
if (TEST(wall[hitinfo->wall].cstat, CSTAT_WALL_WARP_HITSCAN))
|
if (TEST(wall[hitinfo->wall].cstat, CSTAT_WALL_WARP_HITSCAN))
|
||||||
{
|
{
|
||||||
short src_sect = hitinfo->sect;
|
|
||||||
short dest_sect;
|
short dest_sect;
|
||||||
|
|
||||||
MONO_PRINT(ds);
|
MONO_PRINT(ds);
|
||||||
|
@ -558,7 +556,6 @@ void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,
|
||||||
{
|
{
|
||||||
case HIT_SECTOR:
|
case HIT_SECTOR:
|
||||||
{
|
{
|
||||||
short hit_sector = NORM_SECTOR(*florhit);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case HIT_SPRITE:
|
case HIT_SPRITE:
|
||||||
|
@ -670,9 +667,7 @@ void
|
||||||
SetupMirrorTiles(void)
|
SetupMirrorTiles(void)
|
||||||
{
|
{
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
short j, nextj;
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
SWBOOL found;
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
{
|
{
|
||||||
|
@ -768,7 +763,7 @@ short GlobStackSect[2];
|
||||||
void
|
void
|
||||||
GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
|
GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i;
|
||||||
short sectorlist[16];
|
short sectorlist[16];
|
||||||
int sln = 0;
|
int sln = 0;
|
||||||
short SpriteNum, Next;
|
short SpriteNum, Next;
|
||||||
|
@ -888,7 +883,6 @@ FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum
|
||||||
int yoff = 0;
|
int yoff = 0;
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
SPRITEp sp = NULL;
|
SPRITEp sp = NULL;
|
||||||
short top_sprite = -1;
|
|
||||||
int pix_diff;
|
int pix_diff;
|
||||||
int newz;
|
int newz;
|
||||||
|
|
||||||
|
@ -1063,10 +1057,7 @@ short
|
||||||
ViewSectorInScene(short cursectnum, short type, short level)
|
ViewSectorInScene(short cursectnum, short type, short level)
|
||||||
{
|
{
|
||||||
int i, nexti;
|
int i, nexti;
|
||||||
int j, nextj;
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
SPRITEp sp2;
|
|
||||||
int cz, fz;
|
|
||||||
short match;
|
short match;
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
|
||||||
|
|
|
@ -49,7 +49,6 @@ void DoRotatorStopInterp(short SpriteNum);
|
||||||
void ReverseRotator(short SpriteNum)
|
void ReverseRotator(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
ROTATORp r;
|
ROTATORp r;
|
||||||
|
|
||||||
r = u->rotator;
|
r = u->rotator;
|
||||||
|
@ -100,7 +99,6 @@ void SetRotatorActive(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
ROTATORp r;
|
ROTATORp r;
|
||||||
|
|
||||||
r = u->rotator;
|
r = u->rotator;
|
||||||
|
@ -124,7 +122,6 @@ void SetRotatorInactive(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
|
|
||||||
DoRotatorStopInterp(SpriteNum);
|
DoRotatorStopInterp(SpriteNum);
|
||||||
|
|
||||||
|
@ -137,10 +134,7 @@ void SetRotatorInactive(short SpriteNum)
|
||||||
// called for operation from the space bar
|
// called for operation from the space bar
|
||||||
short DoRotatorOperate(PLAYERp pp, short sectnum)
|
short DoRotatorOperate(PLAYERp pp, short sectnum)
|
||||||
{
|
{
|
||||||
USERp fu;
|
|
||||||
SPRITEp fsp;
|
|
||||||
short match;
|
short match;
|
||||||
short i,nexti;
|
|
||||||
|
|
||||||
match = sector[sectnum].hitag;
|
match = sector[sectnum].hitag;
|
||||||
|
|
||||||
|
@ -242,7 +236,6 @@ TestRotatorMatchActive(short match)
|
||||||
{
|
{
|
||||||
USERp fu;
|
USERp fu;
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short sectnum;
|
|
||||||
|
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
|
||||||
|
@ -441,9 +434,6 @@ int DoRotator(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
int *lptr;
|
|
||||||
int amt;
|
|
||||||
|
|
||||||
// could move this inside sprite control
|
// could move this inside sprite control
|
||||||
DoRotatorMove(SpriteNum);
|
DoRotatorMove(SpriteNum);
|
||||||
|
|
|
@ -217,8 +217,6 @@ bool GameInterface::SaveGame(FSaveGameNode *sv)
|
||||||
MFILE_WRITE fil;
|
MFILE_WRITE fil;
|
||||||
int i,j;
|
int i,j;
|
||||||
short ndx;
|
short ndx;
|
||||||
SPRITE tsp;
|
|
||||||
SPRITEp sp;
|
|
||||||
PLAYER tp;
|
PLAYER tp;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
SECT_USERp sectu;
|
SECT_USERp sectu;
|
||||||
|
@ -226,13 +224,10 @@ bool GameInterface::SaveGame(FSaveGameNode *sv)
|
||||||
USERp u;
|
USERp u;
|
||||||
ANIM tanim;
|
ANIM tanim;
|
||||||
ANIMp a;
|
ANIMp a;
|
||||||
int8_t code;
|
|
||||||
uint8_t data_code;
|
|
||||||
int16_t data_ndx;
|
|
||||||
PANEL_SPRITE tpanel_sprite;
|
PANEL_SPRITE tpanel_sprite;
|
||||||
PANEL_SPRITEp psp,cur,next;
|
PANEL_SPRITEp psp,cur,next;
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
int cnt = 0, saveisshot=0;
|
int saveisshot=0;
|
||||||
OrgTileP otp, next_otp;
|
OrgTileP otp, next_otp;
|
||||||
|
|
||||||
Saveable_Init();
|
Saveable_Init();
|
||||||
|
@ -391,7 +386,6 @@ bool GameInterface::SaveGame(FSaveGameNode *sv)
|
||||||
// write header
|
// write header
|
||||||
MWRITE(&ndx,sizeof(ndx),1,fil);
|
MWRITE(&ndx,sizeof(ndx),1,fil);
|
||||||
|
|
||||||
sp = &sprite[i];
|
|
||||||
memcpy(&tu, User[i], sizeof(USER));
|
memcpy(&tu, User[i], sizeof(USER));
|
||||||
u = &tu;
|
u = &tu;
|
||||||
|
|
||||||
|
@ -709,22 +703,13 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
|
||||||
int i,j,saveisshot=0;
|
int i,j,saveisshot=0;
|
||||||
short ndx,SpriteNum,sectnum;
|
short ndx,SpriteNum,sectnum;
|
||||||
PLAYERp pp = NULL;
|
PLAYERp pp = NULL;
|
||||||
SPRITEp sp;
|
|
||||||
USERp u;
|
USERp u;
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
SECT_USERp sectu;
|
SECT_USERp sectu;
|
||||||
int8_t code;
|
|
||||||
ANIMp a;
|
ANIMp a;
|
||||||
uint8_t data_code;
|
PANEL_SPRITEp psp,next;
|
||||||
int16_t data_ndx;
|
OrgTileP otp;
|
||||||
PANEL_SPRITEp psp,next,cur;
|
|
||||||
PANEL_SPRITE tpanel_sprite;
|
|
||||||
OrgTileP otp, next_otp;
|
|
||||||
|
|
||||||
int RotNdx;
|
|
||||||
int StateStartNdx;
|
|
||||||
int StateNdx;
|
|
||||||
int StateEndNdx;
|
|
||||||
|
|
||||||
Saveable_Init();
|
Saveable_Init();
|
||||||
|
|
||||||
|
@ -835,7 +820,6 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
|
||||||
MREAD(&SpriteNum, sizeof(SpriteNum),1,fil);
|
MREAD(&SpriteNum, sizeof(SpriteNum),1,fil);
|
||||||
while (SpriteNum != -1)
|
while (SpriteNum != -1)
|
||||||
{
|
{
|
||||||
sp = &sprite[SpriteNum];
|
|
||||||
User[SpriteNum] = u = (USERp)CallocMem(sizeof(USER), 1);
|
User[SpriteNum] = u = (USERp)CallocMem(sizeof(USER), 1);
|
||||||
MREAD(u,sizeof(USER),1,fil);
|
MREAD(u,sizeof(USER),1,fil);
|
||||||
|
|
||||||
|
|
|
@ -785,7 +785,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
||||||
}
|
}
|
||||||
case CM_INVENTORY:
|
case CM_INVENTORY:
|
||||||
{
|
{
|
||||||
char *invtokptr = script->ltextptr, *invnumptr;
|
char *invnumptr;
|
||||||
int in;
|
int in;
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
int amt = -1;
|
int amt = -1;
|
||||||
|
@ -835,7 +835,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
||||||
}
|
}
|
||||||
case CM_WEAPON:
|
case CM_WEAPON:
|
||||||
{
|
{
|
||||||
char *wpntokptr = script->ltextptr, *wpnnumptr;
|
char *wpnnumptr;
|
||||||
char *name = NULL, *ammo = NULL;
|
char *name = NULL, *ammo = NULL;
|
||||||
int maxammo = -1, damagemin = -1, damagemax = -1, pickup = -1, wpickup = -1;
|
int maxammo = -1, damagemin = -1, damagemax = -1, pickup = -1, wpickup = -1;
|
||||||
int in,id;
|
int in,id;
|
||||||
|
|
|
@ -267,7 +267,7 @@ WallSetup(void)
|
||||||
case TAG_WALL_SINE_Y_BEGIN:
|
case TAG_WALL_SINE_Y_BEGIN:
|
||||||
case TAG_WALL_SINE_X_BEGIN:
|
case TAG_WALL_SINE_X_BEGIN:
|
||||||
{
|
{
|
||||||
short wall_num, cnt, last_wall, num_points, type, tag_end;
|
short wall_num, cnt, num_points, type, tag_end;
|
||||||
SINE_WALLp sw;
|
SINE_WALLp sw;
|
||||||
short range = 250, speed = 3, peak = 0;
|
short range = 250, speed = 3, peak = 0;
|
||||||
|
|
||||||
|
@ -385,10 +385,10 @@ SectorLiquidSet(short i)
|
||||||
void
|
void
|
||||||
SectorSetup(void)
|
SectorSetup(void)
|
||||||
{
|
{
|
||||||
short i = 0, k, tag;
|
short i = 0, tag;
|
||||||
short NextSineWave = 0, rotcnt = 0, swingcnt = 0;
|
short NextSineWave = 0;
|
||||||
|
|
||||||
short startwall, endwall, j, ndx, door_sector;
|
short ndx;
|
||||||
|
|
||||||
WallSetup();
|
WallSetup();
|
||||||
|
|
||||||
|
@ -848,8 +848,8 @@ SectorDistanceByMid(short sect1, int sect2)
|
||||||
short
|
short
|
||||||
DoSpawnActorTrigger(short match)
|
DoSpawnActorTrigger(short match)
|
||||||
{
|
{
|
||||||
int i, nexti, pnum;
|
int i, nexti;
|
||||||
short spawn_count = 0, hidden;
|
short spawn_count = 0;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPAWN_TRIGGER], i, nexti)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPAWN_TRIGGER], i, nexti)
|
||||||
|
@ -879,7 +879,6 @@ OperateSector(short sectnum, short player_is_operating)
|
||||||
if (!player_is_operating)
|
if (!player_is_operating)
|
||||||
{
|
{
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short match;
|
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1040,8 +1039,6 @@ SectorExp(short SpriteNum, short sectnum, short orig_ang, int zh)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SECT_USERp sectu = SectUser[sectnum];
|
|
||||||
SECTORp sectp = §or[sectnum];
|
|
||||||
short explosion;
|
short explosion;
|
||||||
SPRITEp exp;
|
SPRITEp exp;
|
||||||
USERp eu;
|
USERp eu;
|
||||||
|
@ -1085,11 +1082,6 @@ DoExplodeSector(short match)
|
||||||
int zh;
|
int zh;
|
||||||
USERp u;
|
USERp u;
|
||||||
short cf,nextcf;
|
short cf,nextcf;
|
||||||
short ed,nexted;
|
|
||||||
|
|
||||||
int ss, nextss;
|
|
||||||
SECTORp dsectp, ssectp;
|
|
||||||
SPRITEp src_sp, dest_sp;
|
|
||||||
|
|
||||||
SPRITEp esp;
|
SPRITEp esp;
|
||||||
SECTORp sectp;
|
SECTORp sectp;
|
||||||
|
@ -1136,7 +1128,6 @@ DoExplodeSector(short match)
|
||||||
int DoSpawnSpot(short SpriteNum)
|
int DoSpawnSpot(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
|
|
||||||
if ((u->WaitTics -= synctics) < 0)
|
if ((u->WaitTics -= synctics) < 0)
|
||||||
{
|
{
|
||||||
|
@ -1916,7 +1907,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
|
||||||
case TAG_LEVEL_EXIT_SWITCH:
|
case TAG_LEVEL_EXIT_SWITCH:
|
||||||
{
|
{
|
||||||
extern short Level;
|
extern short Level;
|
||||||
extern SWBOOL QuitFlag, ExitLevel, FinishedLevel;
|
extern SWBOOL ExitLevel, FinishedLevel;
|
||||||
|
|
||||||
AnimateSwitch(sp, -1);
|
AnimateSwitch(sp, -1);
|
||||||
|
|
||||||
|
@ -2126,7 +2117,7 @@ OperateTripTrigger(PLAYERp pp)
|
||||||
case TAG_LEVEL_EXIT_SWITCH:
|
case TAG_LEVEL_EXIT_SWITCH:
|
||||||
{
|
{
|
||||||
extern short Level;
|
extern short Level;
|
||||||
extern SWBOOL QuitFlag, ExitLevel, FinishedLevel;
|
extern SWBOOL ExitLevel, FinishedLevel;
|
||||||
|
|
||||||
if (sectp->hitag)
|
if (sectp->hitag)
|
||||||
Level = sectp->hitag;
|
Level = sectp->hitag;
|
||||||
|
@ -2337,9 +2328,6 @@ short PlayerTakeSectorDamage(PLAYERp pp)
|
||||||
#define PLAYER_SOUNDEVENT_TAG 900
|
#define PLAYER_SOUNDEVENT_TAG 900
|
||||||
SWBOOL NearThings(PLAYERp pp)
|
SWBOOL NearThings(PLAYERp pp)
|
||||||
{
|
{
|
||||||
short sectnum;
|
|
||||||
short rndnum;
|
|
||||||
int daz;
|
|
||||||
short neartagsect, neartagwall, neartagsprite;
|
short neartagsect, neartagwall, neartagsprite;
|
||||||
int neartaghitdist;
|
int neartaghitdist;
|
||||||
|
|
||||||
|
@ -2675,12 +2663,11 @@ PlayerOperateEnv(PLAYERp pp)
|
||||||
|
|
||||||
{
|
{
|
||||||
int neartaghitdist;
|
int neartaghitdist;
|
||||||
short neartagsector, neartagsprite, neartagwall;
|
short neartagsector, neartagwall;
|
||||||
|
|
||||||
neartaghitdist = nti[0].dist;
|
neartaghitdist = nti[0].dist;
|
||||||
neartagsector = nti[0].sectnum;
|
neartagsector = nti[0].sectnum;
|
||||||
neartagwall = nti[0].wallnum;
|
neartagwall = nti[0].wallnum;
|
||||||
neartagsprite = nti[0].spritenum;
|
|
||||||
|
|
||||||
if (neartagsector >= 0 && neartaghitdist < 1024)
|
if (neartagsector >= 0 && neartaghitdist < 1024)
|
||||||
{
|
{
|
||||||
|
@ -2940,7 +2927,7 @@ DoAnim(int numtics)
|
||||||
void
|
void
|
||||||
AnimClear(void)
|
AnimClear(void)
|
||||||
{
|
{
|
||||||
int i, animval;
|
int i;
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
AnimCnt = 0;
|
AnimCnt = 0;
|
||||||
|
@ -3290,7 +3277,6 @@ DoPanning(void)
|
||||||
void
|
void
|
||||||
DoSector(void)
|
DoSector(void)
|
||||||
{
|
{
|
||||||
short i;
|
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
SWBOOL riding;
|
SWBOOL riding;
|
||||||
extern SWBOOL DebugActorFreeze;
|
extern SWBOOL DebugActorFreeze;
|
||||||
|
|
|
@ -757,7 +757,6 @@ SetupSerp(short SpriteNum)
|
||||||
|
|
||||||
int NullSerp(short SpriteNum)
|
int NullSerp(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
@ -814,7 +813,6 @@ int DoSerpMove(short SpriteNum)
|
||||||
int DoDeathSpecial(short SpriteNum)
|
int DoDeathSpecial(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
DoMatchEverything(NULL, sp->lotag, ON);
|
DoMatchEverything(NULL, sp->lotag, ON);
|
||||||
|
|
||||||
|
|
|
@ -538,7 +538,6 @@ SetupSkel(short SpriteNum)
|
||||||
int DoSkelInitTeleport(short SpriteNum)
|
int DoSkelInitTeleport(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
|
||||||
|
@ -550,7 +549,6 @@ int DoSkelInitTeleport(short SpriteNum)
|
||||||
int DoSkelTeleport(short SpriteNum)
|
int DoSkelTeleport(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
int x,y;
|
int x,y;
|
||||||
|
|
||||||
x = sp->x;
|
x = sp->x;
|
||||||
|
@ -584,7 +582,6 @@ int DoSkelTeleport(short SpriteNum)
|
||||||
int DoSkelTermTeleport(short SpriteNum)
|
int DoSkelTermTeleport(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
|
|
||||||
SET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
SET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
|
||||||
|
@ -593,7 +590,6 @@ int DoSkelTermTeleport(short SpriteNum)
|
||||||
|
|
||||||
int NullSkel(short SpriteNum)
|
int NullSkel(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
@ -607,7 +603,6 @@ int NullSkel(short SpriteNum)
|
||||||
|
|
||||||
int DoSkelPain(short SpriteNum)
|
int DoSkelPain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullSkel(SpriteNum);
|
NullSkel(SpriteNum);
|
||||||
|
@ -620,7 +615,6 @@ int DoSkelPain(short SpriteNum)
|
||||||
|
|
||||||
int DoSkelMove(short SpriteNum)
|
int DoSkelMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
if (TEST(u->Flags,SPR_SLIDING))
|
if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
|
|
@ -448,7 +448,6 @@ int DoSkullBob(short SpriteNum)
|
||||||
|
|
||||||
int DoSkullSpawnShrap(short SpriteNum)
|
int DoSkullSpawnShrap(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
int SpawnShrap(short, short);
|
int SpawnShrap(short, short);
|
||||||
|
|
||||||
SpawnShrap(SpriteNum, -1);
|
SpawnShrap(SpriteNum, -1);
|
||||||
|
|
|
@ -43,7 +43,6 @@ BEGIN_SW_NS
|
||||||
void ReverseSlidor(short SpriteNum)
|
void ReverseSlidor(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
ROTATORp r;
|
ROTATORp r;
|
||||||
|
|
||||||
r = u->rotator;
|
r = u->rotator;
|
||||||
|
@ -95,7 +94,6 @@ void SetSlidorActive(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
ROTATORp r;
|
ROTATORp r;
|
||||||
|
|
||||||
r = u->rotator;
|
r = u->rotator;
|
||||||
|
@ -119,7 +117,6 @@ void SetSlidorInactive(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
|
|
||||||
DoSlidorInterp(SpriteNum, stopinterpolation);
|
DoSlidorInterp(SpriteNum, stopinterpolation);
|
||||||
|
|
||||||
|
@ -132,10 +129,7 @@ void SetSlidorInactive(short SpriteNum)
|
||||||
// called for operation from the space bar
|
// called for operation from the space bar
|
||||||
short DoSlidorOperate(PLAYERp pp, short sectnum)
|
short DoSlidorOperate(PLAYERp pp, short sectnum)
|
||||||
{
|
{
|
||||||
USERp fu;
|
|
||||||
SPRITEp fsp;
|
|
||||||
short match;
|
short match;
|
||||||
short i,nexti;
|
|
||||||
|
|
||||||
match = sector[sectnum].hitag;
|
match = sector[sectnum].hitag;
|
||||||
|
|
||||||
|
@ -238,7 +232,6 @@ TestSlidorMatchActive(short match)
|
||||||
{
|
{
|
||||||
USERp fu;
|
USERp fu;
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short sectnum;
|
|
||||||
|
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
|
||||||
|
@ -502,11 +495,10 @@ int DoSlidorMoveWalls(short SpriteNum, int amt)
|
||||||
int DoSlidorInstantClose(short SpriteNum)
|
int DoSlidorInstantClose(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
short w, pw, startwall, endwall;
|
short w, startwall;
|
||||||
int diff;
|
int diff;
|
||||||
|
|
||||||
w = startwall = sector[sprite[SpriteNum].sectnum].wallptr;
|
w = startwall = sector[sprite[SpriteNum].sectnum].wallptr;
|
||||||
endwall = startwall + sector[sprite[SpriteNum].sectnum].wallnum - 1;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -546,10 +538,6 @@ int DoSlidorMove(short SpriteNum)
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
ROTATORp r;
|
ROTATORp r;
|
||||||
short ndx,w,startwall,endwall;
|
|
||||||
int i, nexti;
|
|
||||||
int nx,ny;
|
|
||||||
int dist,closest;
|
|
||||||
int old_pos;
|
int old_pos;
|
||||||
SWBOOL kill = FALSE;
|
SWBOOL kill = FALSE;
|
||||||
|
|
||||||
|
@ -693,8 +681,6 @@ int DoSlidor(short SpriteNum)
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
SECTORp sectp = §or[sp->sectnum];
|
||||||
int *lptr;
|
|
||||||
int amt;
|
|
||||||
|
|
||||||
DoSlidorMove(SpriteNum);
|
DoSlidorMove(SpriteNum);
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,6 @@ void SetSpikeInactive(short SpriteNum)
|
||||||
// called for operation from the space bar
|
// called for operation from the space bar
|
||||||
short DoSpikeOperate(PLAYERp pp, short sectnum)
|
short DoSpikeOperate(PLAYERp pp, short sectnum)
|
||||||
{
|
{
|
||||||
USERp fu;
|
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short match;
|
short match;
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
@ -154,8 +153,6 @@ short DoSpikeOperate(PLAYERp pp, short sectnum)
|
||||||
|
|
||||||
if (fsp->statnum == STAT_SPIKE && SP_TAG1(fsp) == SECT_SPIKE && SP_TAG3(fsp) == 0)
|
if (fsp->statnum == STAT_SPIKE && SP_TAG1(fsp) == SECT_SPIKE && SP_TAG3(fsp) == 0)
|
||||||
{
|
{
|
||||||
fu = User[i];
|
|
||||||
|
|
||||||
sectnum = fsp->sectnum;
|
sectnum = fsp->sectnum;
|
||||||
|
|
||||||
match = SP_TAG2(fsp);
|
match = SP_TAG2(fsp);
|
||||||
|
@ -182,7 +179,6 @@ DoSpikeMatch(PLAYERp pp, short match)
|
||||||
{
|
{
|
||||||
USERp fu;
|
USERp fu;
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short sectnum;
|
|
||||||
short first_spike = -1;
|
short first_spike = -1;
|
||||||
|
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
@ -200,8 +196,6 @@ DoSpikeMatch(PLAYERp pp, short match)
|
||||||
if (first_spike == -1)
|
if (first_spike == -1)
|
||||||
first_spike = i;
|
first_spike = i;
|
||||||
|
|
||||||
sectnum = fsp->sectnum;
|
|
||||||
|
|
||||||
if (TEST(fu->Flags, SPR_ACTIVE))
|
if (TEST(fu->Flags, SPR_ACTIVE))
|
||||||
{
|
{
|
||||||
ReverseSpike(i);
|
ReverseSpike(i);
|
||||||
|
@ -221,7 +215,6 @@ TestSpikeMatchActive(short match)
|
||||||
{
|
{
|
||||||
USERp fu;
|
USERp fu;
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short sectnum;
|
|
||||||
|
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
|
||||||
|
@ -248,8 +241,6 @@ TestSpikeMatchActive(short match)
|
||||||
int DoSpikeMove(short SpriteNum, int *lptr)
|
int DoSpikeMove(short SpriteNum, int *lptr)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
int zval;
|
int zval;
|
||||||
|
|
||||||
zval = *lptr;
|
zval = *lptr;
|
||||||
|
@ -308,7 +299,6 @@ void SpikeAlign(short SpriteNum)
|
||||||
|
|
||||||
void MoveSpritesWithSpike(short sectnum)
|
void MoveSpritesWithSpike(short sectnum)
|
||||||
{
|
{
|
||||||
SECTORp sectp = §or[sectnum];
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
int cz,fz;
|
int cz,fz;
|
||||||
|
@ -332,9 +322,7 @@ int DoSpike(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
int *lptr;
|
int *lptr;
|
||||||
int amt;
|
|
||||||
|
|
||||||
// zclip = floor or ceiling z
|
// zclip = floor or ceiling z
|
||||||
// oz = original z
|
// oz = original z
|
||||||
|
@ -451,10 +439,7 @@ int DoSpikeAuto(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
int zval;
|
|
||||||
int *lptr;
|
int *lptr;
|
||||||
int amt;
|
|
||||||
|
|
||||||
lptr = &u->zclip;
|
lptr = &u->zclip;
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,6 @@ STATE s_IconFlag[] =
|
||||||
void
|
void
|
||||||
SetOwner(short owner, short child)
|
SetOwner(short owner, short child)
|
||||||
{
|
{
|
||||||
SPRITEp op;
|
|
||||||
SPRITEp cp = &sprite[child];
|
SPRITEp cp = &sprite[child];
|
||||||
|
|
||||||
if (owner == 0)
|
if (owner == 0)
|
||||||
|
@ -600,7 +599,6 @@ SetOwner(short owner, short child)
|
||||||
|
|
||||||
if (owner >= 0)
|
if (owner >= 0)
|
||||||
{
|
{
|
||||||
op = &sprite[owner];
|
|
||||||
ASSERT(User[owner]);
|
ASSERT(User[owner]);
|
||||||
SET(User[owner]->Flags2, SPR2_CHILDREN);
|
SET(User[owner]->Flags2, SPR2_CHILDREN);
|
||||||
}
|
}
|
||||||
|
@ -616,8 +614,6 @@ SetOwner(short owner, short child)
|
||||||
void
|
void
|
||||||
SetAttach(short owner, short child)
|
SetAttach(short owner, short child)
|
||||||
{
|
{
|
||||||
SPRITEp op = &sprite[owner];
|
|
||||||
SPRITEp cp = &sprite[child];
|
|
||||||
USERp cu = User[child];
|
USERp cu = User[child];
|
||||||
|
|
||||||
ASSERT(cu);
|
ASSERT(cu);
|
||||||
|
@ -1063,7 +1059,6 @@ ActorTestSpawn(SPRITEp sp)
|
||||||
if (sp->statnum == STAT_DEFAULT && sp->lotag == TAG_SPAWN_ACTOR)
|
if (sp->statnum == STAT_DEFAULT && sp->lotag == TAG_SPAWN_ACTOR)
|
||||||
{
|
{
|
||||||
short New;
|
short New;
|
||||||
short SpriteNum = sp - sprite;
|
|
||||||
New = COVERinsertsprite(sp->sectnum, STAT_DEFAULT);
|
New = COVERinsertsprite(sp->sectnum, STAT_DEFAULT);
|
||||||
memcpy(&sprite[New], sp, sizeof(SPRITE));
|
memcpy(&sprite[New], sp, sizeof(SPRITE));
|
||||||
change_sprite_stat(New, STAT_SPAWN_TRIGGER);
|
change_sprite_stat(New, STAT_SPAWN_TRIGGER);
|
||||||
|
@ -1599,12 +1594,9 @@ void PreMapCombineFloors(void)
|
||||||
{
|
{
|
||||||
#define MAX_FLOORS 32
|
#define MAX_FLOORS 32
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
int xoff,yoff;
|
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
int16_t SpriteNum, NextSprite;
|
int16_t SpriteNum, NextSprite;
|
||||||
WALLp wp;
|
|
||||||
int base_offset;
|
int base_offset;
|
||||||
PLAYERp pp = &Player[myconnectindex];
|
|
||||||
int dx,dy;
|
int dx,dy;
|
||||||
short sectlist[MAXSECTORS];
|
short sectlist[MAXSECTORS];
|
||||||
short sectlistplc, sectlistend, dasect, startwall, endwall, nextsector;
|
short sectlistplc, sectlistend, dasect, startwall, endwall, nextsector;
|
||||||
|
@ -1808,10 +1800,8 @@ void
|
||||||
SpriteSetup(void)
|
SpriteSetup(void)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
short SpriteNum = 0, NextSprite, ndx;
|
short SpriteNum = 0, NextSprite;
|
||||||
USERp u;
|
USERp u;
|
||||||
TRACK_POINTp tp;
|
|
||||||
TRACKp t;
|
|
||||||
short i, num;
|
short i, num;
|
||||||
int cz,fz;
|
int cz,fz;
|
||||||
|
|
||||||
|
@ -2111,10 +2101,6 @@ SpriteSetup(void)
|
||||||
|
|
||||||
case SECT_FLOOR_PAN:
|
case SECT_FLOOR_PAN:
|
||||||
{
|
{
|
||||||
short i,nexti;
|
|
||||||
SPRITEp ds;
|
|
||||||
int cz,fz;
|
|
||||||
|
|
||||||
// if moves with SO
|
// if moves with SO
|
||||||
if (TEST_BOOL1(sp))
|
if (TEST_BOOL1(sp))
|
||||||
sp->xvel = 0;
|
sp->xvel = 0;
|
||||||
|
@ -2138,7 +2124,6 @@ SpriteSetup(void)
|
||||||
|
|
||||||
case SECT_WALL_PAN_SPEED:
|
case SECT_WALL_PAN_SPEED:
|
||||||
{
|
{
|
||||||
short i, found = FALSE;
|
|
||||||
vec3_t hit_pos = { sp->x, sp->y, sp->z - Z(8) };
|
vec3_t hit_pos = { sp->x, sp->y, sp->z - Z(8) };
|
||||||
hitdata_t hitinfo;
|
hitdata_t hitinfo;
|
||||||
|
|
||||||
|
@ -2388,7 +2373,6 @@ SpriteSetup(void)
|
||||||
case SECT_ROTATOR:
|
case SECT_ROTATOR:
|
||||||
{
|
{
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
SECTORp sectp = §or[sp->sectnum];
|
||||||
SECT_USERp sectu;
|
|
||||||
short time,type;
|
short time,type;
|
||||||
short wallcount,startwall,endwall,w;
|
short wallcount,startwall,endwall,w;
|
||||||
u = SpawnUser(SpriteNum, 0, NULL);
|
u = SpawnUser(SpriteNum, 0, NULL);
|
||||||
|
@ -2452,9 +2436,7 @@ SpriteSetup(void)
|
||||||
case SECT_SLIDOR:
|
case SECT_SLIDOR:
|
||||||
{
|
{
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
SECTORp sectp = §or[sp->sectnum];
|
||||||
SECT_USERp sectu;
|
|
||||||
short time,type;
|
short time,type;
|
||||||
short wallcount,startwall,endwall,w;
|
|
||||||
|
|
||||||
u = SpawnUser(SpriteNum, 0, NULL);
|
u = SpawnUser(SpriteNum, 0, NULL);
|
||||||
|
|
||||||
|
@ -2594,7 +2576,6 @@ SpriteSetup(void)
|
||||||
{
|
{
|
||||||
short w, startwall, endwall;
|
short w, startwall, endwall;
|
||||||
short wallcount;
|
short wallcount;
|
||||||
void *void_ptr;
|
|
||||||
int8_t* wall_shade;
|
int8_t* wall_shade;
|
||||||
USERp u;
|
USERp u;
|
||||||
|
|
||||||
|
@ -2652,7 +2633,6 @@ SpriteSetup(void)
|
||||||
{
|
{
|
||||||
short w, startwall, endwall;
|
short w, startwall, endwall;
|
||||||
short wallcount;
|
short wallcount;
|
||||||
void *void_ptr;
|
|
||||||
int8_t* wall_shade;
|
int8_t* wall_shade;
|
||||||
USERp u;
|
USERp u;
|
||||||
|
|
||||||
|
@ -2783,8 +2763,6 @@ SpriteSetup(void)
|
||||||
|
|
||||||
case SECT_COPY_DEST:
|
case SECT_COPY_DEST:
|
||||||
{
|
{
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
|
|
||||||
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, FALSE, TRUE);
|
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, FALSE, TRUE);
|
||||||
change_sprite_stat(SpriteNum, STAT_COPY_DEST);
|
change_sprite_stat(SpriteNum, STAT_COPY_DEST);
|
||||||
break;
|
break;
|
||||||
|
@ -4173,7 +4151,6 @@ int SpawnItemsMatch(short match)
|
||||||
short SpriteNum;
|
short SpriteNum;
|
||||||
short si, nextsi;
|
short si, nextsi;
|
||||||
SPRITEp sp,sip;
|
SPRITEp sp,sip;
|
||||||
SWBOOL found;
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPAWN_ITEMS],si,nextsi)
|
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPAWN_ITEMS],si,nextsi)
|
||||||
{
|
{
|
||||||
|
@ -4647,7 +4624,6 @@ int
|
||||||
NewStateGroup(short SpriteNum, STATEp StateGroup[])
|
NewStateGroup(short SpriteNum, STATEp StateGroup[])
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
int i;
|
|
||||||
|
|
||||||
//if (Prediction)
|
//if (Prediction)
|
||||||
// return;
|
// return;
|
||||||
|
@ -4721,9 +4697,6 @@ SpriteOverlapZ(int16_t spritenum_a, int16_t spritenum_b, int z_overlap)
|
||||||
{
|
{
|
||||||
SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b];
|
SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b];
|
||||||
|
|
||||||
USERp ua = User[spritenum_a];
|
|
||||||
USERp ub = User[spritenum_b];
|
|
||||||
|
|
||||||
int spa_tos, spa_bos, spb_tos, spb_bos;
|
int spa_tos, spa_bos, spb_tos, spb_bos;
|
||||||
|
|
||||||
spa_tos = SPRITEp_TOS(spa);
|
spa_tos = SPRITEp_TOS(spa);
|
||||||
|
@ -4754,7 +4727,7 @@ getzrangepoint(int x, int y, int z, short sectnum,
|
||||||
int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit)
|
int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit)
|
||||||
{
|
{
|
||||||
spritetype *spr;
|
spritetype *spr;
|
||||||
int i, j, k, l, dax, day, daz, xspan, yspan, xoff, yoff;
|
int j, k, l, dax, day, daz, xspan, yspan, xoff, yoff;
|
||||||
int x1, y1, x2, y2, x3, y3, x4, y4, cosang, sinang, tilenum;
|
int x1, y1, x2, y2, x3, y3, x4, y4, cosang, sinang, tilenum;
|
||||||
short cstat;
|
short cstat;
|
||||||
char clipyou;
|
char clipyou;
|
||||||
|
@ -4923,7 +4896,6 @@ DoActorZrange(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoActorGlobZ(short SpriteNum)
|
DoActorGlobZ(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
u->loz = globloz;
|
u->loz = globloz;
|
||||||
|
@ -4960,7 +4932,6 @@ SWBOOL
|
||||||
ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_height)
|
ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_height)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
int ceilhit, florhit, hiz, loz;
|
int ceilhit, florhit, hiz, loz;
|
||||||
short save_cstat;
|
short save_cstat;
|
||||||
|
|
||||||
|
@ -5008,8 +4979,6 @@ ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_heig
|
||||||
|
|
||||||
case HIT_SECTOR:
|
case HIT_SECTOR:
|
||||||
{
|
{
|
||||||
SECTORp sectp = §or[florhit & 4095];
|
|
||||||
|
|
||||||
if (labs(loz - z) <= min_height)
|
if (labs(loz - z) <= min_height)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -5069,7 +5038,7 @@ move_actor(short SpriteNum, int xchange, int ychange, int zchange)
|
||||||
int x, y, z, loz, hiz;
|
int x, y, z, loz, hiz;
|
||||||
SPRITEp lo_sp, hi_sp;
|
SPRITEp lo_sp, hi_sp;
|
||||||
SECTORp lo_sectp, hi_sectp;
|
SECTORp lo_sectp, hi_sectp;
|
||||||
short sectnum,sect;
|
short sectnum;
|
||||||
short dist;
|
short dist;
|
||||||
int cliptype = CLIPMASK_ACTOR;
|
int cliptype = CLIPMASK_ACTOR;
|
||||||
|
|
||||||
|
@ -5171,7 +5140,6 @@ int
|
||||||
DoGrating(short SpriteNum)
|
DoGrating(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
int16_t x, y;
|
|
||||||
int dir;
|
int dir;
|
||||||
#define GRATE_FACTOR 3
|
#define GRATE_FACTOR 3
|
||||||
|
|
||||||
|
@ -5280,7 +5248,6 @@ SpearOnCeiling(short SpriteNum)
|
||||||
int
|
int
|
||||||
DoKey(short SpriteNum)
|
DoKey(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
sp->ang = NORM_ANGLE(sp->ang + (14 * ACTORMOVETICS));
|
sp->ang = NORM_ANGLE(sp->ang + (14 * ACTORMOVETICS));
|
||||||
|
@ -5295,7 +5262,6 @@ int
|
||||||
DoCoin(short SpriteNum)
|
DoCoin(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
int offset;
|
int offset;
|
||||||
|
|
||||||
u->WaitTics -= ACTORMOVETICS * 2;
|
u->WaitTics -= ACTORMOVETICS * 2;
|
||||||
|
@ -5489,7 +5455,6 @@ DoSpawnItemTeleporterEffect(SPRITEp sp)
|
||||||
{
|
{
|
||||||
extern STATE s_TeleportEffect[];
|
extern STATE s_TeleportEffect[];
|
||||||
short effect;
|
short effect;
|
||||||
USERp eu;
|
|
||||||
SPRITEp ep;
|
SPRITEp ep;
|
||||||
|
|
||||||
effect = SpawnSprite(STAT_MISSILE, 0, s_TeleportEffect, sp->sectnum,
|
effect = SpawnSprite(STAT_MISSILE, 0, s_TeleportEffect, sp->sectnum,
|
||||||
|
@ -5497,7 +5462,6 @@ DoSpawnItemTeleporterEffect(SPRITEp sp)
|
||||||
sp->ang, 0);
|
sp->ang, 0);
|
||||||
|
|
||||||
ep = &sprite[effect];
|
ep = &sprite[effect];
|
||||||
eu = User[effect];
|
|
||||||
|
|
||||||
ep->shade = -40;
|
ep->shade = -40;
|
||||||
ep->xrepeat = ep->yrepeat = 36;
|
ep->xrepeat = ep->yrepeat = 36;
|
||||||
|
@ -5519,8 +5483,7 @@ void ChoosePlayerGetSound(PLAYERp pp)
|
||||||
|
|
||||||
SWBOOL CanGetWeapon(PLAYERp pp, short SpriteNum, int WPN)
|
SWBOOL CanGetWeapon(PLAYERp pp, short SpriteNum, int WPN)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum], pu;
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
switch (gNet.MultiGameType)
|
switch (gNet.MultiGameType)
|
||||||
{
|
{
|
||||||
|
@ -6489,7 +6452,6 @@ void
|
||||||
SetEnemyActive(short SpriteNum)
|
SetEnemyActive(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
|
|
||||||
SET(u->Flags, SPR_ACTIVE);
|
SET(u->Flags, SPR_ACTIVE);
|
||||||
u->inactive_time = 0;
|
u->inactive_time = 0;
|
||||||
|
@ -6499,7 +6461,6 @@ void
|
||||||
SetEnemyInactive(short SpriteNum)
|
SetEnemyInactive(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
|
|
||||||
RESET(u->Flags, SPR_ACTIVE);
|
RESET(u->Flags, SPR_ACTIVE);
|
||||||
}
|
}
|
||||||
|
@ -6511,7 +6472,6 @@ void
|
||||||
ProcessActiveVars(short SpriteNum)
|
ProcessActiveVars(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
#define TIME_TILL_INACTIVE (4*120)
|
#define TIME_TILL_INACTIVE (4*120)
|
||||||
|
|
||||||
if (!TEST(u->Flags, SPR_ACTIVE))
|
if (!TEST(u->Flags, SPR_ACTIVE))
|
||||||
|
@ -7241,7 +7201,6 @@ int
|
||||||
MissileWaterAdjust(short SpriteNum)
|
MissileWaterAdjust(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
|
|
||||||
if (u->lo_sectp)
|
if (u->lo_sectp)
|
||||||
{
|
{
|
||||||
|
@ -7417,8 +7376,8 @@ int
|
||||||
move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||||
{
|
{
|
||||||
int daz;
|
int daz;
|
||||||
int retval=0, zh;
|
int retval=0;
|
||||||
short dasectnum, tempshort;
|
short dasectnum;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u = User[spritenum];
|
USERp u = User[spritenum];
|
||||||
short lastsectnum;
|
short lastsectnum;
|
||||||
|
@ -7433,7 +7392,6 @@ move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int
|
||||||
dasectnum = lastsectnum = sp->sectnum;
|
dasectnum = lastsectnum = sp->sectnum;
|
||||||
|
|
||||||
daz = sp->z;
|
daz = sp->z;
|
||||||
zh = 0;
|
|
||||||
|
|
||||||
// climbing a wall
|
// climbing a wall
|
||||||
if (u->z_tgt)
|
if (u->z_tgt)
|
||||||
|
|
|
@ -683,7 +683,6 @@ SetupSumo(short SpriteNum)
|
||||||
int NullSumo(short SpriteNum)
|
int NullSumo(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
//if (TEST(u->Flags,SPR_SLIDING))
|
//if (TEST(u->Flags,SPR_SLIDING))
|
||||||
//DoActorSlide(SpriteNum);
|
//DoActorSlide(SpriteNum);
|
||||||
|
@ -698,7 +697,6 @@ int NullSumo(short SpriteNum)
|
||||||
|
|
||||||
int DoSumoMove(short SpriteNum)
|
int DoSumoMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
//if (TEST(u->Flags,SPR_SLIDING))
|
//if (TEST(u->Flags,SPR_SLIDING))
|
||||||
|
@ -751,7 +749,6 @@ int DoSumoRumble(short SpriteNum)
|
||||||
int InitSumoFart(short SpriteNum)
|
int InitSumoFart(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
extern int InitSumoNapalm(short SpriteNum);
|
extern int InitSumoNapalm(short SpriteNum);
|
||||||
|
|
||||||
PlaySound(DIGI_SUMOFART, sp, v3df_follow);
|
PlaySound(DIGI_SUMOFART, sp, v3df_follow);
|
||||||
|
@ -767,7 +764,6 @@ int InitSumoFart(short SpriteNum)
|
||||||
int InitSumoStomp(short SpriteNum)
|
int InitSumoStomp(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
extern int InitSumoStompAttack(short SpriteNum);
|
extern int InitSumoStompAttack(short SpriteNum);
|
||||||
|
|
||||||
PlaySound(DIGI_SUMOSTOMP, sp, v3df_none);
|
PlaySound(DIGI_SUMOSTOMP, sp, v3df_none);
|
||||||
|
@ -822,7 +818,6 @@ BossHealthMeter(void)
|
||||||
PLAYERp pp = Player + myconnectindex;
|
PLAYERp pp = Player + myconnectindex;
|
||||||
short color=0,i=0,nexti,metertics,meterunit;
|
short color=0,i=0,nexti,metertics,meterunit;
|
||||||
int y;
|
int y;
|
||||||
extern char buffer[];
|
|
||||||
extern SWBOOL NoMeters;
|
extern SWBOOL NoMeters;
|
||||||
short health;
|
short health;
|
||||||
SWBOOL bosswasseen;
|
SWBOOL bosswasseen;
|
||||||
|
|
|
@ -66,7 +66,7 @@ void initsynccrc(void)
|
||||||
uint8_t
|
uint8_t
|
||||||
PlayerSync(void)
|
PlayerSync(void)
|
||||||
{
|
{
|
||||||
short i, j;
|
short i;
|
||||||
unsigned short crc = 0;
|
unsigned short crc = 0;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ PlayerSync(void)
|
||||||
uint8_t
|
uint8_t
|
||||||
PlayerSync2(void)
|
PlayerSync2(void)
|
||||||
{
|
{
|
||||||
short i, j;
|
short i;
|
||||||
unsigned short crc = 0;
|
unsigned short crc = 0;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
|
|
||||||
|
@ -315,7 +315,6 @@ getsyncstat(void)
|
||||||
PLAYERp pp = Player + myconnectindex;
|
PLAYERp pp = Player + myconnectindex;
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
static unsigned int count;
|
static unsigned int count;
|
||||||
extern int syncvaltail, syncvaltottail;
|
|
||||||
|
|
||||||
if (!CommEnabled)
|
if (!CommEnabled)
|
||||||
return;
|
return;
|
||||||
|
@ -344,7 +343,7 @@ getsyncstat(void)
|
||||||
void
|
void
|
||||||
SyncStatMessage(void)
|
SyncStatMessage(void)
|
||||||
{
|
{
|
||||||
int i, j, count = 0;
|
int i, j;
|
||||||
static unsigned int MoveCount = 0;
|
static unsigned int MoveCount = 0;
|
||||||
extern unsigned int MoveThingsCount;
|
extern unsigned int MoveThingsCount;
|
||||||
|
|
||||||
|
@ -419,7 +418,7 @@ void
|
||||||
GetSyncInfoFromPacket(uint8_t *packbuf, int packbufleng, int *j, int otherconnectindex)
|
GetSyncInfoFromPacket(uint8_t *packbuf, int packbufleng, int *j, int otherconnectindex)
|
||||||
{
|
{
|
||||||
int sb, i;
|
int sb, i;
|
||||||
extern int syncvaltail, syncvaltottail;
|
extern int syncvaltottail;
|
||||||
PLAYERp ppo = &Player[otherconnectindex];
|
PLAYERp ppo = &Player[otherconnectindex];
|
||||||
SWBOOL found = FALSE;
|
SWBOOL found = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ void DisplaySummaryString(PLAYERp pp, short xs, short ys, short color, short sha
|
||||||
|
|
||||||
PANEL_SPRITEp pClearTextLineID(PLAYERp pp, short id, int y, short pri)
|
PANEL_SPRITEp pClearTextLineID(PLAYERp pp, short id, int y, short pri)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp nsp=NULL;
|
|
||||||
PANEL_SPRITEp psp=NULL, next;
|
PANEL_SPRITEp psp=NULL, next;
|
||||||
|
|
||||||
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
||||||
|
@ -110,7 +109,6 @@ PANEL_SPRITEp pClearTextLineID(PLAYERp pp, short id, int y, short pri)
|
||||||
// only call this from menu code - it does a pKillSprite
|
// only call this from menu code - it does a pKillSprite
|
||||||
PANEL_SPRITEp pMenuClearTextLineID(PLAYERp pp, short id, int y, short pri)
|
PANEL_SPRITEp pMenuClearTextLineID(PLAYERp pp, short id, int y, short pri)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp nsp=NULL;
|
|
||||||
PANEL_SPRITEp psp=NULL, next;
|
PANEL_SPRITEp psp=NULL, next;
|
||||||
|
|
||||||
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
||||||
|
@ -153,7 +151,6 @@ void PutStringTimer(PLAYERp pp, short x, short y, const char *string, short seco
|
||||||
int ndx, offset;
|
int ndx, offset;
|
||||||
char c;
|
char c;
|
||||||
PANEL_SPRITEp nsp;
|
PANEL_SPRITEp nsp;
|
||||||
extern unsigned short xlatfont[];
|
|
||||||
long kill_tics;
|
long kill_tics;
|
||||||
short id, ac;
|
short id, ac;
|
||||||
PANEL_SPRITE_FUNCp func;
|
PANEL_SPRITE_FUNCp func;
|
||||||
|
@ -202,7 +199,6 @@ void KillString(PLAYERp pp, short y)
|
||||||
|
|
||||||
PANEL_SPRITEp pClearSpriteXY(PLAYERp pp, short x, short y)
|
PANEL_SPRITEp pClearSpriteXY(PLAYERp pp, short x, short y)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp nsp=NULL;
|
|
||||||
PANEL_SPRITEp psp=NULL, next;
|
PANEL_SPRITEp psp=NULL, next;
|
||||||
|
|
||||||
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
||||||
|
@ -216,7 +212,6 @@ PANEL_SPRITEp pClearSpriteXY(PLAYERp pp, short x, short y)
|
||||||
|
|
||||||
PANEL_SPRITEp pClearSpriteID(PLAYERp pp, short id)
|
PANEL_SPRITEp pClearSpriteID(PLAYERp pp, short id)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp nsp=NULL;
|
|
||||||
PANEL_SPRITEp psp=NULL, next;
|
PANEL_SPRITEp psp=NULL, next;
|
||||||
|
|
||||||
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
||||||
|
@ -283,7 +278,6 @@ void DisplayMiniBarSmString(PLAYERp pp, short xs, short ys, short pal, const cha
|
||||||
{
|
{
|
||||||
short size=4,x;
|
short size=4,x;
|
||||||
const char *ptr;
|
const char *ptr;
|
||||||
PANEL_SPRITEp nsp;
|
|
||||||
short pic;
|
short pic;
|
||||||
|
|
||||||
#define FRAG_FIRST_ASCII ('!') //exclamation point
|
#define FRAG_FIRST_ASCII ('!') //exclamation point
|
||||||
|
@ -361,8 +355,7 @@ void DisplayFragString(PLAYERp pp, short xs, short ys, const char *buffer)
|
||||||
void DisplayFragNumbers(PLAYERp pp)
|
void DisplayFragNumbers(PLAYERp pp)
|
||||||
{
|
{
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
char *ptr;
|
short xs, ys;
|
||||||
short x, xs, ys, size;
|
|
||||||
short frag_bar;
|
short frag_bar;
|
||||||
short pnum = pp - Player;
|
short pnum = pp - Player;
|
||||||
|
|
||||||
|
@ -399,8 +392,7 @@ void DisplayFragNumbers(PLAYERp pp)
|
||||||
|
|
||||||
void DisplayFragNames(PLAYERp pp)
|
void DisplayFragNames(PLAYERp pp)
|
||||||
{
|
{
|
||||||
char *ptr;
|
short xs, ys;
|
||||||
short x, xs, ys, size;
|
|
||||||
short frag_bar;
|
short frag_bar;
|
||||||
short pnum = pp - Player;
|
short pnum = pp - Player;
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,6 @@ TrackTowardPlayer(SPRITEp sp, TRACKp t, TRACK_POINTp start_point)
|
||||||
short
|
short
|
||||||
TrackStartCloserThanEnd(short SpriteNum, TRACKp t, TRACK_POINTp start_point)
|
TrackStartCloserThanEnd(short SpriteNum, TRACKp t, TRACK_POINTp start_point)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
SPRITEp sp = User[SpriteNum]->SpriteP;
|
||||||
|
|
||||||
TRACK_POINTp end_point;
|
TRACK_POINTp end_point;
|
||||||
|
@ -598,8 +597,6 @@ TrackSetup(void)
|
||||||
short SpriteNum = 0, NextSprite, ndx;
|
short SpriteNum = 0, NextSprite, ndx;
|
||||||
TRACK_POINTp tp;
|
TRACK_POINTp tp;
|
||||||
TRACKp t;
|
TRACKp t;
|
||||||
SPRITEp nsp;
|
|
||||||
short new_sprite1, new_sprite2;
|
|
||||||
TRACK_POINTp New;
|
TRACK_POINTp New;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
|
@ -729,7 +726,7 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
|
||||||
short sp_num, next_sp_num, startwall, endwall;
|
short sp_num, next_sp_num, startwall, endwall;
|
||||||
int i, k, j;
|
int i, k, j;
|
||||||
SPRITEp BoundSprite;
|
SPRITEp BoundSprite;
|
||||||
SWBOOL FoundOutsideLoop = FALSE, FoundSector = FALSE;
|
SWBOOL FoundOutsideLoop = FALSE;
|
||||||
SWBOOL SectorInBounds;
|
SWBOOL SectorInBounds;
|
||||||
SECTORp *sectp;
|
SECTORp *sectp;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
|
@ -1037,9 +1034,8 @@ SetupSectorObject(short sectnum, short tag)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
short object_num, ndx = 0, startwall, endwall, SpriteNum, NextSprite;
|
short object_num, SpriteNum, NextSprite;
|
||||||
int trash;
|
short j;
|
||||||
short j, k;
|
|
||||||
short New;
|
short New;
|
||||||
USERp u;
|
USERp u;
|
||||||
|
|
||||||
|
@ -1475,7 +1471,6 @@ PlaceSectorObjectsOnTracks(void)
|
||||||
int low_dist = 999999, dist;
|
int low_dist = 999999, dist;
|
||||||
SECTOR_OBJECTp sop = &SectorObject[i];
|
SECTOR_OBJECTp sop = &SectorObject[i];
|
||||||
TRACK_POINTp tpoint = NULL;
|
TRACK_POINTp tpoint = NULL;
|
||||||
short spnum, next_spnum;
|
|
||||||
|
|
||||||
if (sop->xmid == INT32_MAX)
|
if (sop->xmid == INT32_MAX)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1544,7 +1539,7 @@ PlaceSectorObjectsOnTracks(void)
|
||||||
void
|
void
|
||||||
PlaceActorsOnTracks(void)
|
PlaceActorsOnTracks(void)
|
||||||
{
|
{
|
||||||
short i, nexti, j, tag, htag, new_ang;
|
short i, nexti, j, tag;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u;
|
USERp u;
|
||||||
TRACK_POINTp tpoint = NULL;
|
TRACK_POINTp tpoint = NULL;
|
||||||
|
@ -1558,7 +1553,6 @@ PlaceActorsOnTracks(void)
|
||||||
u = User[i];
|
u = User[i];
|
||||||
|
|
||||||
tag = LOW_TAG_SPRITE(i);
|
tag = LOW_TAG_SPRITE(i);
|
||||||
htag = HIGH_TAG_SPRITE(i);
|
|
||||||
|
|
||||||
if (tag < TAG_ACTOR_TRACK_BEGIN || tag > TAG_ACTOR_TRACK_END)
|
if (tag < TAG_ACTOR_TRACK_BEGIN || tag > TAG_ACTOR_TRACK_END)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1688,15 +1682,15 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
||||||
void
|
void
|
||||||
MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
|
MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
|
||||||
{
|
{
|
||||||
int j, k, c;
|
int j, k;
|
||||||
vec2_t rxy;
|
vec2_t rxy;
|
||||||
short startwall, endwall, save_ang, pnum;
|
short startwall, endwall, pnum;
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
SECTORp *sectp;
|
SECTORp *sectp;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
WALLp wp;
|
WALLp wp;
|
||||||
USERp u;
|
USERp u;
|
||||||
short i, nexti, rot_ang;
|
short i, rot_ang;
|
||||||
SWBOOL PlayerMove = TRUE;
|
SWBOOL PlayerMove = TRUE;
|
||||||
|
|
||||||
if (sop->xmid >= MAXSO)
|
if (sop->xmid >= MAXSO)
|
||||||
|
@ -1948,7 +1942,6 @@ void RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, SWBOOL dynamic)
|
||||||
SECTORp *sectp;
|
SECTORp *sectp;
|
||||||
WALLp wp;
|
WALLp wp;
|
||||||
short ang;
|
short ang;
|
||||||
short new_ang;
|
|
||||||
int dx,dy,x,y;
|
int dx,dy,x,y;
|
||||||
|
|
||||||
// do scaling
|
// do scaling
|
||||||
|
@ -2058,13 +2051,11 @@ void KillSectorObjectSprites(SECTOR_OBJECTp sop)
|
||||||
void UpdateSectorObjectSprites(SECTOR_OBJECTp sop)
|
void UpdateSectorObjectSprites(SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; sop->sp_num[i] != -1; i++)
|
for (i = 0; sop->sp_num[i] != -1; i++)
|
||||||
{
|
{
|
||||||
sp = &sprite[sop->sp_num[i]];
|
sp = &sprite[sop->sp_num[i]];
|
||||||
u = User[sop->sp_num[i]];
|
|
||||||
|
|
||||||
setspritez(sop->sp_num[i], (vec3_t *)sp);
|
setspritez(sop->sp_num[i], (vec3_t *)sp);
|
||||||
}
|
}
|
||||||
|
@ -2183,9 +2174,6 @@ MoveZ(SECTOR_OBJECTp sop)
|
||||||
|
|
||||||
if (sop->bob_amt)
|
if (sop->bob_amt)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
|
||||||
USERp u;
|
|
||||||
|
|
||||||
sop->bob_sine_ndx = (totalsynctics << sop->bob_speed) & 2047;
|
sop->bob_sine_ndx = (totalsynctics << sop->bob_speed) & 2047;
|
||||||
sop->bob_diff = ((sop->bob_amt * (int) sintable[sop->bob_sine_ndx]) >> 14);
|
sop->bob_diff = ((sop->bob_amt * (int) sintable[sop->bob_sine_ndx]) >> 14);
|
||||||
|
|
||||||
|
@ -2235,7 +2223,6 @@ MoveZ(SECTOR_OBJECTp sop)
|
||||||
void CallbackSOsink(ANIMp ap, void *data)
|
void CallbackSOsink(ANIMp ap, void *data)
|
||||||
{
|
{
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
SECTORp *sectp;
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u;
|
USERp u;
|
||||||
SECT_USERp su;
|
SECT_USERp su;
|
||||||
|
@ -2354,14 +2341,9 @@ void CallbackSOsink(ANIMp ap, void *data)
|
||||||
void
|
void
|
||||||
MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
|
MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
|
||||||
{
|
{
|
||||||
int j, k, c, nx, ny, nz, rx, ry, dx, dy, dz;
|
int nx, ny;
|
||||||
short speed;
|
short speed;
|
||||||
int dist;
|
|
||||||
short startwall, endwall;
|
|
||||||
short delta_ang;
|
short delta_ang;
|
||||||
short pnum;
|
|
||||||
PLAYERp pp;
|
|
||||||
short sp, next_sp;
|
|
||||||
|
|
||||||
if (sop->track >= SO_OPERATE_TRACK_START)
|
if (sop->track >= SO_OPERATE_TRACK_START)
|
||||||
{
|
{
|
||||||
|
@ -2606,7 +2588,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
|
||||||
{
|
{
|
||||||
// for lowering the whirlpool in level 1
|
// for lowering the whirlpool in level 1
|
||||||
SECTORp *sectp;
|
SECTORp *sectp;
|
||||||
short i,ndx;
|
short i;
|
||||||
SECT_USERp sectu;
|
SECT_USERp sectu;
|
||||||
|
|
||||||
for (i = 0, sectp = &sop->sectp[0]; *sectp; sectp++, i++)
|
for (i = 0, sectp = &sop->sectp[0]; *sectp; sectp++, i++)
|
||||||
|
@ -2785,9 +2767,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
|
||||||
void
|
void
|
||||||
OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy)
|
OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy)
|
||||||
{
|
{
|
||||||
int i, nx, ny;
|
int i;
|
||||||
short speed;
|
|
||||||
short delta_ang;
|
|
||||||
SECTORp *sectp;
|
SECTORp *sectp;
|
||||||
|
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
|
@ -2811,18 +2791,11 @@ OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nx = 0;
|
|
||||||
ny = 0;
|
|
||||||
GlobSpeedSO = 0;
|
GlobSpeedSO = 0;
|
||||||
|
|
||||||
delta_ang = 0;
|
|
||||||
|
|
||||||
//sop->ang_tgt = newang;
|
//sop->ang_tgt = newang;
|
||||||
sop->ang_moving = newang;
|
sop->ang_moving = newang;
|
||||||
|
|
||||||
// get delta to target angle
|
|
||||||
delta_ang = GetDeltaAngle(sop->ang_tgt, sop->ang);
|
|
||||||
|
|
||||||
sop->spin_ang = 0;
|
sop->spin_ang = 0;
|
||||||
sop->ang = newang;
|
sop->ang = newang;
|
||||||
|
|
||||||
|
@ -2882,10 +2855,6 @@ void VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator)
|
||||||
void
|
void
|
||||||
KillSectorObject(SECTOR_OBJECTp sop)
|
KillSectorObject(SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
int nx, ny, nz;
|
|
||||||
short speed;
|
|
||||||
short delta_ang;
|
|
||||||
SECTORp *sectp;
|
|
||||||
int newx = MAXSO;
|
int newx = MAXSO;
|
||||||
int newy = MAXSO;
|
int newy = MAXSO;
|
||||||
short newang = 0;
|
short newang = 0;
|
||||||
|
@ -2893,15 +2862,8 @@ KillSectorObject(SECTOR_OBJECTp sop)
|
||||||
if (sop->track < SO_OPERATE_TRACK_START)
|
if (sop->track < SO_OPERATE_TRACK_START)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nx = 0;
|
|
||||||
ny = 0;
|
|
||||||
delta_ang = 0;
|
|
||||||
|
|
||||||
sop->ang_tgt = sop->ang_moving = newang;
|
sop->ang_tgt = sop->ang_moving = newang;
|
||||||
|
|
||||||
// get delta to target angle
|
|
||||||
delta_ang = GetDeltaAngle(sop->ang_tgt, sop->ang);
|
|
||||||
|
|
||||||
sop->spin_ang = 0;
|
sop->spin_ang = 0;
|
||||||
sop->ang = sop->ang_tgt;
|
sop->ang = sop->ang_tgt;
|
||||||
|
|
||||||
|
@ -2944,8 +2906,6 @@ void TornadoSpin(SECTOR_OBJECTp sop)
|
||||||
void
|
void
|
||||||
DoTornadoObject(SECTOR_OBJECTp sop)
|
DoTornadoObject(SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
short delta_ang;
|
|
||||||
SECTORp *sectp;
|
|
||||||
int xvect,yvect;
|
int xvect,yvect;
|
||||||
short cursect;
|
short cursect;
|
||||||
// this made them move together more or less - cool!
|
// this made them move together more or less - cool!
|
||||||
|
@ -2982,10 +2942,8 @@ DoAutoTurretObject(SECTOR_OBJECTp sop)
|
||||||
short SpriteNum = sop->sp_child - sprite;
|
short SpriteNum = sop->sp_child - sprite;
|
||||||
SPRITEp shootp;
|
SPRITEp shootp;
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
short new_ang;
|
|
||||||
short delta_ang;
|
short delta_ang;
|
||||||
int diff;
|
int diff;
|
||||||
int dist;
|
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
if ((sop->max_damage != -9999 && sop->max_damage <= 0) || !u)
|
if ((sop->max_damage != -9999 && sop->max_damage <= 0) || !u)
|
||||||
|
@ -3140,7 +3098,6 @@ void
|
||||||
ActorLeaveTrack(short SpriteNum)
|
ActorLeaveTrack(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (u->track == -1)
|
if (u->track == -1)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -148,7 +148,6 @@ void SetVatorInactive(short SpriteNum)
|
||||||
// called for operation from the space bar
|
// called for operation from the space bar
|
||||||
short DoVatorOperate(PLAYERp pp, short sectnum)
|
short DoVatorOperate(PLAYERp pp, short sectnum)
|
||||||
{
|
{
|
||||||
USERp fu;
|
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short match;
|
short match;
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
@ -159,8 +158,6 @@ short DoVatorOperate(PLAYERp pp, short sectnum)
|
||||||
|
|
||||||
if (fsp->statnum == STAT_VATOR && SP_TAG1(fsp) == SECT_VATOR && SP_TAG3(fsp) == 0)
|
if (fsp->statnum == STAT_VATOR && SP_TAG1(fsp) == SECT_VATOR && SP_TAG3(fsp) == 0)
|
||||||
{
|
{
|
||||||
fu = User[i];
|
|
||||||
|
|
||||||
sectnum = fsp->sectnum;
|
sectnum = fsp->sectnum;
|
||||||
|
|
||||||
// single play only vator
|
// single play only vator
|
||||||
|
@ -295,7 +292,6 @@ TestVatorMatchActive(short match)
|
||||||
{
|
{
|
||||||
USERp fu;
|
USERp fu;
|
||||||
SPRITEp fsp;
|
SPRITEp fsp;
|
||||||
short sectnum;
|
|
||||||
|
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
|
|
||||||
|
@ -346,7 +342,6 @@ void InterpSectorSprites(short sectnum, SWBOOL state)
|
||||||
|
|
||||||
void MoveSpritesWithSector(short sectnum, int z_amt, SWBOOL type)
|
void MoveSpritesWithSector(short sectnum, int z_amt, SWBOOL type)
|
||||||
{
|
{
|
||||||
SECTORp sectp = §or[sectnum];
|
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
SWBOOL both = FALSE;
|
SWBOOL both = FALSE;
|
||||||
|
@ -415,8 +410,6 @@ cont:
|
||||||
int DoVatorMove(short SpriteNum, int *lptr)
|
int DoVatorMove(short SpriteNum, int *lptr)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
|
||||||
int zval;
|
int zval;
|
||||||
int move_amt;
|
int move_amt;
|
||||||
|
|
||||||
|
@ -597,13 +590,10 @@ int DoVator(short SpriteNum)
|
||||||
{
|
{
|
||||||
int i,nexti;
|
int i,nexti;
|
||||||
SPRITEp bsp;
|
SPRITEp bsp;
|
||||||
USERp bu;
|
|
||||||
SWBOOL found = FALSE;
|
|
||||||
|
|
||||||
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
|
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
|
||||||
{
|
{
|
||||||
bsp = &sprite[i];
|
bsp = &sprite[i];
|
||||||
bu = User[i];
|
|
||||||
|
|
||||||
if (bsp->statnum == STAT_ENEMY)
|
if (bsp->statnum == STAT_ENEMY)
|
||||||
{
|
{
|
||||||
|
@ -629,7 +619,6 @@ int DoVatorAuto(short SpriteNum)
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = u->SpriteP;
|
SPRITEp sp = u->SpriteP;
|
||||||
SECTORp sectp = §or[sp->sectnum];
|
SECTORp sectp = §or[sp->sectnum];
|
||||||
int zval;
|
|
||||||
int *lptr;
|
int *lptr;
|
||||||
int amt;
|
int amt;
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -756,7 +756,6 @@ SetupZombie(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
short pic = sp->picnum;
|
|
||||||
|
|
||||||
u->Health = 100;
|
u->Health = 100;
|
||||||
u->StateEnd = &s_ZombiePain[0][0];
|
u->StateEnd = &s_ZombiePain[0][0];
|
||||||
|
@ -779,9 +778,9 @@ SetupZombie(short SpriteNum)
|
||||||
int
|
int
|
||||||
SpawnZombie(PLAYERp pp, short Weapon)
|
SpawnZombie(PLAYERp pp, short Weapon)
|
||||||
{
|
{
|
||||||
short New,i,nexti;
|
short New;
|
||||||
SPRITEp np,sp;
|
SPRITEp np;
|
||||||
USERp nu,u;
|
USERp nu;
|
||||||
short owner;
|
short owner;
|
||||||
|
|
||||||
owner = sprite[Weapon].owner;
|
owner = sprite[Weapon].owner;
|
||||||
|
@ -823,8 +822,7 @@ int
|
||||||
SpawnZombie2(short Weapon)
|
SpawnZombie2(short Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &sprite[Weapon];
|
||||||
USERp u = User[Weapon];
|
short New;
|
||||||
short New,i,nexti;
|
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short owner;
|
short owner;
|
||||||
|
@ -887,7 +885,6 @@ int
|
||||||
DoZombieMove(short SpriteNum)
|
DoZombieMove(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (u->Counter3++ >= ZOMBIE_TIME_LIMIT)
|
if (u->Counter3++ >= ZOMBIE_TIME_LIMIT)
|
||||||
{
|
{
|
||||||
|
@ -938,7 +935,6 @@ int
|
||||||
NullZombie(short SpriteNum)
|
NullZombie(short SpriteNum)
|
||||||
{
|
{
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP;
|
|
||||||
|
|
||||||
if (u->Counter3++ >= ZOMBIE_TIME_LIMIT)
|
if (u->Counter3++ >= ZOMBIE_TIME_LIMIT)
|
||||||
{
|
{
|
||||||
|
@ -969,7 +965,6 @@ NullZombie(short SpriteNum)
|
||||||
|
|
||||||
int DoZombiePain(short SpriteNum)
|
int DoZombiePain(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
|
|
||||||
NullZombie(SpriteNum);
|
NullZombie(SpriteNum);
|
||||||
|
|
Loading…
Reference in a new issue