mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 12:10:41 +00:00
SW: "new" --> "New"
git-svn-id: https://svn.eduke32.com/eduke32@6048 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4fe09ad530
commit
3adfd6a4bd
14 changed files with 414 additions and 414 deletions
|
@ -1180,7 +1180,7 @@ void BunnyHatch(short Weapon)
|
||||||
SPRITEp wp = &sprite[Weapon];
|
SPRITEp wp = &sprite[Weapon];
|
||||||
USERp wu = User[Weapon];
|
USERp wu = User[Weapon];
|
||||||
|
|
||||||
short new,i;
|
short New,i;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
#define MAX_BUNNYS 1
|
#define MAX_BUNNYS 1
|
||||||
|
@ -1190,8 +1190,8 @@ void BunnyHatch(short Weapon)
|
||||||
|
|
||||||
for (i = 0; i < MAX_BUNNYS; i++)
|
for (i = 0; i < MAX_BUNNYS; i++)
|
||||||
{
|
{
|
||||||
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
memset(np,0,sizeof(SPRITE));
|
memset(np,0,sizeof(SPRITE));
|
||||||
np->sectnum = wp->sectnum;
|
np->sectnum = wp->sectnum;
|
||||||
np->statnum = STAT_DEFAULT;
|
np->statnum = STAT_DEFAULT;
|
||||||
|
@ -1203,8 +1203,8 @@ void BunnyHatch(short Weapon)
|
||||||
np->yrepeat = 24;
|
np->yrepeat = 24;
|
||||||
np->ang = rip_ang[i];
|
np->ang = rip_ang[i];
|
||||||
np->pal = 0;
|
np->pal = 0;
|
||||||
SetupBunny(new);
|
SetupBunny(New);
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
np->shade = wp->shade;
|
np->shade = wp->shade;
|
||||||
|
|
||||||
// make immediately active
|
// make immediately active
|
||||||
|
@ -1223,21 +1223,21 @@ void BunnyHatch(short Weapon)
|
||||||
// Blood fountains
|
// Blood fountains
|
||||||
InitBloodSpray(Weapon,TRUE,-1);
|
InitBloodSpray(Weapon,TRUE,-1);
|
||||||
|
|
||||||
if (SpawnShrap(Weapon, new))
|
if (SpawnShrap(Weapon, New))
|
||||||
{
|
{
|
||||||
SetSuicide(Weapon);
|
SetSuicide(Weapon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DoActorDie(Weapon, new);
|
DoActorDie(Weapon, New);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nu->ShellNum = 0; // Not Pregnant right now
|
nu->ShellNum = 0; // Not Pregnant right now
|
||||||
|
|
||||||
NewStateGroup(new, nu->ActorActionSet->Jump);
|
NewStateGroup(New, nu->ActorActionSet->Jump);
|
||||||
nu->ActorActionFunc = DoActorMoveJump;
|
nu->ActorActionFunc = DoActorMoveJump;
|
||||||
DoActorSetSpeed(new, FAST_SPEED);
|
DoActorSetSpeed(New, FAST_SPEED);
|
||||||
PickJumpMaxSpeed(new, -600);
|
PickJumpMaxSpeed(New, -600);
|
||||||
|
|
||||||
SET(nu->Flags, SPR_JUMPING);
|
SET(nu->Flags, SPR_JUMPING);
|
||||||
RESET(nu->Flags, SPR_FALLING);
|
RESET(nu->Flags, SPR_FALLING);
|
||||||
|
@ -1245,9 +1245,9 @@ void BunnyHatch(short Weapon)
|
||||||
nu->jump_grav = 8;
|
nu->jump_grav = 8;
|
||||||
|
|
||||||
// if I didn't do this here they get stuck in the air sometimes
|
// if I didn't do this here they get stuck in the air sometimes
|
||||||
DoActorZrange(new);
|
DoActorZrange(New);
|
||||||
|
|
||||||
DoActorJump(new);
|
DoActorJump(New);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1256,12 +1256,12 @@ int BunnyHatch2(short Weapon)
|
||||||
SPRITEp wp = &sprite[Weapon];
|
SPRITEp wp = &sprite[Weapon];
|
||||||
USERp wu = User[Weapon];
|
USERp wu = User[Weapon];
|
||||||
|
|
||||||
short new,i;
|
short New,i;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
|
|
||||||
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
memset(np,0,sizeof(SPRITE));
|
memset(np,0,sizeof(SPRITE));
|
||||||
np->sectnum = wp->sectnum;
|
np->sectnum = wp->sectnum;
|
||||||
np->statnum = STAT_DEFAULT;
|
np->statnum = STAT_DEFAULT;
|
||||||
|
@ -1273,8 +1273,8 @@ int BunnyHatch2(short Weapon)
|
||||||
np->yrepeat = 24;
|
np->yrepeat = 24;
|
||||||
np->ang = RANDOM_P2(2048);
|
np->ang = RANDOM_P2(2048);
|
||||||
np->pal = 0;
|
np->pal = 0;
|
||||||
SetupBunny(new);
|
SetupBunny(New);
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
np->shade = wp->shade;
|
np->shade = wp->shade;
|
||||||
|
|
||||||
// make immediately active
|
// make immediately active
|
||||||
|
@ -1292,12 +1292,12 @@ int BunnyHatch2(short Weapon)
|
||||||
|
|
||||||
nu->ShellNum = 0; // Not Pregnant right now
|
nu->ShellNum = 0; // Not Pregnant right now
|
||||||
|
|
||||||
NewStateGroup(new, nu->ActorActionSet->Jump);
|
NewStateGroup(New, nu->ActorActionSet->Jump);
|
||||||
nu->ActorActionFunc = DoActorMoveJump;
|
nu->ActorActionFunc = DoActorMoveJump;
|
||||||
DoActorSetSpeed(new, FAST_SPEED);
|
DoActorSetSpeed(New, FAST_SPEED);
|
||||||
if (TEST_BOOL3(wp))
|
if (TEST_BOOL3(wp))
|
||||||
{
|
{
|
||||||
PickJumpMaxSpeed(new, -600-RANDOM_RANGE(600));
|
PickJumpMaxSpeed(New, -600-RANDOM_RANGE(600));
|
||||||
np->xrepeat = np->yrepeat = 64;
|
np->xrepeat = np->yrepeat = 64;
|
||||||
np->xvel = 150 + RANDOM_RANGE(1000);
|
np->xvel = 150 + RANDOM_RANGE(1000);
|
||||||
nu->Health = 1; // Easy to pop. Like shootn' skeet.
|
nu->Health = 1; // Easy to pop. Like shootn' skeet.
|
||||||
|
@ -1305,7 +1305,7 @@ int BunnyHatch2(short Weapon)
|
||||||
np->ang += RANDOM_RANGE(128);
|
np->ang += RANDOM_RANGE(128);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
PickJumpMaxSpeed(new, -600);
|
PickJumpMaxSpeed(New, -600);
|
||||||
|
|
||||||
SET(nu->Flags, SPR_JUMPING);
|
SET(nu->Flags, SPR_JUMPING);
|
||||||
RESET(nu->Flags, SPR_FALLING);
|
RESET(nu->Flags, SPR_FALLING);
|
||||||
|
@ -1316,11 +1316,11 @@ int BunnyHatch2(short Weapon)
|
||||||
nu->active_range = 75000; // Set it far
|
nu->active_range = 75000; // Set it far
|
||||||
|
|
||||||
// if I didn't do this here they get stuck in the air sometimes
|
// if I didn't do this here they get stuck in the air sometimes
|
||||||
DoActorZrange(new);
|
DoActorZrange(New);
|
||||||
|
|
||||||
DoActorJump(new);
|
DoActorJump(New);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -556,14 +556,14 @@ NewCoolg(short SpriteNum)
|
||||||
USERp nu;
|
USERp nu;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_ENEMY, COOLG_RUN_R0, &s_CoolgBirth[0], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 50);
|
New = SpawnSprite(STAT_ENEMY, COOLG_RUN_R0, &s_CoolgBirth[0], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 50);
|
||||||
|
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
|
|
||||||
ChangeState(new, &s_CoolgBirth[0]);
|
ChangeState(New, &s_CoolgBirth[0]);
|
||||||
nu->StateEnd = s_CoolgDie;
|
nu->StateEnd = s_CoolgDie;
|
||||||
nu->Rot = sg_CoolgRun;
|
nu->Rot = sg_CoolgRun;
|
||||||
np->pal = nu->spal = u->spal;
|
np->pal = nu->spal = u->spal;
|
||||||
|
@ -576,36 +576,36 @@ NewCoolg(short SpriteNum)
|
||||||
|
|
||||||
// special case
|
// special case
|
||||||
TotalKillable++;
|
TotalKillable++;
|
||||||
CoolgCommon(new);
|
CoolgCommon(New);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
DoCoolgBirth(short new)
|
DoCoolgBirth(short New)
|
||||||
{
|
{
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
USERp u;
|
USERp u;
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
|
|
||||||
u = User[new];
|
u = User[New];
|
||||||
sp = &sprite[new];
|
sp = &sprite[New];
|
||||||
|
|
||||||
u->Health = HEALTH_COOLIE_GHOST;
|
u->Health = HEALTH_COOLIE_GHOST;
|
||||||
u->Attrib = &CoolgAttrib;
|
u->Attrib = &CoolgAttrib;
|
||||||
DoActorSetSpeed(new, NORM_SPEED);
|
DoActorSetSpeed(New, NORM_SPEED);
|
||||||
|
|
||||||
ChangeState(new, s_CoolgRun[0]);
|
ChangeState(New, s_CoolgRun[0]);
|
||||||
u->StateEnd = s_CoolgDie;
|
u->StateEnd = s_CoolgDie;
|
||||||
u->Rot = sg_CoolgRun;
|
u->Rot = sg_CoolgRun;
|
||||||
|
|
||||||
EnemyDefaults(new, &CoolgActionSet, &CoolgPersonality);
|
EnemyDefaults(New, &CoolgActionSet, &CoolgPersonality);
|
||||||
// special case
|
// special case
|
||||||
TotalKillable--;
|
TotalKillable--;
|
||||||
|
|
||||||
SET(u->Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
|
SET(u->Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
|
||||||
CoolgCommon(new);
|
CoolgCommon(New);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,7 +368,7 @@ DoVoxelShadow(SPRITEp tspr)
|
||||||
void
|
void
|
||||||
DoShadows(uspritetype * tsp, int viewz)
|
DoShadows(uspritetype * tsp, int viewz)
|
||||||
{
|
{
|
||||||
uspritetype * new = &tsprite[spritesortcnt];
|
uspritetype * New = &tsprite[spritesortcnt];
|
||||||
USERp tu = User[tsp->owner];
|
USERp tu = User[tsp->owner];
|
||||||
int ground_dist = 0;
|
int ground_dist = 0;
|
||||||
int view_dist = 0;
|
int view_dist = 0;
|
||||||
|
@ -393,24 +393,24 @@ DoShadows(uspritetype * tsp, int viewz)
|
||||||
}
|
}
|
||||||
|
|
||||||
tsp->sectnum = sectnum;
|
tsp->sectnum = sectnum;
|
||||||
memcpy(new, tsp, sizeof(SPRITE));
|
memcpy(New, tsp, sizeof(SPRITE));
|
||||||
// shadow is ALWAYS draw last - status is priority
|
// shadow is ALWAYS draw last - status is priority
|
||||||
new->statnum = MAXSTATUS;
|
New->statnum = MAXSTATUS;
|
||||||
new->sectnum = sectnum;
|
New->sectnum = sectnum;
|
||||||
|
|
||||||
if ((tsp->yrepeat >> 2) > 4)
|
if ((tsp->yrepeat >> 2) > 4)
|
||||||
{
|
{
|
||||||
yrepeat = (tsp->yrepeat >> 2) - (SPRITEp_SIZE_Y(tsp) / 64) * 2;
|
yrepeat = (tsp->yrepeat >> 2) - (SPRITEp_SIZE_Y(tsp) / 64) * 2;
|
||||||
xrepeat = new->xrepeat;
|
xrepeat = New->xrepeat;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yrepeat = new->yrepeat;
|
yrepeat = New->yrepeat;
|
||||||
xrepeat = new->xrepeat;
|
xrepeat = New->xrepeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
new->shade = 127;
|
New->shade = 127;
|
||||||
SET(new->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
SET(New->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
|
||||||
loz = tu->loz;
|
loz = tu->loz;
|
||||||
if (tu->lo_sp)
|
if (tu->lo_sp)
|
||||||
|
@ -429,7 +429,7 @@ DoShadows(uspritetype * tsp, int viewz)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// need to find the ground here
|
// need to find the ground here
|
||||||
new->z = loz;
|
New->z = loz;
|
||||||
|
|
||||||
// if below or close to sprites z don't bother to draw it
|
// if below or close to sprites z don't bother to draw it
|
||||||
if ((viewz - loz) > -Z(8))
|
if ((viewz - loz) > -Z(8))
|
||||||
|
@ -451,11 +451,11 @@ DoShadows(uspritetype * tsp, int viewz)
|
||||||
xrepeat = min(xrepeat, 255);
|
xrepeat = min(xrepeat, 255);
|
||||||
yrepeat = min(yrepeat, 255);
|
yrepeat = min(yrepeat, 255);
|
||||||
|
|
||||||
new->xrepeat = xrepeat;
|
New->xrepeat = xrepeat;
|
||||||
new->yrepeat = yrepeat;
|
New->yrepeat = yrepeat;
|
||||||
|
|
||||||
// Check for voxel items and use a round generic pic if so
|
// Check for voxel items and use a round generic pic if so
|
||||||
//DoVoxelShadow(new);
|
//DoVoxelShadow(New);
|
||||||
|
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ DoShadows(uspritetype * tsp, int viewz)
|
||||||
void
|
void
|
||||||
DoMotionBlur(uspritetype const * tsp)
|
DoMotionBlur(uspritetype const * tsp)
|
||||||
{
|
{
|
||||||
uspritetype * new;
|
uspritetype * New;
|
||||||
USERp tu = User[tsp->owner];
|
USERp tu = User[tsp->owner];
|
||||||
int nx,ny,nz = 0,dx,dy,dz;
|
int nx,ny,nz = 0,dx,dy,dz;
|
||||||
short i, ang;
|
short i, ang;
|
||||||
|
@ -534,20 +534,20 @@ DoMotionBlur(uspritetype const * tsp)
|
||||||
|
|
||||||
for (i = 0; i < tu->motion_blur_num; i++)
|
for (i = 0; i < tu->motion_blur_num; i++)
|
||||||
{
|
{
|
||||||
new = &tsprite[spritesortcnt];
|
New = &tsprite[spritesortcnt];
|
||||||
memcpy(new, tsp, sizeof(SPRITE));
|
memcpy(New, tsp, sizeof(SPRITE));
|
||||||
SET(new->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_TRANS_FLIP);
|
SET(New->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_TRANS_FLIP);
|
||||||
|
|
||||||
new->x += dx;
|
New->x += dx;
|
||||||
new->y += dy;
|
New->y += dy;
|
||||||
dx += nx;
|
dx += nx;
|
||||||
dy += ny;
|
dy += ny;
|
||||||
|
|
||||||
new->z += dz;
|
New->z += dz;
|
||||||
dz += nz;
|
dz += nz;
|
||||||
|
|
||||||
new->xrepeat = xrepeat;
|
New->xrepeat = xrepeat;
|
||||||
new->yrepeat = yrepeat;
|
New->yrepeat = yrepeat;
|
||||||
|
|
||||||
xrepeat -= repeat_adj;
|
xrepeat -= repeat_adj;
|
||||||
yrepeat -= repeat_adj;
|
yrepeat -= repeat_adj;
|
||||||
|
@ -566,7 +566,7 @@ void SetVoxelSprite(SPRITEp sp, short pic)
|
||||||
void WarpCopySprite(void)
|
void WarpCopySprite(void)
|
||||||
{
|
{
|
||||||
SPRITEp sp1, sp2, sp;
|
SPRITEp sp1, sp2, sp;
|
||||||
uspritetype * new;
|
uspritetype * New;
|
||||||
short sn, nsn;
|
short sn, nsn;
|
||||||
short sn2, nsn2;
|
short sn2, nsn2;
|
||||||
short spnum, next_spnum;
|
short spnum, next_spnum;
|
||||||
|
@ -599,20 +599,20 @@ void WarpCopySprite(void)
|
||||||
if (sprite[spnum].picnum == ST1)
|
if (sprite[spnum].picnum == ST1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
new = &tsprite[spritesortcnt];
|
New = &tsprite[spritesortcnt];
|
||||||
memcpy(new, &sprite[spnum], sizeof(SPRITE));
|
memcpy(New, &sprite[spnum], sizeof(SPRITE));
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
new->owner = spnum;
|
New->owner = spnum;
|
||||||
new->statnum = 0;
|
New->statnum = 0;
|
||||||
|
|
||||||
xoff = sp1->x - new->x;
|
xoff = sp1->x - New->x;
|
||||||
yoff = sp1->y - new->y;
|
yoff = sp1->y - New->y;
|
||||||
zoff = sp1->z - new->z;
|
zoff = sp1->z - New->z;
|
||||||
|
|
||||||
new->x = sp2->x - xoff;
|
New->x = sp2->x - xoff;
|
||||||
new->y = sp2->y - yoff;
|
New->y = sp2->y - yoff;
|
||||||
new->z = sp2->z - zoff;
|
New->z = sp2->z - zoff;
|
||||||
new->sectnum = sp2->sectnum;
|
New->sectnum = sp2->sectnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRAVERSE_SPRITE_SECT(headspritesect[sect2], spnum, next_spnum)
|
TRAVERSE_SPRITE_SECT(headspritesect[sect2], spnum, next_spnum)
|
||||||
|
@ -623,20 +623,20 @@ void WarpCopySprite(void)
|
||||||
if (sprite[spnum].picnum == ST1)
|
if (sprite[spnum].picnum == ST1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
new = &tsprite[spritesortcnt];
|
New = &tsprite[spritesortcnt];
|
||||||
memcpy(new, &sprite[spnum], sizeof(SPRITE));
|
memcpy(New, &sprite[spnum], sizeof(SPRITE));
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
new->owner = spnum;
|
New->owner = spnum;
|
||||||
new->statnum = 0;
|
New->statnum = 0;
|
||||||
|
|
||||||
xoff = sp2->x - new->x;
|
xoff = sp2->x - New->x;
|
||||||
yoff = sp2->y - new->y;
|
yoff = sp2->y - New->y;
|
||||||
zoff = sp2->z - new->z;
|
zoff = sp2->z - New->z;
|
||||||
|
|
||||||
new->x = sp1->x - xoff;
|
New->x = sp1->x - xoff;
|
||||||
new->y = sp1->y - yoff;
|
New->y = sp1->y - yoff;
|
||||||
new->z = sp1->z - zoff;
|
New->z = sp1->z - zoff;
|
||||||
new->sectnum = sp1->sectnum;
|
New->sectnum = sp1->sectnum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2050,11 +2050,11 @@ PostDraw(void)
|
||||||
|
|
||||||
int CopySprite(uspritetype const * tsp, short newsector)
|
int CopySprite(uspritetype const * tsp, short newsector)
|
||||||
{
|
{
|
||||||
short new;
|
short New;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
|
|
||||||
new = COVERinsertsprite(newsector, STAT_FAF_COPY);
|
New = COVERinsertsprite(newsector, STAT_FAF_COPY);
|
||||||
sp = &sprite[new];
|
sp = &sprite[New];
|
||||||
|
|
||||||
sp->x = tsp->x;
|
sp->x = tsp->x;
|
||||||
sp->y = tsp->y;
|
sp->y = tsp->y;
|
||||||
|
@ -2074,7 +2074,7 @@ int CopySprite(uspritetype const * tsp, short newsector)
|
||||||
|
|
||||||
RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ConnectCopySprite(uspritetype const * tsp)
|
int ConnectCopySprite(uspritetype const * tsp)
|
||||||
|
@ -2120,7 +2120,7 @@ void PreDrawStackedWater(void)
|
||||||
short i,nexti;
|
short i,nexti;
|
||||||
SPRITEp sp,np;
|
SPRITEp sp,np;
|
||||||
USERp u,nu;
|
USERp u,nu;
|
||||||
short new;
|
short New;
|
||||||
int smr4,smr2;
|
int smr4,smr2;
|
||||||
int x,y,z;
|
int x,y,z;
|
||||||
short ang;
|
short ang;
|
||||||
|
@ -2148,13 +2148,13 @@ void PreDrawStackedWater(void)
|
||||||
sp = &sprite[i];
|
sp = &sprite[i];
|
||||||
u = User[i];
|
u = User[i];
|
||||||
|
|
||||||
new = ConnectCopySprite((uspritetype const *)sp);
|
New = ConnectCopySprite((uspritetype const *)sp);
|
||||||
if (new >= 0)
|
if (New >= 0)
|
||||||
{
|
{
|
||||||
np = &sprite[new];
|
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);
|
||||||
|
|
||||||
nu->xchange = -989898;
|
nu->xchange = -989898;
|
||||||
|
|
|
@ -419,15 +419,15 @@ NewEel(short SpriteNum)
|
||||||
USERp nu;
|
USERp nu;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
ANIMATOR DoActorDecide;
|
ANIMATOR DoActorDecide;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
|
|
||||||
new = SpawnSprite(STAT_ENEMY, EEL_RUN_R0, &s_EelBirth, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 50);
|
New = SpawnSprite(STAT_ENEMY, EEL_RUN_R0, &s_EelBirth, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 50);
|
||||||
|
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
|
|
||||||
ChangeState(new, &s_EelBirth);
|
ChangeState(New, &s_EelBirth);
|
||||||
nu->StateEnd = s_EelDie;
|
nu->StateEnd = s_EelDie;
|
||||||
nu->Rot = sg_EelRun;
|
nu->Rot = sg_EelRun;
|
||||||
np->pal = nu->spal = u->spal;
|
np->pal = nu->spal = u->spal;
|
||||||
|
@ -436,7 +436,7 @@ NewEel(short SpriteNum)
|
||||||
|
|
||||||
np->shade = sp->shade;
|
np->shade = sp->shade;
|
||||||
|
|
||||||
EelCommon(new);
|
EelCommon(New);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,15 +304,15 @@ SpawnMidSplash(short SpriteNum)
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, GOREDrip, s_GoreSplash, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, GOREDrip, s_GoreSplash, sp->sectnum,
|
||||||
sp->x, sp->y, SPRITEp_MID(sp), sp->ang, 0);
|
sp->x, sp->y, SPRITEp_MID(sp), sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
//SetOwner(Weapon, new);
|
//SetOwner(Weapon, New);
|
||||||
np->shade = -12;
|
np->shade = -12;
|
||||||
np->xrepeat = 70-RANDOM_RANGE(20);
|
np->xrepeat = 70-RANDOM_RANGE(20);
|
||||||
np->yrepeat = 70-RANDOM_RANGE(20);
|
np->yrepeat = 70-RANDOM_RANGE(20);
|
||||||
|
@ -340,15 +340,15 @@ SpawnFloorSplash(short SpriteNum)
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, GOREDrip, s_GoreFloorSplash, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, GOREDrip, s_GoreFloorSplash, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 0);
|
sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
//SetOwner(Weapon, new);
|
//SetOwner(Weapon, New);
|
||||||
np->shade = -12;
|
np->shade = -12;
|
||||||
np->xrepeat = 70-RANDOM_RANGE(20);
|
np->xrepeat = 70-RANDOM_RANGE(20);
|
||||||
np->yrepeat = 70-RANDOM_RANGE(20);
|
np->yrepeat = 70-RANDOM_RANGE(20);
|
||||||
|
@ -564,15 +564,15 @@ DoBloodSpray(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, GOREDrip, s_BloodSpray, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, GOREDrip, s_BloodSpray, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 100);
|
sp->x, sp->y, sp->z, sp->ang, 100);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
SetOwner(Weapon, new);
|
SetOwner(Weapon, New);
|
||||||
np->shade = -12;
|
np->shade = -12;
|
||||||
np->xrepeat = 40-RANDOM_RANGE(30);
|
np->xrepeat = 40-RANDOM_RANGE(30);
|
||||||
np->yrepeat = 40-RANDOM_RANGE(30);
|
np->yrepeat = 40-RANDOM_RANGE(30);
|
||||||
|
@ -591,7 +591,7 @@ DoBloodSpray(int16_t Weapon)
|
||||||
nu->ychange = u->ychange;
|
nu->ychange = u->ychange;
|
||||||
nu->zchange = u->zchange;
|
nu->zchange = u->zchange;
|
||||||
|
|
||||||
ScaleSpriteVector(new, 20000);
|
ScaleSpriteVector(New, 20000);
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
SET(nu->Flags, SPR_UNDERWATER);
|
SET(nu->Flags, SPR_UNDERWATER);
|
||||||
|
@ -789,16 +789,16 @@ DoPhosphorus(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_SKIP4, PUFF, s_PhosphorExp, sp->sectnum,
|
New = SpawnSprite(STAT_SKIP4, PUFF, s_PhosphorExp, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 100);
|
sp->x, sp->y, sp->z, sp->ang, 100);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->hitag = LUMINOUS; // Always full brightness
|
np->hitag = LUMINOUS; // Always full brightness
|
||||||
SetOwner(Weapon, new);
|
SetOwner(Weapon, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 12 + RANDOM_RANGE(10);
|
np->xrepeat = 12 + RANDOM_RANGE(10);
|
||||||
np->yrepeat = 12 + RANDOM_RANGE(10);
|
np->yrepeat = 12 + RANDOM_RANGE(10);
|
||||||
|
@ -819,7 +819,7 @@ DoPhosphorus(int16_t Weapon)
|
||||||
|
|
||||||
nu->spal = np->pal = PALETTE_PLAYER3; // RED
|
nu->spal = np->pal = PALETTE_PLAYER3; // RED
|
||||||
|
|
||||||
ScaleSpriteVector(new, 20000);
|
ScaleSpriteVector(New, 20000);
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
SET(nu->Flags, SPR_UNDERWATER);
|
SET(nu->Flags, SPR_UNDERWATER);
|
||||||
|
@ -1042,15 +1042,15 @@ DoChemBomb(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 100);
|
sp->x, sp->y, sp->z, sp->ang, 100);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
SetOwner(Weapon, new);
|
SetOwner(Weapon, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 40;
|
np->xrepeat = 40;
|
||||||
np->yrepeat = 40;
|
np->yrepeat = 40;
|
||||||
|
@ -1068,7 +1068,7 @@ DoChemBomb(int16_t Weapon)
|
||||||
|
|
||||||
nu->spal = np->pal = PALETTE_PLAYER6;
|
nu->spal = np->pal = PALETTE_PLAYER6;
|
||||||
|
|
||||||
ScaleSpriteVector(new, 20000);
|
ScaleSpriteVector(New, 20000);
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
SET(nu->Flags, SPR_UNDERWATER);
|
SET(nu->Flags, SPR_UNDERWATER);
|
||||||
|
@ -1274,7 +1274,7 @@ SpawnRadiationCloud(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum], np;
|
SPRITEp sp = &sprite[SpriteNum], np;
|
||||||
USERp u = User[SpriteNum], nu;
|
USERp u = User[SpriteNum], nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
|
|
||||||
if (!MoveSkip4)
|
if (!MoveSkip4)
|
||||||
|
@ -1300,13 +1300,13 @@ SpawnRadiationCloud(short SpriteNum)
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, RADIATION_CLOUD, s_RadiationCloud, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, RADIATION_CLOUD, s_RadiationCloud, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
SetOwner(sp->owner, new);
|
SetOwner(sp->owner, New);
|
||||||
nu->WaitTics = 1 * 120;
|
nu->WaitTics = 1 * 120;
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 32;
|
np->xrepeat = 32;
|
||||||
|
@ -1731,7 +1731,7 @@ SpawnFlashBombOnActor(int16_t enemy)
|
||||||
USERp eu = User[enemy];
|
USERp eu = User[enemy];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
|
|
||||||
// Forget about burnable sprites
|
// Forget about burnable sprites
|
||||||
|
@ -1779,13 +1779,13 @@ SpawnFlashBombOnActor(int16_t enemy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, ep->sectnum,
|
New = SpawnSprite(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, ep->sectnum,
|
||||||
ep->x, ep->y, ep->z, ep->ang, 0);
|
ep->x, ep->y, ep->z, ep->ang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
if (enemy >= 0)
|
if (enemy >= 0)
|
||||||
eu->flame = new;
|
eu->flame = New;
|
||||||
|
|
||||||
np->xrepeat = 16;
|
np->xrepeat = 16;
|
||||||
np->yrepeat = 16;
|
np->yrepeat = 16;
|
||||||
|
@ -1805,10 +1805,10 @@ SpawnFlashBombOnActor(int16_t enemy)
|
||||||
|
|
||||||
if (enemy >= 0)
|
if (enemy >= 0)
|
||||||
{
|
{
|
||||||
SetAttach(enemy, new);
|
SetAttach(enemy, New);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
|
@ -2176,30 +2176,30 @@ pUziEjectUp(PANEL_SPRITEp gun)
|
||||||
void
|
void
|
||||||
pSpawnUziClip(PANEL_SPRITEp gun)
|
pSpawnUziClip(PANEL_SPRITEp gun)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp new;
|
PANEL_SPRITEp New;
|
||||||
|
|
||||||
PlaySound(DIGI_REMOVECLIP, &gun->PlayerP->posx, &gun->PlayerP->posy,
|
PlaySound(DIGI_REMOVECLIP, &gun->PlayerP->posx, &gun->PlayerP->posy,
|
||||||
&gun->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler|v3df_follow);
|
&gun->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler|v3df_follow);
|
||||||
|
|
||||||
if (TEST(gun->flags, PANF_XFLIP))
|
if (TEST(gun->flags, PANF_XFLIP))
|
||||||
{
|
{
|
||||||
new = pSpawnSprite(gun->PlayerP, ps_UziClip, PRI_BACK, gun->x - UZI_CLIP_XOFF, gun->y + UZI_CLIP_YOFF);
|
New = pSpawnSprite(gun->PlayerP, ps_UziClip, PRI_BACK, gun->x - UZI_CLIP_XOFF, gun->y + UZI_CLIP_YOFF);
|
||||||
SET(new->flags, PANF_XFLIP);
|
SET(New->flags, PANF_XFLIP);
|
||||||
new->ang = NORM_ANGLE(1024 + 256 + 22);
|
New->ang = NORM_ANGLE(1024 + 256 + 22);
|
||||||
new->ang = NORM_ANGLE(new->ang + 512);
|
New->ang = NORM_ANGLE(New->ang + 512);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new = pSpawnSprite(gun->PlayerP, ps_UziClip, PRI_BACK, gun->x + UZI_CLIP_XOFF, gun->y + UZI_CLIP_YOFF);
|
New = pSpawnSprite(gun->PlayerP, ps_UziClip, PRI_BACK, gun->x + UZI_CLIP_XOFF, gun->y + UZI_CLIP_YOFF);
|
||||||
new->ang = NORM_ANGLE(1024 + 256 - 22);
|
New->ang = NORM_ANGLE(1024 + 256 - 22);
|
||||||
}
|
}
|
||||||
|
|
||||||
new->vel = 1050;
|
New->vel = 1050;
|
||||||
SET(new->flags, PANF_WEAPON_SPRITE);
|
SET(New->flags, PANF_WEAPON_SPRITE);
|
||||||
|
|
||||||
|
|
||||||
// carry Eject sprite with clip
|
// carry Eject sprite with clip
|
||||||
new->sibling = gun;
|
New->sibling = gun;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2341,15 +2341,15 @@ pUziDoneReload(PANEL_SPRITEp psp)
|
||||||
// if 2 uzi's and the first one has been reloaded
|
// if 2 uzi's and the first one has been reloaded
|
||||||
// kill the first one and make the second one the CurWeapon
|
// kill the first one and make the second one the CurWeapon
|
||||||
// Set uzi's back to previous state
|
// Set uzi's back to previous state
|
||||||
PANEL_SPRITEp new;
|
PANEL_SPRITEp New;
|
||||||
|
|
||||||
|
|
||||||
if (pp->WpnUziType > 2)
|
if (pp->WpnUziType > 2)
|
||||||
pp->WpnUziType -= 3;
|
pp->WpnUziType -= 3;
|
||||||
|
|
||||||
new = InitWeaponUziSecondaryReload(psp);
|
New = InitWeaponUziSecondaryReload(psp);
|
||||||
pp->Wpn[WPN_UZI] = new;
|
pp->Wpn[WPN_UZI] = New;
|
||||||
pp->CurWpn = new;
|
pp->CurWpn = New;
|
||||||
pp->CurWpn->sibling = NULL;
|
pp->CurWpn->sibling = NULL;
|
||||||
|
|
||||||
pKillSprite(psp);
|
pKillSprite(psp);
|
||||||
|
@ -2516,7 +2516,7 @@ InitWeaponUzi(PLAYERp pp)
|
||||||
PANEL_SPRITEp
|
PANEL_SPRITEp
|
||||||
InitWeaponUzi2(PANEL_SPRITEp uzi_orig)
|
InitWeaponUzi2(PANEL_SPRITEp uzi_orig)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp new;
|
PANEL_SPRITEp New;
|
||||||
PLAYERp pp = uzi_orig->PlayerP;
|
PLAYERp pp = uzi_orig->PlayerP;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2529,50 +2529,50 @@ InitWeaponUzi2(PANEL_SPRITEp uzi_orig)
|
||||||
// Spawning a 2nd uzi, set weapon mode
|
// Spawning a 2nd uzi, set weapon mode
|
||||||
pp->WpnUziType = 0; // 0 is up, 1 is retract
|
pp->WpnUziType = 0; // 0 is up, 1 is retract
|
||||||
|
|
||||||
new = pSpawnSprite(pp, ps_PresentUzi2, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
|
New = pSpawnSprite(pp, ps_PresentUzi2, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
|
||||||
uzi_orig->sibling = new;
|
uzi_orig->sibling = New;
|
||||||
|
|
||||||
new->y += tilesiz[new->picndx].y;
|
New->y += tilesiz[New->picndx].y;
|
||||||
|
|
||||||
// Set up the new Weapon variables
|
// Set up the New Weapon variables
|
||||||
SET(new->flags, PANF_WEAPON_SPRITE);
|
SET(New->flags, PANF_WEAPON_SPRITE);
|
||||||
new->ActionState = &ps_FireUzi2[1];
|
New->ActionState = &ps_FireUzi2[1];
|
||||||
new->RetractState = ps_RetractUzi2;
|
New->RetractState = ps_RetractUzi2;
|
||||||
new->PresentState = ps_PresentUzi2;
|
New->PresentState = ps_PresentUzi2;
|
||||||
new->RestState = ps_FireUzi2;
|
New->RestState = ps_FireUzi2;
|
||||||
pSetState(new, new->PresentState);
|
pSetState(New, New->PresentState);
|
||||||
|
|
||||||
new->sibling = uzi_orig;
|
New->sibling = uzi_orig;
|
||||||
SET(new->flags, PANF_SECONDARY);
|
SET(New->flags, PANF_SECONDARY);
|
||||||
pUziOverlays(new, CHAMBER_REST);
|
pUziOverlays(New, CHAMBER_REST);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
PANEL_SPRITEp
|
PANEL_SPRITEp
|
||||||
InitWeaponUziSecondaryReload(PANEL_SPRITEp uzi_orig)
|
InitWeaponUziSecondaryReload(PANEL_SPRITEp uzi_orig)
|
||||||
{
|
{
|
||||||
PANEL_SPRITEp new;
|
PANEL_SPRITEp New;
|
||||||
PLAYERp pp = uzi_orig->PlayerP;
|
PLAYERp pp = uzi_orig->PlayerP;
|
||||||
|
|
||||||
new = pSpawnSprite(pp, ps_PresentUzi, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
|
New = pSpawnSprite(pp, ps_PresentUzi, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
|
||||||
new->y += tilesiz[new->picndx].y;
|
New->y += tilesiz[New->picndx].y;
|
||||||
|
|
||||||
SET(new->flags, PANF_XFLIP);
|
SET(New->flags, PANF_XFLIP);
|
||||||
|
|
||||||
// Set up the new Weapon variables
|
// Set up the New Weapon variables
|
||||||
SET(new->flags, PANF_WEAPON_SPRITE);
|
SET(New->flags, PANF_WEAPON_SPRITE);
|
||||||
new->ActionState = ps_UziEject;
|
New->ActionState = ps_UziEject;
|
||||||
new->RetractState = ps_RetractUzi;
|
New->RetractState = ps_RetractUzi;
|
||||||
new->PresentState = ps_PresentUzi;
|
New->PresentState = ps_PresentUzi;
|
||||||
new->RestState = ps_UziEject;
|
New->RestState = ps_UziEject;
|
||||||
// pSetState(new, new->PresentState);
|
// pSetState(New, New->PresentState);
|
||||||
pSetState(new, ps_PresentUziReload);
|
pSetState(New, ps_PresentUziReload);
|
||||||
|
|
||||||
new->sibling = uzi_orig;
|
New->sibling = uzi_orig;
|
||||||
SET(new->flags, PANF_SECONDARY|PANF_RELOAD);
|
SET(New->flags, PANF_SECONDARY|PANF_RELOAD);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -53,11 +53,11 @@ extern SWBOOL GamePaused;
|
||||||
|
|
||||||
short CopyQuakeSpotToOn(SPRITEp sp)
|
short CopyQuakeSpotToOn(SPRITEp sp)
|
||||||
{
|
{
|
||||||
short new;
|
short New;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
|
|
||||||
new = COVERinsertsprite(sp->sectnum, STAT_QUAKE_SPOT);
|
New = COVERinsertsprite(sp->sectnum, STAT_QUAKE_SPOT);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
|
|
||||||
memcpy(np, sp, sizeof(SPRITE));
|
memcpy(np, sp, sizeof(SPRITE));
|
||||||
|
|
||||||
|
@ -68,11 +68,11 @@ short CopyQuakeSpotToOn(SPRITEp sp)
|
||||||
np->extra = 0;
|
np->extra = 0;
|
||||||
np->owner = -1;
|
np->owner = -1;
|
||||||
|
|
||||||
change_sprite_stat(new, STAT_QUAKE_ON);
|
change_sprite_stat(New, STAT_QUAKE_ON);
|
||||||
|
|
||||||
QUAKE_Duration(np) *= 120;
|
QUAKE_Duration(np) *= 120;
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1246,7 +1246,7 @@ void RipperHatch(short Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp wp = &sprite[Weapon];
|
SPRITEp wp = &sprite[Weapon];
|
||||||
|
|
||||||
short new,i;
|
short New,i;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
#define MAX_RIPPERS 1
|
#define MAX_RIPPERS 1
|
||||||
|
@ -1257,8 +1257,8 @@ void RipperHatch(short Weapon)
|
||||||
|
|
||||||
for (i = 0; i < MAX_RIPPERS; i++)
|
for (i = 0; i < MAX_RIPPERS; i++)
|
||||||
{
|
{
|
||||||
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
memset(np,0,sizeof(SPRITE));
|
memset(np,0,sizeof(SPRITE));
|
||||||
np->sectnum = wp->sectnum;
|
np->sectnum = wp->sectnum;
|
||||||
np->statnum = STAT_DEFAULT;
|
np->statnum = STAT_DEFAULT;
|
||||||
|
@ -1270,16 +1270,16 @@ void RipperHatch(short Weapon)
|
||||||
np->xrepeat = np->yrepeat = 64;
|
np->xrepeat = np->yrepeat = 64;
|
||||||
np->ang = rip_ang[i];
|
np->ang = rip_ang[i];
|
||||||
np->pal = 0;
|
np->pal = 0;
|
||||||
SetupRipper(new);
|
SetupRipper(New);
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
// make immediately active
|
// make immediately active
|
||||||
SET(nu->Flags, SPR_ACTIVE);
|
SET(nu->Flags, SPR_ACTIVE);
|
||||||
|
|
||||||
NewStateGroup(new, nu->ActorActionSet->Jump);
|
NewStateGroup(New, nu->ActorActionSet->Jump);
|
||||||
nu->ActorActionFunc = DoActorMoveJump;
|
nu->ActorActionFunc = DoActorMoveJump;
|
||||||
DoActorSetSpeed(new, FAST_SPEED);
|
DoActorSetSpeed(New, FAST_SPEED);
|
||||||
PickJumpMaxSpeed(new, -600);
|
PickJumpMaxSpeed(New, -600);
|
||||||
|
|
||||||
SET(nu->Flags, SPR_JUMPING);
|
SET(nu->Flags, SPR_JUMPING);
|
||||||
RESET(nu->Flags, SPR_FALLING);
|
RESET(nu->Flags, SPR_FALLING);
|
||||||
|
@ -1287,9 +1287,9 @@ void RipperHatch(short Weapon)
|
||||||
nu->jump_grav = 8;
|
nu->jump_grav = 8;
|
||||||
|
|
||||||
// if I didn't do this here they get stuck in the air sometimes
|
// if I didn't do this here they get stuck in the air sometimes
|
||||||
DoActorZrange(new);
|
DoActorZrange(New);
|
||||||
|
|
||||||
DoJump(new);
|
DoJump(New);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1257,7 +1257,7 @@ void Ripper2Hatch(short Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp wp = &sprite[Weapon];
|
SPRITEp wp = &sprite[Weapon];
|
||||||
|
|
||||||
short new,i;
|
short New,i;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
#define MAX_RIPPER2S 1
|
#define MAX_RIPPER2S 1
|
||||||
|
@ -1268,8 +1268,8 @@ void Ripper2Hatch(short Weapon)
|
||||||
|
|
||||||
for (i = 0; i < MAX_RIPPER2S; i++)
|
for (i = 0; i < MAX_RIPPER2S; i++)
|
||||||
{
|
{
|
||||||
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
memset(np,0,sizeof(SPRITE));
|
memset(np,0,sizeof(SPRITE));
|
||||||
np->sectnum = wp->sectnum;
|
np->sectnum = wp->sectnum;
|
||||||
np->statnum = STAT_DEFAULT;
|
np->statnum = STAT_DEFAULT;
|
||||||
|
@ -1282,16 +1282,16 @@ void Ripper2Hatch(short Weapon)
|
||||||
np->ang = rip_ang[i];
|
np->ang = rip_ang[i];
|
||||||
np->pal = 0;
|
np->pal = 0;
|
||||||
np->shade = -10;
|
np->shade = -10;
|
||||||
SetupRipper2(new);
|
SetupRipper2(New);
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
// make immediately active
|
// make immediately active
|
||||||
SET(nu->Flags, SPR_ACTIVE);
|
SET(nu->Flags, SPR_ACTIVE);
|
||||||
|
|
||||||
NewStateGroup(new, nu->ActorActionSet->Jump);
|
NewStateGroup(New, nu->ActorActionSet->Jump);
|
||||||
nu->ActorActionFunc = DoActorMoveJump;
|
nu->ActorActionFunc = DoActorMoveJump;
|
||||||
DoActorSetSpeed(new, FAST_SPEED);
|
DoActorSetSpeed(New, FAST_SPEED);
|
||||||
PickJumpMaxSpeed(new, -600);
|
PickJumpMaxSpeed(New, -600);
|
||||||
|
|
||||||
SET(nu->Flags, SPR_JUMPING);
|
SET(nu->Flags, SPR_JUMPING);
|
||||||
RESET(nu->Flags, SPR_FALLING);
|
RESET(nu->Flags, SPR_FALLING);
|
||||||
|
@ -1299,9 +1299,9 @@ void Ripper2Hatch(short Weapon)
|
||||||
nu->jump_grav = 8;
|
nu->jump_grav = 8;
|
||||||
|
|
||||||
// if I didn't do this here they get stuck in the air sometimes
|
// if I didn't do this here they get stuck in the air sometimes
|
||||||
DoActorZrange(new);
|
DoActorZrange(New);
|
||||||
|
|
||||||
DoJump(new);
|
DoJump(New);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2935,7 +2935,7 @@ void
|
||||||
DoSineWaveWall(void)
|
DoSineWaveWall(void)
|
||||||
{
|
{
|
||||||
SINE_WALL *sw;
|
SINE_WALL *sw;
|
||||||
int new;
|
int New;
|
||||||
short sw_num;
|
short sw_num;
|
||||||
|
|
||||||
for (sw_num = 0; sw_num < MAX_SINE_WAVE; sw_num++)
|
for (sw_num = 0; sw_num < MAX_SINE_WAVE; sw_num++)
|
||||||
|
@ -2947,15 +2947,15 @@ DoSineWaveWall(void)
|
||||||
|
|
||||||
if (!sw->type)
|
if (!sw->type)
|
||||||
{
|
{
|
||||||
new = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
|
New = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
|
||||||
// wall[sw->wall].y = new;
|
// wall[sw->wall].y = New;
|
||||||
dragpoint(sw->wall, wall[sw->wall].x, new, 0);
|
dragpoint(sw->wall, wall[sw->wall].x, New, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
|
New = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
|
||||||
// wall[sw->wall].x = new;
|
// wall[sw->wall].x = New;
|
||||||
dragpoint(sw->wall, new, wall[sw->wall].y, 0);
|
dragpoint(sw->wall, New, wall[sw->wall].y, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1002,12 +1002,12 @@ 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;
|
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);
|
||||||
RESET(sprite[new].cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(sprite[New].cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3855,7 +3855,7 @@ int ActorCoughItem(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
short new,choose;
|
short New,choose;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
|
|
||||||
|
|
||||||
|
@ -3863,9 +3863,9 @@ int ActorCoughItem(short SpriteNum)
|
||||||
{
|
{
|
||||||
case SAILORGIRL_R0:
|
case SAILORGIRL_R0:
|
||||||
ASSERT(sp->sectnum >= 0);
|
ASSERT(sp->sectnum >= 0);
|
||||||
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
||||||
ASSERT(new >= 0);
|
ASSERT(New >= 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
np->cstat = np->extra = 0;
|
np->cstat = np->extra = 0;
|
||||||
np->x = sp->x;
|
np->x = sp->x;
|
||||||
np->y = sp->y;
|
np->y = sp->y;
|
||||||
|
@ -3905,9 +3905,9 @@ int ActorCoughItem(short SpriteNum)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ASSERT(sp->sectnum >= 0);
|
ASSERT(sp->sectnum >= 0);
|
||||||
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
||||||
ASSERT(new >= 0);
|
ASSERT(New >= 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
np->cstat = np->extra = 0;
|
np->cstat = np->extra = 0;
|
||||||
np->x = sp->x;
|
np->x = sp->x;
|
||||||
np->y = sp->y;
|
np->y = sp->y;
|
||||||
|
@ -3934,9 +3934,9 @@ int ActorCoughItem(short SpriteNum)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ASSERT(sp->sectnum >= 0);
|
ASSERT(sp->sectnum >= 0);
|
||||||
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
||||||
ASSERT(new >= 0);
|
ASSERT(New >= 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
np->cstat = np->extra = 0;
|
np->cstat = np->extra = 0;
|
||||||
np->x = sp->x;
|
np->x = sp->x;
|
||||||
np->y = sp->y;
|
np->y = sp->y;
|
||||||
|
@ -3966,9 +3966,9 @@ int ActorCoughItem(short SpriteNum)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ASSERT(sp->sectnum >= 0);
|
ASSERT(sp->sectnum >= 0);
|
||||||
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
||||||
ASSERT(new >= 0);
|
ASSERT(New >= 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
np->cstat = 0;
|
np->cstat = 0;
|
||||||
np->extra = 0;
|
np->extra = 0;
|
||||||
np->x = sp->x;
|
np->x = sp->x;
|
||||||
|
@ -4030,9 +4030,9 @@ int ActorCoughItem(short SpriteNum)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ASSERT(sp->sectnum >= 0);
|
ASSERT(sp->sectnum >= 0);
|
||||||
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
||||||
ASSERT(new >= 0);
|
ASSERT(New >= 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
np->cstat = np->extra = 0;
|
np->cstat = np->extra = 0;
|
||||||
np->x = sp->x;
|
np->x = sp->x;
|
||||||
np->y = sp->y;
|
np->y = sp->y;
|
||||||
|
@ -4089,9 +4089,9 @@ int ActorCoughItem(short SpriteNum)
|
||||||
case PACHINKO4:
|
case PACHINKO4:
|
||||||
|
|
||||||
ASSERT(sp->sectnum >= 0);
|
ASSERT(sp->sectnum >= 0);
|
||||||
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
|
||||||
ASSERT(new >= 0);
|
ASSERT(New >= 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
np->cstat = np->extra = 0;
|
np->cstat = np->extra = 0;
|
||||||
np->x = sp->x;
|
np->x = sp->x;
|
||||||
np->y = sp->y;
|
np->y = sp->y;
|
||||||
|
@ -5310,7 +5310,7 @@ KillGet(short SpriteNum)
|
||||||
USERp u = User[SpriteNum],nu;
|
USERp u = User[SpriteNum],nu;
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP,np;
|
SPRITEp sp = User[SpriteNum]->SpriteP,np;
|
||||||
|
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
switch (gNet.MultiGameType)
|
switch (gNet.MultiGameType)
|
||||||
{
|
{
|
||||||
|
@ -5334,11 +5334,11 @@ KillGet(short SpriteNum)
|
||||||
if (!gNet.SpawnMarkers || sp->hitag == TAG_NORESPAWN_FLAG) // No coin if it's a special flag
|
if (!gNet.SpawnMarkers || sp->hitag == TAG_NORESPAWN_FLAG) // No coin if it's a special flag
|
||||||
break;
|
break;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_ITEM, Red_COIN, s_RedCoin, sp->sectnum,
|
New = SpawnSprite(STAT_ITEM, Red_COIN, s_RedCoin, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, 0, 0);
|
sp->x, sp->y, sp->z, 0, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->shade = -20;
|
np->shade = -20;
|
||||||
nu->WaitTics = u->WaitTics - 12;
|
nu->WaitTics = u->WaitTics - 12;
|
||||||
|
@ -5354,7 +5354,7 @@ KillGetAmmo(short SpriteNum)
|
||||||
USERp u = User[SpriteNum],nu;
|
USERp u = User[SpriteNum],nu;
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP,np;
|
SPRITEp sp = User[SpriteNum]->SpriteP,np;
|
||||||
|
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
switch (gNet.MultiGameType)
|
switch (gNet.MultiGameType)
|
||||||
{
|
{
|
||||||
|
@ -5386,11 +5386,11 @@ KillGetAmmo(short SpriteNum)
|
||||||
if (!gNet.SpawnMarkers)
|
if (!gNet.SpawnMarkers)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_ITEM, Red_COIN, s_RedCoin, sp->sectnum,
|
New = SpawnSprite(STAT_ITEM, Red_COIN, s_RedCoin, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, 0, 0);
|
sp->x, sp->y, sp->z, 0, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->shade = -20;
|
np->shade = -20;
|
||||||
nu->WaitTics = u->WaitTics - 12;
|
nu->WaitTics = u->WaitTics - 12;
|
||||||
|
@ -5406,7 +5406,7 @@ KillGetWeapon(short SpriteNum)
|
||||||
USERp u = User[SpriteNum],nu;
|
USERp u = User[SpriteNum],nu;
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP,np;
|
SPRITEp sp = User[SpriteNum]->SpriteP,np;
|
||||||
|
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
switch (gNet.MultiGameType)
|
switch (gNet.MultiGameType)
|
||||||
{
|
{
|
||||||
|
@ -5446,11 +5446,11 @@ KillGetWeapon(short SpriteNum)
|
||||||
if (!gNet.SpawnMarkers)
|
if (!gNet.SpawnMarkers)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_ITEM, Red_COIN, s_RedCoin, sp->sectnum,
|
New = SpawnSprite(STAT_ITEM, Red_COIN, s_RedCoin, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, 0, 0);
|
sp->x, sp->y, sp->z, 0, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->shade = -20;
|
np->shade = -20;
|
||||||
nu->WaitTics = u->WaitTics - 12;
|
nu->WaitTics = u->WaitTics - 12;
|
||||||
|
@ -5596,7 +5596,7 @@ DoGet(short SpriteNum)
|
||||||
// For flag stuff
|
// For flag stuff
|
||||||
USERp nu;
|
USERp nu;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
|
|
||||||
// Invisiblility is only used for DeathMatch type games
|
// Invisiblility is only used for DeathMatch type games
|
||||||
|
@ -6439,25 +6439,25 @@ KeyMain:
|
||||||
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
|
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
|
||||||
|
|
||||||
if (sp->hitag == TAG_NORESPAWN_FLAG)
|
if (sp->hitag == TAG_NORESPAWN_FLAG)
|
||||||
new = SpawnSprite(STAT_ITEM, ICON_FLAG, s_CarryFlagNoDet, sp->sectnum,
|
New = SpawnSprite(STAT_ITEM, ICON_FLAG, s_CarryFlagNoDet, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, 0, 0);
|
sp->x, sp->y, sp->z, 0, 0);
|
||||||
else
|
else
|
||||||
new = SpawnSprite(STAT_ITEM, ICON_FLAG, s_CarryFlag, sp->sectnum,
|
New = SpawnSprite(STAT_ITEM, ICON_FLAG, s_CarryFlag, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, 0, 0);
|
sp->x, sp->y, sp->z, 0, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
np->shade = -20;
|
np->shade = -20;
|
||||||
|
|
||||||
// Attach flag to player
|
// Attach flag to player
|
||||||
nu->Counter = 0;
|
nu->Counter = 0;
|
||||||
RESET(np->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(np->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
SET(np->cstat, CSTAT_SPRITE_WALL);
|
SET(np->cstat, CSTAT_SPRITE_WALL);
|
||||||
SetAttach(pp->PlayerSprite, new);
|
SetAttach(pp->PlayerSprite, New);
|
||||||
nu->sz = SPRITEp_MID(&sprite[pp->PlayerSprite]); // Set mid way up who it hit
|
nu->sz = SPRITEp_MID(&sprite[pp->PlayerSprite]); // Set mid way up who it hit
|
||||||
nu->spal = np->pal = sp->pal; // Set the palette of the flag
|
nu->spal = np->pal = sp->pal; // Set the palette of the flag
|
||||||
|
|
||||||
SetOwner(pp->PlayerSprite,new); // Player now owns the flag
|
SetOwner(pp->PlayerSprite,New); // Player now owns the flag
|
||||||
nu->FlagOwner = SpriteNum; // Tell carried flag who owns it
|
nu->FlagOwner = SpriteNum; // Tell carried flag who owns it
|
||||||
KillGet(SpriteNum); // Set up for flag respawning
|
KillGet(SpriteNum); // Set up for flag respawning
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -324,13 +324,13 @@ int
|
||||||
TrackClonePoint(short SpriteNum)
|
TrackClonePoint(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum], np;
|
SPRITEp sp = &sprite[SpriteNum], np;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = COVERinsertsprite(sp->sectnum, sp->statnum);
|
New = COVERinsertsprite(sp->sectnum, sp->statnum);
|
||||||
|
|
||||||
ASSERT(new != -1);
|
ASSERT(New != -1);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
|
|
||||||
np->cstat = np->extra = 0;
|
np->cstat = np->extra = 0;
|
||||||
np->x = sp->x;
|
np->x = sp->x;
|
||||||
|
@ -340,7 +340,7 @@ TrackClonePoint(short SpriteNum)
|
||||||
np->lotag = sp->lotag;
|
np->lotag = sp->lotag;
|
||||||
np->hitag = sp->hitag;
|
np->hitag = sp->hitag;
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickJumpSetup(short stat, short lotag, short type)
|
void QuickJumpSetup(short stat, short lotag, short type)
|
||||||
|
@ -593,7 +593,7 @@ TrackSetup(void)
|
||||||
TRACKp t;
|
TRACKp t;
|
||||||
SPRITEp nsp;
|
SPRITEp nsp;
|
||||||
short new_sprite1, new_sprite2;
|
short new_sprite1, new_sprite2;
|
||||||
TRACK_POINTp new;
|
TRACK_POINTp New;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
// put points on track
|
// put points on track
|
||||||
|
@ -678,10 +678,10 @@ TrackSetup(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
size = (Track[ndx].NumPoints + 1) * sizeof(TRACK_POINT);
|
size = (Track[ndx].NumPoints + 1) * sizeof(TRACK_POINT);
|
||||||
new = CallocMem(size, 1);
|
New = CallocMem(size, 1);
|
||||||
memcpy(new, Track[ndx].TrackPoint, size);
|
memcpy(New, Track[ndx].TrackPoint, size);
|
||||||
FreeMem(Track[ndx].TrackPoint);
|
FreeMem(Track[ndx].TrackPoint);
|
||||||
Track[ndx].TrackPoint = new;
|
Track[ndx].TrackPoint = New;
|
||||||
|
|
||||||
ASSERT(Track[ndx].TrackPoint != NULL);
|
ASSERT(Track[ndx].TrackPoint != NULL);
|
||||||
}
|
}
|
||||||
|
@ -1033,7 +1033,7 @@ SetupSectorObject(short sectnum, short tag)
|
||||||
short object_num, ndx = 0, startwall, endwall, SpriteNum, NextSprite;
|
short object_num, ndx = 0, startwall, endwall, SpriteNum, NextSprite;
|
||||||
int trash;
|
int trash;
|
||||||
short j, k;
|
short j, k;
|
||||||
short new;
|
short New;
|
||||||
USERp u;
|
USERp u;
|
||||||
|
|
||||||
tag -= (TAG_OBJECT_CENTER - 1);
|
tag -= (TAG_OBJECT_CENTER - 1);
|
||||||
|
@ -1117,10 +1117,10 @@ SetupSectorObject(short sectnum, short tag)
|
||||||
sop->track = HIGH_TAG(sectnum);
|
sop->track = HIGH_TAG(sectnum);
|
||||||
|
|
||||||
// spawn a sprite to make it easier to integrate with sprite routines
|
// spawn a sprite to make it easier to integrate with sprite routines
|
||||||
new = SpawnSprite(STAT_SO_SP_CHILD, 0, NULL, sectnum,
|
New = SpawnSprite(STAT_SO_SP_CHILD, 0, NULL, sectnum,
|
||||||
sop->xmid, sop->ymid, sop->zmid, 0, 0);
|
sop->xmid, sop->ymid, sop->zmid, 0, 0);
|
||||||
sop->sp_child = &sprite[new];
|
sop->sp_child = &sprite[New];
|
||||||
u = User[new];
|
u = User[New];
|
||||||
u->sop_parent = sop;
|
u->sop_parent = sop;
|
||||||
SET(u->Flags2, SPR2_SPRITE_FAKE_BLOCK); // for damage test
|
SET(u->Flags2, SPR2_SPRITE_FAKE_BLOCK); // for damage test
|
||||||
|
|
||||||
|
|
|
@ -4112,7 +4112,7 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu, u;
|
USERp nu, u;
|
||||||
short i,new;
|
short i,New;
|
||||||
|
|
||||||
|
|
||||||
// state, id, num, zlevel, min_jspeed, max_jspeed, min_vel, max_vel,
|
// state, id, num, zlevel, min_jspeed, max_jspeed, min_vel, max_vel,
|
||||||
|
@ -4278,10 +4278,10 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i
|
||||||
|
|
||||||
for (i = 0; i < p->num; i++)
|
for (i = 0; i < p->num; i++)
|
||||||
{
|
{
|
||||||
new = SpawnSprite(STAT_SKIP4, p->id, p->state, sp->sectnum,
|
New = SpawnSprite(STAT_SKIP4, p->id, p->state, sp->sectnum,
|
||||||
hit_x, hit_y, hit_z, hit_ang, 0);
|
hit_x, hit_y, hit_z, hit_ang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
switch (nu->ID)
|
switch (nu->ID)
|
||||||
{
|
{
|
||||||
|
@ -4338,7 +4338,7 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i
|
||||||
nu->jump_speed += RANDOM_RANGE(p->max_jspeed - p->min_jspeed);
|
nu->jump_speed += RANDOM_RANGE(p->max_jspeed - p->min_jspeed);
|
||||||
nu->jump_speed = -nu->jump_speed;
|
nu->jump_speed = -nu->jump_speed;
|
||||||
|
|
||||||
//setspritez(new, (vec3_t *)np);
|
//setspritez(New, (vec3_t *)np);
|
||||||
nu->xchange = MOVEx(np->xvel, np->ang);
|
nu->xchange = MOVEx(np->xvel, np->ang);
|
||||||
nu->ychange = MOVEy(np->xvel, np->ang);
|
nu->ychange = MOVEy(np->xvel, np->ang);
|
||||||
|
|
||||||
|
@ -4348,7 +4348,7 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i
|
||||||
|
|
||||||
SET(u->Flags, SPR_BOUNCE);
|
SET(u->Flags, SPR_BOUNCE);
|
||||||
|
|
||||||
DoBeginJump(new);
|
DoBeginJump(New);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9195,15 +9195,15 @@ DoGrenade(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 100);
|
sp->x, sp->y, sp->z, sp->ang, 100);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
SetOwner(Weapon, new);
|
SetOwner(Weapon, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 40;
|
np->xrepeat = 40;
|
||||||
np->yrepeat = 40;
|
np->yrepeat = 40;
|
||||||
|
@ -9217,7 +9217,7 @@ DoGrenade(int16_t Weapon)
|
||||||
nu->ychange = u->ychange;
|
nu->ychange = u->ychange;
|
||||||
nu->zchange = u->zchange;
|
nu->zchange = u->zchange;
|
||||||
|
|
||||||
ScaleSpriteVector(new, 22000);
|
ScaleSpriteVector(New, 22000);
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
SET(nu->Flags, SPR_UNDERWATER);
|
SET(nu->Flags, SPR_UNDERWATER);
|
||||||
|
@ -9870,7 +9870,7 @@ DoTracer(int16_t Weapon)
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
short spawn_count = 0;
|
short spawn_count = 0;
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
|
@ -9902,7 +9902,7 @@ DoEMP(int16_t Weapon)
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
short spawn_count = 0;
|
short spawn_count = 0;
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
|
@ -9999,7 +9999,7 @@ DoTankShell(int16_t Weapon)
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
short spawn_count = 0;
|
short spawn_count = 0;
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
|
@ -10031,7 +10031,7 @@ DoTracerStart(int16_t Weapon)
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
short spawn_count = 0;
|
short spawn_count = 0;
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
|
@ -10059,7 +10059,7 @@ DoLaser(int16_t Weapon)
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
short spawn_count = 0;
|
short spawn_count = 0;
|
||||||
|
|
||||||
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
||||||
|
@ -10083,10 +10083,10 @@ DoLaser(int16_t Weapon)
|
||||||
spawn_count++;
|
spawn_count++;
|
||||||
if (spawn_count < 256)
|
if (spawn_count < 256)
|
||||||
{
|
{
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, s_LaserPuff, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, s_LaserPuff, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 0);
|
sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 16;
|
np->xrepeat = 16;
|
||||||
|
@ -10137,7 +10137,7 @@ DoRail(int16_t Weapon)
|
||||||
short NewWeapon;
|
short NewWeapon;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
short spawn_count = 0;
|
short spawn_count = 0;
|
||||||
|
|
||||||
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
||||||
|
@ -10187,18 +10187,18 @@ DoRail(int16_t Weapon)
|
||||||
spawn_count++;
|
spawn_count++;
|
||||||
if (spawn_count < 128)
|
if (spawn_count < 128)
|
||||||
{
|
{
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, &s_RailPuff[0][0], sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, &s_RailPuff[0][0], sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 20);
|
sp->x, sp->y, sp->z, sp->ang, 20);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->xvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
|
np->xvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
|
||||||
np->yvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
|
np->yvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
|
||||||
np->zvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
|
np->zvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
|
||||||
|
|
||||||
nu->RotNum = 5;
|
nu->RotNum = 5;
|
||||||
NewStateGroup(new, sg_RailPuff);
|
NewStateGroup(New, sg_RailPuff);
|
||||||
|
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 10;
|
np->xrepeat = 10;
|
||||||
|
@ -10213,7 +10213,7 @@ DoRail(int16_t Weapon)
|
||||||
nu->ychange = u->ychange;
|
nu->ychange = u->ychange;
|
||||||
nu->zchange = u->zchange;
|
nu->zchange = u->zchange;
|
||||||
|
|
||||||
ScaleSpriteVector(new, 1500);
|
ScaleSpriteVector(New, 1500);
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
SET(nu->Flags, SPR_UNDERWATER);
|
SET(nu->Flags, SPR_UNDERWATER);
|
||||||
|
@ -10229,7 +10229,7 @@ DoRailStart(int16_t Weapon)
|
||||||
int32_t dax, day, daz;
|
int32_t dax, day, daz;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
||||||
|
|
||||||
|
@ -10309,15 +10309,15 @@ DoRocket(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
||||||
u->ox, u->oy, u->oz, sp->ang, 100);
|
u->ox, u->oy, u->oz, sp->ang, 100);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
SetOwner(Weapon, new);
|
SetOwner(Weapon, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 40;
|
np->xrepeat = 40;
|
||||||
np->yrepeat = 40;
|
np->yrepeat = 40;
|
||||||
|
@ -10331,7 +10331,7 @@ DoRocket(int16_t Weapon)
|
||||||
nu->ychange = u->ychange;
|
nu->ychange = u->ychange;
|
||||||
nu->zchange = u->zchange;
|
nu->zchange = u->zchange;
|
||||||
|
|
||||||
ScaleSpriteVector(new, 20000);
|
ScaleSpriteVector(New, 20000);
|
||||||
|
|
||||||
//nu->zchange -= Z(8);
|
//nu->zchange -= Z(8);
|
||||||
|
|
||||||
|
@ -10349,7 +10349,7 @@ DoMicroMini(int16_t Weapon)
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
short spawn_count = 0;
|
short spawn_count = 0;
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
|
@ -10418,7 +10418,7 @@ DoMicro(int16_t Weapon)
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &sprite[Weapon];
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
int32_t dax, day, daz;
|
int32_t dax, day, daz;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
if (SW_SHAREWARE) return FALSE; // JBF: verify
|
||||||
|
|
||||||
|
@ -10437,13 +10437,13 @@ DoMicro(int16_t Weapon)
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, s_Puff, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 100);
|
sp->x, sp->y, sp->z, sp->ang, 100);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
SetOwner(sp->owner, new);
|
SetOwner(sp->owner, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 20;
|
np->xrepeat = 20;
|
||||||
np->yrepeat = 20;
|
np->yrepeat = 20;
|
||||||
|
@ -10458,7 +10458,7 @@ DoMicro(int16_t Weapon)
|
||||||
nu->ychange = u->ychange;
|
nu->ychange = u->ychange;
|
||||||
nu->zchange = u->zchange;
|
nu->zchange = u->zchange;
|
||||||
|
|
||||||
ScaleSpriteVector(new, 20000);
|
ScaleSpriteVector(New, 20000);
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
SET(nu->Flags, SPR_UNDERWATER);
|
SET(nu->Flags, SPR_UNDERWATER);
|
||||||
|
@ -10466,7 +10466,7 @@ DoMicro(int16_t Weapon)
|
||||||
// last smoke
|
// last smoke
|
||||||
if ((u->WaitTics -= MISSILEMOVETICS) <= 0)
|
if ((u->WaitTics -= MISSILEMOVETICS) <= 0)
|
||||||
{
|
{
|
||||||
setspritez(new, (vec3_t *)np);
|
setspritez(New, (vec3_t *)np);
|
||||||
NewStateGroup(Weapon, &sg_MicroMini[0]);
|
NewStateGroup(Weapon, &sg_MicroMini[0]);
|
||||||
sp->xrepeat = sp->yrepeat = 10;
|
sp->xrepeat = sp->yrepeat = 10;
|
||||||
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||||
|
@ -10824,7 +10824,7 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
|
||||||
USERp eu = User[enemy];
|
USERp eu = User[enemy];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -10882,15 +10882,15 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 0);
|
sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->hitag = LUMINOUS; //Always full brightness
|
np->hitag = LUMINOUS; //Always full brightness
|
||||||
|
|
||||||
if (enemy >= 0)
|
if (enemy >= 0)
|
||||||
eu->flame = new;
|
eu->flame = New;
|
||||||
|
|
||||||
np->xrepeat = 16;
|
np->xrepeat = 16;
|
||||||
np->yrepeat = 16;
|
np->yrepeat = 16;
|
||||||
|
@ -10912,7 +10912,7 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
|
||||||
nu->Counter = 48; // max flame size
|
nu->Counter = 48; // max flame size
|
||||||
}
|
}
|
||||||
|
|
||||||
SetOwner(sp->owner, new);
|
SetOwner(sp->owner, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->pal = nu->spal = u->spal;
|
np->pal = nu->spal = u->spal;
|
||||||
SET(np->cstat, CSTAT_SPRITE_YCENTER);
|
SET(np->cstat, CSTAT_SPRITE_YCENTER);
|
||||||
|
@ -10923,27 +10923,27 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
|
||||||
|
|
||||||
if (enemy >= 0)
|
if (enemy >= 0)
|
||||||
{
|
{
|
||||||
SetAttach(enemy, new);
|
SetAttach(enemy, New);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (TestDontStickSector(np->sectnum))
|
if (TestDontStickSector(np->sectnum))
|
||||||
{
|
{
|
||||||
KillSprite(new);
|
KillSprite(New);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
nu->floor_dist = nu->ceiling_dist = 0;
|
nu->floor_dist = nu->ceiling_dist = 0;
|
||||||
|
|
||||||
DoFindGround(new);
|
DoFindGround(New);
|
||||||
nu->jump_speed = 0;
|
nu->jump_speed = 0;
|
||||||
DoBeginJump(new);
|
DoBeginJump(New);
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaySound(DIGI_FIRE1,&np->x,&np->y,&np->z,v3df_dontpan|v3df_doppler);
|
PlaySound(DIGI_FIRE1,&np->x,&np->y,&np->z,v3df_dontpan|v3df_doppler);
|
||||||
Set3DSoundOwner(new);
|
Set3DSoundOwner(New);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10956,12 +10956,12 @@ SpawnBreakFlames(int16_t SpriteNum, int16_t enemy)
|
||||||
USERp eu = User[enemy];
|
USERp eu = User[enemy];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, FIREBALL_FLAMES+1, s_BreakFlames, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, FIREBALL_FLAMES+1, s_BreakFlames, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 0);
|
sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->hitag = LUMINOUS; //Always full brightness
|
np->hitag = LUMINOUS; //Always full brightness
|
||||||
|
|
||||||
|
@ -10969,7 +10969,7 @@ SpawnBreakFlames(int16_t SpriteNum, int16_t enemy)
|
||||||
np->yrepeat = 16;
|
np->yrepeat = 16;
|
||||||
nu->Counter = 48; // max flame size
|
nu->Counter = 48; // max flame size
|
||||||
|
|
||||||
//SetOwner(sp->owner, new);
|
//SetOwner(sp->owner, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
if (u)
|
if (u)
|
||||||
np->pal = nu->spal = u->spal;
|
np->pal = nu->spal = u->spal;
|
||||||
|
@ -10980,14 +10980,14 @@ SpawnBreakFlames(int16_t SpriteNum, int16_t enemy)
|
||||||
|
|
||||||
nu->floor_dist = nu->ceiling_dist = 0;
|
nu->floor_dist = nu->ceiling_dist = 0;
|
||||||
|
|
||||||
DoFindGround(new);
|
DoFindGround(New);
|
||||||
nu->jump_speed = 0;
|
nu->jump_speed = 0;
|
||||||
DoBeginJump(new);
|
DoBeginJump(New);
|
||||||
|
|
||||||
PlaySound(DIGI_FIRE1,&np->x,&np->y,&np->z,v3df_dontpan|v3df_doppler);
|
PlaySound(DIGI_FIRE1,&np->x,&np->y,&np->z,v3df_dontpan|v3df_doppler);
|
||||||
Set3DSoundOwner(new);
|
Set3DSoundOwner(New);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10998,12 +10998,12 @@ SpawnBreakStaticFlames(int16_t SpriteNum)
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_STATIC_FIRE, FIREBALL_FLAMES, NULL, sp->sectnum,
|
New = SpawnSprite(STAT_STATIC_FIRE, FIREBALL_FLAMES, NULL, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 0);
|
sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
if (RANDOM_RANGE(1000) > 500)
|
if (RANDOM_RANGE(1000) > 500)
|
||||||
np->picnum = 3143;
|
np->picnum = 3143;
|
||||||
|
@ -11018,7 +11018,7 @@ SpawnBreakStaticFlames(int16_t SpriteNum)
|
||||||
np->yrepeat = 32;
|
np->yrepeat = 32;
|
||||||
//nu->Counter = 48; // max flame size
|
//nu->Counter = 48; // max flame size
|
||||||
|
|
||||||
//SetOwner(sp->owner, new);
|
//SetOwner(sp->owner, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->pal = nu->spal = u->spal;
|
np->pal = nu->spal = u->spal;
|
||||||
//SET(np->cstat, CSTAT_SPRITE_YCENTER);
|
//SET(np->cstat, CSTAT_SPRITE_YCENTER);
|
||||||
|
@ -11030,14 +11030,14 @@ SpawnBreakStaticFlames(int16_t SpriteNum)
|
||||||
|
|
||||||
np->z = getflorzofslope(np->sectnum,np->x,np->y);
|
np->z = getflorzofslope(np->sectnum,np->x,np->y);
|
||||||
|
|
||||||
//DoFindGround(new);
|
//DoFindGround(New);
|
||||||
//nu->jump_speed = 0;
|
//nu->jump_speed = 0;
|
||||||
//DoBeginJump(new);
|
//DoBeginJump(New);
|
||||||
|
|
||||||
PlaySound(DIGI_FIRE1,&np->x,&np->y,&np->z,v3df_dontpan|v3df_doppler);
|
PlaySound(DIGI_FIRE1,&np->x,&np->y,&np->z,v3df_dontpan|v3df_doppler);
|
||||||
Set3DSoundOwner(new);
|
Set3DSoundOwner(New);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -12702,7 +12702,7 @@ DoMirv(int16_t Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon], np;
|
SPRITEp sp = &sprite[Weapon], np;
|
||||||
USERp u = User[Weapon], nu;
|
USERp u = User[Weapon], nu;
|
||||||
short new;
|
short New;
|
||||||
int offset;
|
int offset;
|
||||||
int ox, oy, oz;
|
int ox, oy, oz;
|
||||||
|
|
||||||
|
@ -12758,18 +12758,18 @@ DoMirv(int16_t Weapon)
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
new = SpawnSprite(STAT_MISSILE, MIRV_METEOR, &sg_MirvMeteor[0][0], sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, MIRV_METEOR, &sg_MirvMeteor[0][0], sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, NORM_ANGLE(sp->ang + angs[i]), 800);
|
sp->x, sp->y, sp->z, NORM_ANGLE(sp->ang + angs[i]), 800);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
nu->RotNum = 5;
|
nu->RotNum = 5;
|
||||||
NewStateGroup(new, &sg_MirvMeteor[0]);
|
NewStateGroup(New, &sg_MirvMeteor[0]);
|
||||||
nu->StateEnd = s_MirvMeteorExp;
|
nu->StateEnd = s_MirvMeteorExp;
|
||||||
|
|
||||||
//np->owner = Weapon;
|
//np->owner = Weapon;
|
||||||
SetOwner(Weapon, new);
|
SetOwner(Weapon, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 40;
|
np->xrepeat = 40;
|
||||||
np->yrepeat = 40;
|
np->yrepeat = 40;
|
||||||
|
@ -13382,7 +13382,7 @@ InitSerpRing(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP, np;
|
SPRITEp sp = User[SpriteNum]->SpriteP, np;
|
||||||
USERp u = User[SpriteNum], nu;
|
USERp u = User[SpriteNum], nu;
|
||||||
short ang, ang_diff, ang_start, ang_finish, missiles, new;
|
short ang, ang_diff, ang_start, ang_finish, missiles, New;
|
||||||
short max_missiles;
|
short max_missiles;
|
||||||
|
|
||||||
#define SERP_RING_DIST 2800 // Was 3500
|
#define SERP_RING_DIST 2800 // Was 3500
|
||||||
|
@ -13403,14 +13403,14 @@ InitSerpRing(short SpriteNum)
|
||||||
|
|
||||||
for (missiles = 0, ang = ang_start; missiles < max_missiles; ang += ang_diff, missiles++)
|
for (missiles = 0, ang = ang_start; missiles < max_missiles; ang += ang_diff, missiles++)
|
||||||
{
|
{
|
||||||
new = SpawnSprite(STAT_SKIP4, SKULL_SERP, &s_SkullRing[0][0], sp->sectnum, sp->x, sp->y, sp->z, ang, 0);
|
New = SpawnSprite(STAT_SKIP4, SKULL_SERP, &s_SkullRing[0][0], sp->sectnum, sp->x, sp->y, sp->z, ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->xvel = 500;
|
np->xvel = 500;
|
||||||
//np->owner = SpriteNum;
|
//np->owner = SpriteNum;
|
||||||
SetOwner(SpriteNum, new);
|
SetOwner(SpriteNum, New);
|
||||||
np->shade = -20;
|
np->shade = -20;
|
||||||
np->xrepeat = 64;
|
np->xrepeat = 64;
|
||||||
np->yrepeat = 64;
|
np->yrepeat = 64;
|
||||||
|
@ -13438,8 +13438,8 @@ InitSerpRing(short SpriteNum)
|
||||||
nu->Rot = sg_SkullRing;
|
nu->Rot = sg_SkullRing;
|
||||||
|
|
||||||
// defaults do change the statnum
|
// defaults do change the statnum
|
||||||
EnemyDefaults(new, NULL, NULL);
|
EnemyDefaults(New, NULL, NULL);
|
||||||
change_sprite_stat(new, STAT_SKIP4);
|
change_sprite_stat(New, STAT_SKIP4);
|
||||||
RESET(np->extra, SPRX_PLAYER_OR_ENEMY);
|
RESET(np->extra, SPRX_PLAYER_OR_ENEMY);
|
||||||
|
|
||||||
np->clipdist = (128+64) >> 2;
|
np->clipdist = (128+64) >> 2;
|
||||||
|
@ -13458,7 +13458,7 @@ InitSerpRing2(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP, np;
|
SPRITEp sp = User[SpriteNum]->SpriteP, np;
|
||||||
USERp u = User[SpriteNum], nu;
|
USERp u = User[SpriteNum], nu;
|
||||||
short ang, ang_diff, ang_start, ang_finish, missiles, new;
|
short ang, ang_diff, ang_start, ang_finish, missiles, New;
|
||||||
short max_missiles;
|
short max_missiles;
|
||||||
short i;
|
short i;
|
||||||
|
|
||||||
|
@ -13482,13 +13482,13 @@ InitSerpRing2(short SpriteNum)
|
||||||
|
|
||||||
for (missiles = 0, ang = ang_start; missiles < max_missiles; ang += ang_diff, missiles++)
|
for (missiles = 0, ang = ang_start; missiles < max_missiles; ang += ang_diff, missiles++)
|
||||||
{
|
{
|
||||||
new = SpawnSprite(STAT_MISSILE_SKIP4, SKULL_SERP, &s_SkullRing[0][0], sp->sectnum, sp->x, sp->y, sp->z, ang, 0);
|
New = SpawnSprite(STAT_MISSILE_SKIP4, SKULL_SERP, &s_SkullRing[0][0], sp->sectnum, sp->x, sp->y, sp->z, ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
//np->owner = SpriteNum;
|
//np->owner = SpriteNum;
|
||||||
SetOwner(SpriteNum, new);
|
SetOwner(SpriteNum, New);
|
||||||
np->shade = -20;
|
np->shade = -20;
|
||||||
np->xrepeat = 64;
|
np->xrepeat = 64;
|
||||||
np->yrepeat = 64;
|
np->yrepeat = 64;
|
||||||
|
@ -13516,9 +13516,9 @@ InitSerpRing2(short SpriteNum)
|
||||||
nu->Rot = sg_SkullRing;
|
nu->Rot = sg_SkullRing;
|
||||||
|
|
||||||
// defaults do change the statnum
|
// defaults do change the statnum
|
||||||
EnemyDefaults(new, NULL, NULL);
|
EnemyDefaults(New, NULL, NULL);
|
||||||
RESET(np->extra, SPRX_PLAYER_OR_ENEMY);
|
RESET(np->extra, SPRX_PLAYER_OR_ENEMY);
|
||||||
change_sprite_stat(new, STAT_MISSILE_SKIP4);
|
change_sprite_stat(New, STAT_MISSILE_SKIP4);
|
||||||
|
|
||||||
np->clipdist = (128+64) >> 2;
|
np->clipdist = (128+64) >> 2;
|
||||||
SET(nu->Flags, SPR_XFLIP_TOGGLE);
|
SET(nu->Flags, SPR_XFLIP_TOGGLE);
|
||||||
|
@ -14291,7 +14291,7 @@ InitSumoSkull(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = User[SpriteNum]->SpriteP, np;
|
SPRITEp sp = User[SpriteNum]->SpriteP, np;
|
||||||
USERp u = User[SpriteNum], nu;
|
USERp u = User[SpriteNum], nu;
|
||||||
short ang, ang_diff, ang_start, ang_finish, missiles, new;
|
short ang, ang_diff, ang_start, ang_finish, missiles, New;
|
||||||
short max_missiles;
|
short max_missiles;
|
||||||
|
|
||||||
extern STATE s_SkullExplode[];
|
extern STATE s_SkullExplode[];
|
||||||
|
@ -14302,13 +14302,13 @@ InitSumoSkull(short SpriteNum)
|
||||||
|
|
||||||
PlaySound(DIGI_SERPSUMMONHEADS, &sp->x, &sp->y, &sp->z, v3df_none);
|
PlaySound(DIGI_SERPSUMMONHEADS, &sp->x, &sp->y, &sp->z, v3df_none);
|
||||||
|
|
||||||
new = SpawnSprite(STAT_ENEMY, SKULL_R0, &s_SkullWait[0][0], sp->sectnum, sp->x, sp->y, SPRITEp_MID(sp), sp->ang, 0);
|
New = SpawnSprite(STAT_ENEMY, SKULL_R0, &s_SkullWait[0][0], sp->sectnum, sp->x, sp->y, SPRITEp_MID(sp), sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->xvel = 500;
|
np->xvel = 500;
|
||||||
SetOwner(SpriteNum, new);
|
SetOwner(SpriteNum, New);
|
||||||
np->shade = -20;
|
np->shade = -20;
|
||||||
np->xrepeat = 64;
|
np->xrepeat = 64;
|
||||||
np->yrepeat = 64;
|
np->yrepeat = 64;
|
||||||
|
@ -14331,8 +14331,8 @@ InitSumoSkull(short SpriteNum)
|
||||||
nu->Health = 100;
|
nu->Health = 100;
|
||||||
|
|
||||||
// defaults do change the statnum
|
// defaults do change the statnum
|
||||||
EnemyDefaults(new, NULL, NULL);
|
EnemyDefaults(New, NULL, NULL);
|
||||||
//change_sprite_stat(new, STAT_SKIP4);
|
//change_sprite_stat(New, STAT_SKIP4);
|
||||||
SET(np->extra, SPRX_PLAYER_OR_ENEMY);
|
SET(np->extra, SPRX_PLAYER_OR_ENEMY);
|
||||||
|
|
||||||
np->clipdist = (128+64) >> 2;
|
np->clipdist = (128+64) >> 2;
|
||||||
|
@ -16432,7 +16432,7 @@ InitSerpSpell(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum], np;
|
SPRITEp sp = &sprite[SpriteNum], np;
|
||||||
USERp u = User[SpriteNum], nu;
|
USERp u = User[SpriteNum], nu;
|
||||||
int dist;
|
int dist;
|
||||||
short new, save_ang, i;
|
short New, save_ang, i;
|
||||||
short oclipdist;
|
short oclipdist;
|
||||||
|
|
||||||
static short lat_ang[] =
|
static short lat_ang[] =
|
||||||
|
@ -16449,20 +16449,20 @@ InitSerpSpell(short SpriteNum)
|
||||||
{
|
{
|
||||||
sp->ang = getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y);
|
sp->ang = getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y);
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 1500);
|
sp->x, sp->y, sp->z, sp->ang, 1500);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
np->z = SPRITEp_TOS(sp);
|
np->z = SPRITEp_TOS(sp);
|
||||||
|
|
||||||
nu->RotNum = 5;
|
nu->RotNum = 5;
|
||||||
NewStateGroup(new, &sg_SerpMeteor[0]);
|
NewStateGroup(New, &sg_SerpMeteor[0]);
|
||||||
nu->StateEnd = s_MirvMeteorExp;
|
nu->StateEnd = s_MirvMeteorExp;
|
||||||
|
|
||||||
//np->owner = SpriteNum;
|
//np->owner = SpriteNum;
|
||||||
SetOwner(SpriteNum, new);
|
SetOwner(SpriteNum, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
PlaySound(DIGI_SERPMAGICLAUNCH, &sp->x, &sp->y, &sp->z, v3df_none);
|
PlaySound(DIGI_SERPMAGICLAUNCH, &sp->x, &sp->y, &sp->z, v3df_none);
|
||||||
nu->spal = np->pal = 27; // Bright Green
|
nu->spal = np->pal = 27; // Bright Green
|
||||||
|
@ -16480,7 +16480,7 @@ InitSerpSpell(short SpriteNum)
|
||||||
sp->clipdist = 1;
|
sp->clipdist = 1;
|
||||||
|
|
||||||
np->ang = NORM_ANGLE(np->ang + lat_ang[i]);
|
np->ang = NORM_ANGLE(np->ang + lat_ang[i]);
|
||||||
HelpMissileLateral(new, 4200L);
|
HelpMissileLateral(New, 4200L);
|
||||||
np->ang = NORM_ANGLE(np->ang - lat_ang[i]);
|
np->ang = NORM_ANGLE(np->ang - lat_ang[i]);
|
||||||
|
|
||||||
// find the distance to the target (player)
|
// find the distance to the target (player)
|
||||||
|
@ -16494,7 +16494,7 @@ InitSerpSpell(short SpriteNum)
|
||||||
nu->ychange = MOVEy(np->xvel, np->ang);
|
nu->ychange = MOVEy(np->xvel, np->ang);
|
||||||
nu->zchange = np->zvel;
|
nu->zchange = np->zvel;
|
||||||
|
|
||||||
MissileSetPos(new, DoMirvMissile, 400);
|
MissileSetPos(New, DoMirvMissile, 400);
|
||||||
sp->clipdist = oclipdist;
|
sp->clipdist = oclipdist;
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
|
@ -16549,7 +16549,7 @@ InitSerpMonstSpell(short SpriteNum)
|
||||||
SPRITEp sp = &sprite[SpriteNum], np;
|
SPRITEp sp = &sprite[SpriteNum], np;
|
||||||
USERp u = User[SpriteNum], nu;
|
USERp u = User[SpriteNum], nu;
|
||||||
int dist;
|
int dist;
|
||||||
short new, save_ang, i;
|
short New, save_ang, i;
|
||||||
short oclipdist;
|
short oclipdist;
|
||||||
|
|
||||||
static short lat_ang[] =
|
static short lat_ang[] =
|
||||||
|
@ -16568,21 +16568,21 @@ InitSerpMonstSpell(short SpriteNum)
|
||||||
{
|
{
|
||||||
sp->ang = getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y);
|
sp->ang = getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y);
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 500);
|
sp->x, sp->y, sp->z, sp->ang, 500);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
nu->spal = np->pal = 25; // Bright Red
|
nu->spal = np->pal = 25; // Bright Red
|
||||||
np->z = SPRITEp_TOS(sp);
|
np->z = SPRITEp_TOS(sp);
|
||||||
|
|
||||||
nu->RotNum = 5;
|
nu->RotNum = 5;
|
||||||
NewStateGroup(new, &sg_SerpMeteor[0]);
|
NewStateGroup(New, &sg_SerpMeteor[0]);
|
||||||
//nu->StateEnd = s_MirvMeteorExp;
|
//nu->StateEnd = s_MirvMeteorExp;
|
||||||
nu->StateEnd = s_TeleportEffect2;
|
nu->StateEnd = s_TeleportEffect2;
|
||||||
|
|
||||||
SetOwner(SpriteNum, new);
|
SetOwner(SpriteNum, New);
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 122;
|
np->xrepeat = 122;
|
||||||
np->yrepeat = 116;
|
np->yrepeat = 116;
|
||||||
|
@ -16599,7 +16599,7 @@ InitSerpMonstSpell(short SpriteNum)
|
||||||
sp->clipdist = 1;
|
sp->clipdist = 1;
|
||||||
|
|
||||||
np->ang = NORM_ANGLE(np->ang + lat_ang[i]);
|
np->ang = NORM_ANGLE(np->ang + lat_ang[i]);
|
||||||
HelpMissileLateral(new, 4200L);
|
HelpMissileLateral(New, 4200L);
|
||||||
np->ang = NORM_ANGLE(np->ang - lat_ang[i]);
|
np->ang = NORM_ANGLE(np->ang - lat_ang[i]);
|
||||||
|
|
||||||
// find the distance to the target (player)
|
// find the distance to the target (player)
|
||||||
|
@ -16613,7 +16613,7 @@ InitSerpMonstSpell(short SpriteNum)
|
||||||
nu->ychange = MOVEy(np->xvel, np->ang);
|
nu->ychange = MOVEy(np->xvel, np->ang);
|
||||||
nu->zchange = np->zvel;
|
nu->zchange = np->zvel;
|
||||||
|
|
||||||
MissileSetPos(new, DoMirvMissile, 400);
|
MissileSetPos(New, DoMirvMissile, 400);
|
||||||
sp->clipdist = oclipdist;
|
sp->clipdist = oclipdist;
|
||||||
|
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
|
@ -17719,7 +17719,7 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, short hit_sect, short hit_wall, in
|
||||||
USERp hu = User[hit_sprite];
|
USERp hu = User[hit_sprite];
|
||||||
SPRITEp wp;
|
SPRITEp wp;
|
||||||
USERp wu;
|
USERp wu;
|
||||||
short new;
|
short New;
|
||||||
short id;
|
short id;
|
||||||
|
|
||||||
// hit a NPC or PC?
|
// hit a NPC or PC?
|
||||||
|
@ -17737,9 +17737,9 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, short hit_sect, short hit_wall, in
|
||||||
|
|
||||||
if (ID>0) id = ID;
|
if (ID>0) id = ID;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, id, s_UziSmoke, 0, hit_x, hit_y, hit_z, sp->ang, 0);
|
New = SpawnSprite(STAT_MISSILE, id, s_UziSmoke, 0, hit_x, hit_y, hit_z, sp->ang, 0);
|
||||||
wp = &sprite[new];
|
wp = &sprite[New];
|
||||||
wu = User[new];
|
wu = User[New];
|
||||||
wp->shade = -40;
|
wp->shade = -40;
|
||||||
|
|
||||||
if (hu->PlayerP)
|
if (hu->PlayerP)
|
||||||
|
@ -17767,10 +17767,10 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, short hit_sect, short hit_wall, in
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetOwner(sp - sprite, new);
|
SetOwner(sp - sprite, New);
|
||||||
wp->ang = sp->ang;
|
wp->ang = sp->ang;
|
||||||
|
|
||||||
setspritez(new, &hit_pos);
|
setspritez(New, &hit_pos);
|
||||||
SET(wp->cstat, CSTAT_SPRITE_YCENTER);
|
SET(wp->cstat, CSTAT_SPRITE_YCENTER);
|
||||||
RESET(wp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(wp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
|
||||||
|
@ -17791,7 +17791,7 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, short hit_sect, short hit_wall, in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoHitscanDamage(new, hit_sprite);
|
DoHitscanDamage(New, hit_sprite);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -20433,16 +20433,16 @@ SpawnVehicleSmoke(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum],np;
|
SPRITEp sp = &sprite[SpriteNum],np;
|
||||||
USERp u = User[SpriteNum],nu;
|
USERp u = User[SpriteNum],nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
if (MoveSkip2 != 0)
|
if (MoveSkip2 != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, s_VehicleSmoke, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, s_VehicleSmoke, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
nu->WaitTics = 1*120;
|
nu->WaitTics = 1*120;
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
|
@ -20470,13 +20470,13 @@ SpawnSmokePuff(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum],np;
|
SPRITEp sp = &sprite[SpriteNum],np;
|
||||||
USERp u = User[SpriteNum],nu;
|
USERp u = User[SpriteNum],nu;
|
||||||
short new;
|
short New;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_MISSILE, PUFF, s_WaterSmoke, sp->sectnum,
|
New = SpawnSprite(STAT_MISSILE, PUFF, s_WaterSmoke, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
|
|
||||||
nu->WaitTics = 1*120;
|
nu->WaitTics = 1*120;
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
|
|
|
@ -776,7 +776,7 @@ SetupZombie(short SpriteNum)
|
||||||
int
|
int
|
||||||
SpawnZombie(PLAYERp pp, short Weapon)
|
SpawnZombie(PLAYERp pp, short Weapon)
|
||||||
{
|
{
|
||||||
short new,i,nexti;
|
short New,i,nexti;
|
||||||
SPRITEp np,sp;
|
SPRITEp np,sp;
|
||||||
USERp nu,u;
|
USERp nu,u;
|
||||||
short owner;
|
short owner;
|
||||||
|
@ -788,20 +788,20 @@ SpawnZombie(PLAYERp pp, short Weapon)
|
||||||
|
|
||||||
//Zombies++;
|
//Zombies++;
|
||||||
|
|
||||||
new = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->pang, 0);
|
New = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->pang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
np->sectnum = pp->cursectnum;
|
np->sectnum = pp->cursectnum;
|
||||||
np->owner = owner;
|
np->owner = owner;
|
||||||
np->pal = nu->spal = User[owner]->spal;
|
np->pal = nu->spal = User[owner]->spal;
|
||||||
np->ang = RANDOM_P2(2048);
|
np->ang = RANDOM_P2(2048);
|
||||||
SetupZombie(new);
|
SetupZombie(New);
|
||||||
//np->shade = sprite[pp->PlayerSprite].shade;
|
//np->shade = sprite[pp->PlayerSprite].shade;
|
||||||
np->shade = -10;
|
np->shade = -10;
|
||||||
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
|
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
|
||||||
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
|
||||||
DoActorPickClosePlayer(new);
|
DoActorPickClosePlayer(New);
|
||||||
//nu->tgt_sp = pp->SpriteP; // Make it target last killed player initially
|
//nu->tgt_sp = pp->SpriteP; // Make it target last killed player initially
|
||||||
|
|
||||||
// make immediately active
|
// make immediately active
|
||||||
|
@ -811,9 +811,9 @@ SpawnZombie(PLAYERp pp, short Weapon)
|
||||||
RESET(nu->Flags, SPR_FALLING);
|
RESET(nu->Flags, SPR_FALLING);
|
||||||
|
|
||||||
// if I didn't do this here they get stuck in the air sometimes
|
// if I didn't do this here they get stuck in the air sometimes
|
||||||
DoActorZrange(new);
|
DoActorZrange(New);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -821,7 +821,7 @@ SpawnZombie2(short Weapon)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &sprite[Weapon];
|
||||||
USERp u = User[Weapon];
|
USERp u = User[Weapon];
|
||||||
short new,i,nexti;
|
short New,i,nexti;
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short owner;
|
short owner;
|
||||||
|
@ -852,20 +852,20 @@ SpawnZombie2(short Weapon)
|
||||||
|
|
||||||
|
|
||||||
//Zombies++;
|
//Zombies++;
|
||||||
new = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
|
New = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
np = &sprite[new];
|
np = &sprite[New];
|
||||||
nu = User[new];
|
nu = User[New];
|
||||||
nu->Counter3 = 0;
|
nu->Counter3 = 0;
|
||||||
np->owner = owner;
|
np->owner = owner;
|
||||||
np->pal = nu->spal = User[owner]->spal;
|
np->pal = nu->spal = User[owner]->spal;
|
||||||
np->ang = RANDOM_P2(2048);
|
np->ang = RANDOM_P2(2048);
|
||||||
SetupZombie(new);
|
SetupZombie(New);
|
||||||
//np->shade = sprite[pp->PlayerSprite].shade;
|
//np->shade = sprite[pp->PlayerSprite].shade;
|
||||||
np->shade = -10;
|
np->shade = -10;
|
||||||
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
|
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
|
||||||
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
|
||||||
|
|
||||||
DoActorPickClosePlayer(new);
|
DoActorPickClosePlayer(New);
|
||||||
//nu->tgt_sp = pp->SpriteP; // Make it target last killed player initially
|
//nu->tgt_sp = pp->SpriteP; // Make it target last killed player initially
|
||||||
|
|
||||||
// make immediately active
|
// make immediately active
|
||||||
|
@ -875,9 +875,9 @@ SpawnZombie2(short Weapon)
|
||||||
RESET(nu->Flags, SPR_FALLING);
|
RESET(nu->Flags, SPR_FALLING);
|
||||||
|
|
||||||
// if I didn't do this here they get stuck in the air sometimes
|
// if I didn't do this here they get stuck in the air sometimes
|
||||||
DoActorZrange(new);
|
DoActorZrange(New);
|
||||||
|
|
||||||
return new;
|
return New;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in a new issue