SW: "new" --> "New"

git-svn-id: https://svn.eduke32.com/eduke32@6048 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-01-23 11:21:32 +00:00
parent 4fe09ad530
commit 3adfd6a4bd
14 changed files with 414 additions and 414 deletions

View file

@ -1180,7 +1180,7 @@ void BunnyHatch(short Weapon)
SPRITEp wp = &sprite[Weapon];
USERp wu = User[Weapon];
short new,i;
short New,i;
SPRITEp np;
USERp nu;
#define MAX_BUNNYS 1
@ -1190,8 +1190,8 @@ void BunnyHatch(short Weapon)
for (i = 0; i < MAX_BUNNYS; i++)
{
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[new];
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[New];
memset(np,0,sizeof(SPRITE));
np->sectnum = wp->sectnum;
np->statnum = STAT_DEFAULT;
@ -1203,8 +1203,8 @@ void BunnyHatch(short Weapon)
np->yrepeat = 24;
np->ang = rip_ang[i];
np->pal = 0;
SetupBunny(new);
nu = User[new];
SetupBunny(New);
nu = User[New];
np->shade = wp->shade;
// make immediately active
@ -1223,21 +1223,21 @@ void BunnyHatch(short Weapon)
// Blood fountains
InitBloodSpray(Weapon,TRUE,-1);
if (SpawnShrap(Weapon, new))
if (SpawnShrap(Weapon, New))
{
SetSuicide(Weapon);
}
else
DoActorDie(Weapon, new);
DoActorDie(Weapon, New);
}
}
nu->ShellNum = 0; // Not Pregnant right now
NewStateGroup(new, nu->ActorActionSet->Jump);
NewStateGroup(New, nu->ActorActionSet->Jump);
nu->ActorActionFunc = DoActorMoveJump;
DoActorSetSpeed(new, FAST_SPEED);
PickJumpMaxSpeed(new, -600);
DoActorSetSpeed(New, FAST_SPEED);
PickJumpMaxSpeed(New, -600);
SET(nu->Flags, SPR_JUMPING);
RESET(nu->Flags, SPR_FALLING);
@ -1245,9 +1245,9 @@ void BunnyHatch(short Weapon)
nu->jump_grav = 8;
// 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];
USERp wu = User[Weapon];
short new,i;
short New,i;
SPRITEp np;
USERp nu;
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[new];
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[New];
memset(np,0,sizeof(SPRITE));
np->sectnum = wp->sectnum;
np->statnum = STAT_DEFAULT;
@ -1273,8 +1273,8 @@ int BunnyHatch2(short Weapon)
np->yrepeat = 24;
np->ang = RANDOM_P2(2048);
np->pal = 0;
SetupBunny(new);
nu = User[new];
SetupBunny(New);
nu = User[New];
np->shade = wp->shade;
// make immediately active
@ -1292,12 +1292,12 @@ int BunnyHatch2(short Weapon)
nu->ShellNum = 0; // Not Pregnant right now
NewStateGroup(new, nu->ActorActionSet->Jump);
NewStateGroup(New, nu->ActorActionSet->Jump);
nu->ActorActionFunc = DoActorMoveJump;
DoActorSetSpeed(new, FAST_SPEED);
DoActorSetSpeed(New, FAST_SPEED);
if (TEST_BOOL3(wp))
{
PickJumpMaxSpeed(new, -600-RANDOM_RANGE(600));
PickJumpMaxSpeed(New, -600-RANDOM_RANGE(600));
np->xrepeat = np->yrepeat = 64;
np->xvel = 150 + RANDOM_RANGE(1000);
nu->Health = 1; // Easy to pop. Like shootn' skeet.
@ -1305,7 +1305,7 @@ int BunnyHatch2(short Weapon)
np->ang += RANDOM_RANGE(128);
}
else
PickJumpMaxSpeed(new, -600);
PickJumpMaxSpeed(New, -600);
SET(nu->Flags, SPR_JUMPING);
RESET(nu->Flags, SPR_FALLING);
@ -1316,11 +1316,11 @@ int BunnyHatch2(short Weapon)
nu->active_range = 75000; // Set it far
// 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

View file

@ -556,14 +556,14 @@ NewCoolg(short SpriteNum)
USERp nu;
SPRITEp np;
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];
np = &sprite[new];
nu = User[New];
np = &sprite[New];
ChangeState(new, &s_CoolgBirth[0]);
ChangeState(New, &s_CoolgBirth[0]);
nu->StateEnd = s_CoolgDie;
nu->Rot = sg_CoolgRun;
np->pal = nu->spal = u->spal;
@ -576,36 +576,36 @@ NewCoolg(short SpriteNum)
// special case
TotalKillable++;
CoolgCommon(new);
CoolgCommon(New);
return 0;
}
int
DoCoolgBirth(short new)
DoCoolgBirth(short New)
{
SPRITEp sp;
USERp u;
ANIMATOR DoActorDecide;
u = User[new];
sp = &sprite[new];
u = User[New];
sp = &sprite[New];
u->Health = HEALTH_COOLIE_GHOST;
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->Rot = sg_CoolgRun;
EnemyDefaults(new, &CoolgActionSet, &CoolgPersonality);
EnemyDefaults(New, &CoolgActionSet, &CoolgPersonality);
// special case
TotalKillable--;
SET(u->Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
CoolgCommon(new);
CoolgCommon(New);
return 0;
}

View file

@ -368,7 +368,7 @@ DoVoxelShadow(SPRITEp tspr)
void
DoShadows(uspritetype * tsp, int viewz)
{
uspritetype * new = &tsprite[spritesortcnt];
uspritetype * New = &tsprite[spritesortcnt];
USERp tu = User[tsp->owner];
int ground_dist = 0;
int view_dist = 0;
@ -393,24 +393,24 @@ DoShadows(uspritetype * tsp, int viewz)
}
tsp->sectnum = sectnum;
memcpy(new, tsp, sizeof(SPRITE));
memcpy(New, tsp, sizeof(SPRITE));
// shadow is ALWAYS draw last - status is priority
new->statnum = MAXSTATUS;
new->sectnum = sectnum;
New->statnum = MAXSTATUS;
New->sectnum = sectnum;
if ((tsp->yrepeat >> 2) > 4)
{
yrepeat = (tsp->yrepeat >> 2) - (SPRITEp_SIZE_Y(tsp) / 64) * 2;
xrepeat = new->xrepeat;
xrepeat = New->xrepeat;
}
else
{
yrepeat = new->yrepeat;
xrepeat = new->xrepeat;
yrepeat = New->yrepeat;
xrepeat = New->xrepeat;
}
new->shade = 127;
SET(new->cstat, CSTAT_SPRITE_TRANSLUCENT);
New->shade = 127;
SET(New->cstat, CSTAT_SPRITE_TRANSLUCENT);
loz = tu->loz;
if (tu->lo_sp)
@ -429,7 +429,7 @@ DoShadows(uspritetype * tsp, int viewz)
#endif
// 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 ((viewz - loz) > -Z(8))
@ -451,11 +451,11 @@ DoShadows(uspritetype * tsp, int viewz)
xrepeat = min(xrepeat, 255);
yrepeat = min(yrepeat, 255);
new->xrepeat = xrepeat;
new->yrepeat = yrepeat;
New->xrepeat = xrepeat;
New->yrepeat = yrepeat;
// Check for voxel items and use a round generic pic if so
//DoVoxelShadow(new);
//DoVoxelShadow(New);
spritesortcnt++;
}
@ -463,7 +463,7 @@ DoShadows(uspritetype * tsp, int viewz)
void
DoMotionBlur(uspritetype const * tsp)
{
uspritetype * new;
uspritetype * New;
USERp tu = User[tsp->owner];
int nx,ny,nz = 0,dx,dy,dz;
short i, ang;
@ -534,20 +534,20 @@ DoMotionBlur(uspritetype const * tsp)
for (i = 0; i < tu->motion_blur_num; i++)
{
new = &tsprite[spritesortcnt];
memcpy(new, tsp, sizeof(SPRITE));
SET(new->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_TRANS_FLIP);
New = &tsprite[spritesortcnt];
memcpy(New, tsp, sizeof(SPRITE));
SET(New->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_TRANS_FLIP);
new->x += dx;
new->y += dy;
New->x += dx;
New->y += dy;
dx += nx;
dy += ny;
new->z += dz;
New->z += dz;
dz += nz;
new->xrepeat = xrepeat;
new->yrepeat = yrepeat;
New->xrepeat = xrepeat;
New->yrepeat = yrepeat;
xrepeat -= repeat_adj;
yrepeat -= repeat_adj;
@ -566,7 +566,7 @@ void SetVoxelSprite(SPRITEp sp, short pic)
void WarpCopySprite(void)
{
SPRITEp sp1, sp2, sp;
uspritetype * new;
uspritetype * New;
short sn, nsn;
short sn2, nsn2;
short spnum, next_spnum;
@ -599,20 +599,20 @@ void WarpCopySprite(void)
if (sprite[spnum].picnum == ST1)
continue;
new = &tsprite[spritesortcnt];
memcpy(new, &sprite[spnum], sizeof(SPRITE));
New = &tsprite[spritesortcnt];
memcpy(New, &sprite[spnum], sizeof(SPRITE));
spritesortcnt++;
new->owner = spnum;
new->statnum = 0;
New->owner = spnum;
New->statnum = 0;
xoff = sp1->x - new->x;
yoff = sp1->y - new->y;
zoff = sp1->z - new->z;
xoff = sp1->x - New->x;
yoff = sp1->y - New->y;
zoff = sp1->z - New->z;
new->x = sp2->x - xoff;
new->y = sp2->y - yoff;
new->z = sp2->z - zoff;
new->sectnum = sp2->sectnum;
New->x = sp2->x - xoff;
New->y = sp2->y - yoff;
New->z = sp2->z - zoff;
New->sectnum = sp2->sectnum;
}
TRAVERSE_SPRITE_SECT(headspritesect[sect2], spnum, next_spnum)
@ -623,20 +623,20 @@ void WarpCopySprite(void)
if (sprite[spnum].picnum == ST1)
continue;
new = &tsprite[spritesortcnt];
memcpy(new, &sprite[spnum], sizeof(SPRITE));
New = &tsprite[spritesortcnt];
memcpy(New, &sprite[spnum], sizeof(SPRITE));
spritesortcnt++;
new->owner = spnum;
new->statnum = 0;
New->owner = spnum;
New->statnum = 0;
xoff = sp2->x - new->x;
yoff = sp2->y - new->y;
zoff = sp2->z - new->z;
xoff = sp2->x - New->x;
yoff = sp2->y - New->y;
zoff = sp2->z - New->z;
new->x = sp1->x - xoff;
new->y = sp1->y - yoff;
new->z = sp1->z - zoff;
new->sectnum = sp1->sectnum;
New->x = sp1->x - xoff;
New->y = sp1->y - yoff;
New->z = sp1->z - zoff;
New->sectnum = sp1->sectnum;
}
}
}
@ -2050,11 +2050,11 @@ PostDraw(void)
int CopySprite(uspritetype const * tsp, short newsector)
{
short new;
short New;
SPRITEp sp;
new = COVERinsertsprite(newsector, STAT_FAF_COPY);
sp = &sprite[new];
New = COVERinsertsprite(newsector, STAT_FAF_COPY);
sp = &sprite[New];
sp->x = tsp->x;
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);
return new;
return New;
}
int ConnectCopySprite(uspritetype const * tsp)
@ -2120,7 +2120,7 @@ void PreDrawStackedWater(void)
short i,nexti;
SPRITEp sp,np;
USERp u,nu;
short new;
short New;
int smr4,smr2;
int x,y,z;
short ang;
@ -2148,13 +2148,13 @@ void PreDrawStackedWater(void)
sp = &sprite[i];
u = User[i];
new = ConnectCopySprite((uspritetype const *)sp);
if (new >= 0)
New = ConnectCopySprite((uspritetype const *)sp);
if (New >= 0)
{
np = &sprite[new];
np = &sprite[New];
// spawn a user
User[new] = nu = (USERp)CallocMem(sizeof(USER), 1);
User[New] = nu = (USERp)CallocMem(sizeof(USER), 1);
ASSERT(nu != NULL);
nu->xchange = -989898;

View file

@ -419,15 +419,15 @@ NewEel(short SpriteNum)
USERp nu;
SPRITEp np;
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];
np = &sprite[new];
nu = User[New];
np = &sprite[New];
ChangeState(new, &s_EelBirth);
ChangeState(New, &s_EelBirth);
nu->StateEnd = s_EelDie;
nu->Rot = sg_EelRun;
np->pal = nu->spal = u->spal;
@ -436,7 +436,7 @@ NewEel(short SpriteNum)
np->shade = sp->shade;
EelCommon(new);
EelCommon(New);
return 0;
}

View file

@ -304,15 +304,15 @@ SpawnMidSplash(short SpriteNum)
USERp u = User[SpriteNum];
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
//SetOwner(Weapon, new);
//SetOwner(Weapon, New);
np->shade = -12;
np->xrepeat = 70-RANDOM_RANGE(20);
np->yrepeat = 70-RANDOM_RANGE(20);
@ -340,15 +340,15 @@ SpawnFloorSplash(short SpriteNum)
USERp u = User[SpriteNum];
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
//SetOwner(Weapon, new);
//SetOwner(Weapon, New);
np->shade = -12;
np->xrepeat = 70-RANDOM_RANGE(20);
np->yrepeat = 70-RANDOM_RANGE(20);
@ -564,15 +564,15 @@ DoBloodSpray(int16_t Weapon)
{
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
SetOwner(Weapon, new);
SetOwner(Weapon, New);
np->shade = -12;
np->xrepeat = 40-RANDOM_RANGE(30);
np->yrepeat = 40-RANDOM_RANGE(30);
@ -591,7 +591,7 @@ DoBloodSpray(int16_t Weapon)
nu->ychange = u->ychange;
nu->zchange = u->zchange;
ScaleSpriteVector(new, 20000);
ScaleSpriteVector(New, 20000);
if (TEST(u->Flags, SPR_UNDERWATER))
SET(nu->Flags, SPR_UNDERWATER);
@ -789,16 +789,16 @@ DoPhosphorus(int16_t Weapon)
{
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->hitag = LUMINOUS; // Always full brightness
SetOwner(Weapon, new);
SetOwner(Weapon, New);
np->shade = -40;
np->xrepeat = 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
ScaleSpriteVector(new, 20000);
ScaleSpriteVector(New, 20000);
if (TEST(u->Flags, SPR_UNDERWATER))
SET(nu->Flags, SPR_UNDERWATER);
@ -1042,15 +1042,15 @@ DoChemBomb(int16_t Weapon)
{
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
SetOwner(Weapon, new);
SetOwner(Weapon, New);
np->shade = -40;
np->xrepeat = 40;
np->yrepeat = 40;
@ -1068,7 +1068,7 @@ DoChemBomb(int16_t Weapon)
nu->spal = np->pal = PALETTE_PLAYER6;
ScaleSpriteVector(new, 20000);
ScaleSpriteVector(New, 20000);
if (TEST(u->Flags, SPR_UNDERWATER))
SET(nu->Flags, SPR_UNDERWATER);
@ -1274,7 +1274,7 @@ SpawnRadiationCloud(short SpriteNum)
{
SPRITEp sp = &sprite[SpriteNum], np;
USERp u = User[SpriteNum], nu;
short new;
short New;
if (!MoveSkip4)
@ -1300,13 +1300,13 @@ SpawnRadiationCloud(short SpriteNum)
if (TEST(u->Flags, SPR_UNDERWATER))
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
SetOwner(sp->owner, new);
SetOwner(sp->owner, New);
nu->WaitTics = 1 * 120;
np->shade = -40;
np->xrepeat = 32;
@ -1731,7 +1731,7 @@ SpawnFlashBombOnActor(int16_t enemy)
USERp eu = User[enemy];
SPRITEp np;
USERp nu;
short new;
short New;
// 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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
if (enemy >= 0)
eu->flame = new;
eu->flame = New;
np->xrepeat = 16;
np->yrepeat = 16;
@ -1805,10 +1805,10 @@ SpawnFlashBombOnActor(int16_t enemy)
if (enemy >= 0)
{
SetAttach(enemy, new);
SetAttach(enemy, New);
}
return new;
return New;
}
//////////////////////////////////////////////

View file

@ -2176,30 +2176,30 @@ pUziEjectUp(PANEL_SPRITEp gun)
void
pSpawnUziClip(PANEL_SPRITEp gun)
{
PANEL_SPRITEp new;
PANEL_SPRITEp New;
PlaySound(DIGI_REMOVECLIP, &gun->PlayerP->posx, &gun->PlayerP->posy,
&gun->PlayerP->posz,v3df_follow|v3df_dontpan|v3df_doppler|v3df_follow);
if (TEST(gun->flags, PANF_XFLIP))
{
new = pSpawnSprite(gun->PlayerP, ps_UziClip, PRI_BACK, gun->x - UZI_CLIP_XOFF, gun->y + UZI_CLIP_YOFF);
SET(new->flags, PANF_XFLIP);
new->ang = NORM_ANGLE(1024 + 256 + 22);
new->ang = NORM_ANGLE(new->ang + 512);
New = pSpawnSprite(gun->PlayerP, ps_UziClip, PRI_BACK, gun->x - UZI_CLIP_XOFF, gun->y + UZI_CLIP_YOFF);
SET(New->flags, PANF_XFLIP);
New->ang = NORM_ANGLE(1024 + 256 + 22);
New->ang = NORM_ANGLE(New->ang + 512);
}
else
{
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 = 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->vel = 1050;
SET(new->flags, PANF_WEAPON_SPRITE);
New->vel = 1050;
SET(New->flags, PANF_WEAPON_SPRITE);
// carry Eject sprite with clip
new->sibling = gun;
New->sibling = gun;
}
void
@ -2341,15 +2341,15 @@ pUziDoneReload(PANEL_SPRITEp psp)
// if 2 uzi's and the first one has been reloaded
// kill the first one and make the second one the CurWeapon
// Set uzi's back to previous state
PANEL_SPRITEp new;
PANEL_SPRITEp New;
if (pp->WpnUziType > 2)
pp->WpnUziType -= 3;
new = InitWeaponUziSecondaryReload(psp);
pp->Wpn[WPN_UZI] = new;
pp->CurWpn = new;
New = InitWeaponUziSecondaryReload(psp);
pp->Wpn[WPN_UZI] = New;
pp->CurWpn = New;
pp->CurWpn->sibling = NULL;
pKillSprite(psp);
@ -2516,7 +2516,7 @@ InitWeaponUzi(PLAYERp pp)
PANEL_SPRITEp
InitWeaponUzi2(PANEL_SPRITEp uzi_orig)
{
PANEL_SPRITEp new;
PANEL_SPRITEp New;
PLAYERp pp = uzi_orig->PlayerP;
@ -2529,50 +2529,50 @@ InitWeaponUzi2(PANEL_SPRITEp uzi_orig)
// Spawning a 2nd uzi, set weapon mode
pp->WpnUziType = 0; // 0 is up, 1 is retract
new = pSpawnSprite(pp, ps_PresentUzi2, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
uzi_orig->sibling = new;
New = pSpawnSprite(pp, ps_PresentUzi2, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
uzi_orig->sibling = New;
new->y += tilesiz[new->picndx].y;
New->y += tilesiz[New->picndx].y;
// Set up the new Weapon variables
SET(new->flags, PANF_WEAPON_SPRITE);
new->ActionState = &ps_FireUzi2[1];
new->RetractState = ps_RetractUzi2;
new->PresentState = ps_PresentUzi2;
new->RestState = ps_FireUzi2;
pSetState(new, new->PresentState);
// Set up the New Weapon variables
SET(New->flags, PANF_WEAPON_SPRITE);
New->ActionState = &ps_FireUzi2[1];
New->RetractState = ps_RetractUzi2;
New->PresentState = ps_PresentUzi2;
New->RestState = ps_FireUzi2;
pSetState(New, New->PresentState);
new->sibling = uzi_orig;
SET(new->flags, PANF_SECONDARY);
pUziOverlays(new, CHAMBER_REST);
New->sibling = uzi_orig;
SET(New->flags, PANF_SECONDARY);
pUziOverlays(New, CHAMBER_REST);
return new;
return New;
}
PANEL_SPRITEp
InitWeaponUziSecondaryReload(PANEL_SPRITEp uzi_orig)
{
PANEL_SPRITEp new;
PANEL_SPRITEp New;
PLAYERp pp = uzi_orig->PlayerP;
new = pSpawnSprite(pp, ps_PresentUzi, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
new->y += tilesiz[new->picndx].y;
New = pSpawnSprite(pp, ps_PresentUzi, PRI_MID, 160 - UZI_XOFF, UZI_YOFF);
New->y += tilesiz[New->picndx].y;
SET(new->flags, PANF_XFLIP);
SET(New->flags, PANF_XFLIP);
// Set up the new Weapon variables
SET(new->flags, PANF_WEAPON_SPRITE);
new->ActionState = ps_UziEject;
new->RetractState = ps_RetractUzi;
new->PresentState = ps_PresentUzi;
new->RestState = ps_UziEject;
// pSetState(new, new->PresentState);
pSetState(new, ps_PresentUziReload);
// Set up the New Weapon variables
SET(New->flags, PANF_WEAPON_SPRITE);
New->ActionState = ps_UziEject;
New->RetractState = ps_RetractUzi;
New->PresentState = ps_PresentUzi;
New->RestState = ps_UziEject;
// pSetState(New, New->PresentState);
pSetState(New, ps_PresentUziReload);
new->sibling = uzi_orig;
SET(new->flags, PANF_SECONDARY|PANF_RELOAD);
New->sibling = uzi_orig;
SET(New->flags, PANF_SECONDARY|PANF_RELOAD);
return new;
return New;
}
void

View file

@ -53,11 +53,11 @@ extern SWBOOL GamePaused;
short CopyQuakeSpotToOn(SPRITEp sp)
{
short new;
short New;
SPRITEp np;
new = COVERinsertsprite(sp->sectnum, STAT_QUAKE_SPOT);
np = &sprite[new];
New = COVERinsertsprite(sp->sectnum, STAT_QUAKE_SPOT);
np = &sprite[New];
memcpy(np, sp, sizeof(SPRITE));
@ -68,11 +68,11 @@ short CopyQuakeSpotToOn(SPRITEp sp)
np->extra = 0;
np->owner = -1;
change_sprite_stat(new, STAT_QUAKE_ON);
change_sprite_stat(New, STAT_QUAKE_ON);
QUAKE_Duration(np) *= 120;
return new;
return New;
}

View file

@ -1246,7 +1246,7 @@ void RipperHatch(short Weapon)
{
SPRITEp wp = &sprite[Weapon];
short new,i;
short New,i;
SPRITEp np;
USERp nu;
#define MAX_RIPPERS 1
@ -1257,8 +1257,8 @@ void RipperHatch(short Weapon)
for (i = 0; i < MAX_RIPPERS; i++)
{
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[new];
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[New];
memset(np,0,sizeof(SPRITE));
np->sectnum = wp->sectnum;
np->statnum = STAT_DEFAULT;
@ -1270,16 +1270,16 @@ void RipperHatch(short Weapon)
np->xrepeat = np->yrepeat = 64;
np->ang = rip_ang[i];
np->pal = 0;
SetupRipper(new);
nu = User[new];
SetupRipper(New);
nu = User[New];
// make immediately active
SET(nu->Flags, SPR_ACTIVE);
NewStateGroup(new, nu->ActorActionSet->Jump);
NewStateGroup(New, nu->ActorActionSet->Jump);
nu->ActorActionFunc = DoActorMoveJump;
DoActorSetSpeed(new, FAST_SPEED);
PickJumpMaxSpeed(new, -600);
DoActorSetSpeed(New, FAST_SPEED);
PickJumpMaxSpeed(New, -600);
SET(nu->Flags, SPR_JUMPING);
RESET(nu->Flags, SPR_FALLING);
@ -1287,9 +1287,9 @@ void RipperHatch(short Weapon)
nu->jump_grav = 8;
// if I didn't do this here they get stuck in the air sometimes
DoActorZrange(new);
DoActorZrange(New);
DoJump(new);
DoJump(New);
}
}

View file

@ -1257,7 +1257,7 @@ void Ripper2Hatch(short Weapon)
{
SPRITEp wp = &sprite[Weapon];
short new,i;
short New,i;
SPRITEp np;
USERp nu;
#define MAX_RIPPER2S 1
@ -1268,8 +1268,8 @@ void Ripper2Hatch(short Weapon)
for (i = 0; i < MAX_RIPPER2S; i++)
{
new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[new];
New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
np = &sprite[New];
memset(np,0,sizeof(SPRITE));
np->sectnum = wp->sectnum;
np->statnum = STAT_DEFAULT;
@ -1282,16 +1282,16 @@ void Ripper2Hatch(short Weapon)
np->ang = rip_ang[i];
np->pal = 0;
np->shade = -10;
SetupRipper2(new);
nu = User[new];
SetupRipper2(New);
nu = User[New];
// make immediately active
SET(nu->Flags, SPR_ACTIVE);
NewStateGroup(new, nu->ActorActionSet->Jump);
NewStateGroup(New, nu->ActorActionSet->Jump);
nu->ActorActionFunc = DoActorMoveJump;
DoActorSetSpeed(new, FAST_SPEED);
PickJumpMaxSpeed(new, -600);
DoActorSetSpeed(New, FAST_SPEED);
PickJumpMaxSpeed(New, -600);
SET(nu->Flags, SPR_JUMPING);
RESET(nu->Flags, SPR_FALLING);
@ -1299,9 +1299,9 @@ void Ripper2Hatch(short Weapon)
nu->jump_grav = 8;
// if I didn't do this here they get stuck in the air sometimes
DoActorZrange(new);
DoActorZrange(New);
DoJump(new);
DoJump(New);
}
}

View file

@ -2935,7 +2935,7 @@ void
DoSineWaveWall(void)
{
SINE_WALL *sw;
int new;
int New;
short sw_num;
for (sw_num = 0; sw_num < MAX_SINE_WAVE; sw_num++)
@ -2947,15 +2947,15 @@ DoSineWaveWall(void)
if (!sw->type)
{
new = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
// wall[sw->wall].y = new;
dragpoint(sw->wall, wall[sw->wall].x, new, 0);
New = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
// wall[sw->wall].y = New;
dragpoint(sw->wall, wall[sw->wall].x, New, 0);
}
else
{
new = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
// wall[sw->wall].x = new;
dragpoint(sw->wall, new, wall[sw->wall].y, 0);
New = sw->orig_xy + ((sw->range * sintable[sw->sintable_ndx]) >> 14);
// wall[sw->wall].x = New;
dragpoint(sw->wall, New, wall[sw->wall].y, 0);
}
}
}

View file

@ -1002,12 +1002,12 @@ ActorTestSpawn(SPRITEp sp)
{
if (sp->statnum == STAT_DEFAULT && sp->lotag == TAG_SPAWN_ACTOR)
{
short new;
short New;
short SpriteNum = sp - sprite;
new = COVERinsertsprite(sp->sectnum, STAT_DEFAULT);
memcpy(&sprite[new], sp, sizeof(SPRITE));
change_sprite_stat(new, STAT_SPAWN_TRIGGER);
RESET(sprite[new].cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
New = COVERinsertsprite(sp->sectnum, STAT_DEFAULT);
memcpy(&sprite[New], sp, sizeof(SPRITE));
change_sprite_stat(New, STAT_SPAWN_TRIGGER);
RESET(sprite[New].cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
return FALSE;
}
@ -3855,7 +3855,7 @@ int ActorCoughItem(short SpriteNum)
{
SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum];
short new,choose;
short New,choose;
SPRITEp np;
@ -3863,9 +3863,9 @@ int ActorCoughItem(short SpriteNum)
{
case SAILORGIRL_R0:
ASSERT(sp->sectnum >= 0);
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(new >= 0);
np = &sprite[new];
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(New >= 0);
np = &sprite[New];
np->cstat = np->extra = 0;
np->x = sp->x;
np->y = sp->y;
@ -3905,9 +3905,9 @@ int ActorCoughItem(short SpriteNum)
return 0;
ASSERT(sp->sectnum >= 0);
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(new >= 0);
np = &sprite[new];
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(New >= 0);
np = &sprite[New];
np->cstat = np->extra = 0;
np->x = sp->x;
np->y = sp->y;
@ -3934,9 +3934,9 @@ int ActorCoughItem(short SpriteNum)
return 0;
ASSERT(sp->sectnum >= 0);
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(new >= 0);
np = &sprite[new];
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(New >= 0);
np = &sprite[New];
np->cstat = np->extra = 0;
np->x = sp->x;
np->y = sp->y;
@ -3966,9 +3966,9 @@ int ActorCoughItem(short SpriteNum)
return 0;
ASSERT(sp->sectnum >= 0);
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(new >= 0);
np = &sprite[new];
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(New >= 0);
np = &sprite[New];
np->cstat = 0;
np->extra = 0;
np->x = sp->x;
@ -4030,9 +4030,9 @@ int ActorCoughItem(short SpriteNum)
return 0;
ASSERT(sp->sectnum >= 0);
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(new >= 0);
np = &sprite[new];
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(New >= 0);
np = &sprite[New];
np->cstat = np->extra = 0;
np->x = sp->x;
np->y = sp->y;
@ -4089,9 +4089,9 @@ int ActorCoughItem(short SpriteNum)
case PACHINKO4:
ASSERT(sp->sectnum >= 0);
new = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(new >= 0);
np = &sprite[new];
New = COVERinsertsprite(sp->sectnum, STAT_SPAWN_ITEMS);
ASSERT(New >= 0);
np = &sprite[New];
np->cstat = np->extra = 0;
np->x = sp->x;
np->y = sp->y;
@ -5310,7 +5310,7 @@ KillGet(short SpriteNum)
USERp u = User[SpriteNum],nu;
SPRITEp sp = User[SpriteNum]->SpriteP,np;
short new;
short New;
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
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->shade = -20;
nu->WaitTics = u->WaitTics - 12;
@ -5354,7 +5354,7 @@ KillGetAmmo(short SpriteNum)
USERp u = User[SpriteNum],nu;
SPRITEp sp = User[SpriteNum]->SpriteP,np;
short new;
short New;
switch (gNet.MultiGameType)
{
@ -5386,11 +5386,11 @@ KillGetAmmo(short SpriteNum)
if (!gNet.SpawnMarkers)
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->shade = -20;
nu->WaitTics = u->WaitTics - 12;
@ -5406,7 +5406,7 @@ KillGetWeapon(short SpriteNum)
USERp u = User[SpriteNum],nu;
SPRITEp sp = User[SpriteNum]->SpriteP,np;
short new;
short New;
switch (gNet.MultiGameType)
{
@ -5446,11 +5446,11 @@ KillGetWeapon(short SpriteNum)
if (!gNet.SpawnMarkers)
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->shade = -20;
nu->WaitTics = u->WaitTics - 12;
@ -5596,7 +5596,7 @@ DoGet(short SpriteNum)
// For flag stuff
USERp nu;
SPRITEp np;
short new;
short New;
// Invisiblility is only used for DeathMatch type games
@ -6439,25 +6439,25 @@ KeyMain:
PlaySound(DIGI_ITEM, &sp->x, &sp->y, &sp->z, v3df_dontpan);
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);
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->shade = -20;
// Attach flag to player
nu->Counter = 0;
RESET(np->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
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->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
KillGet(SpriteNum); // Set up for flag respawning
break;

View file

@ -324,13 +324,13 @@ int
TrackClonePoint(short SpriteNum)
{
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->x = sp->x;
@ -340,7 +340,7 @@ TrackClonePoint(short SpriteNum)
np->lotag = sp->lotag;
np->hitag = sp->hitag;
return new;
return New;
}
void QuickJumpSetup(short stat, short lotag, short type)
@ -593,7 +593,7 @@ TrackSetup(void)
TRACKp t;
SPRITEp nsp;
short new_sprite1, new_sprite2;
TRACK_POINTp new;
TRACK_POINTp New;
int size;
// put points on track
@ -678,10 +678,10 @@ TrackSetup(void)
}
size = (Track[ndx].NumPoints + 1) * sizeof(TRACK_POINT);
new = CallocMem(size, 1);
memcpy(new, Track[ndx].TrackPoint, size);
New = CallocMem(size, 1);
memcpy(New, Track[ndx].TrackPoint, size);
FreeMem(Track[ndx].TrackPoint);
Track[ndx].TrackPoint = new;
Track[ndx].TrackPoint = New;
ASSERT(Track[ndx].TrackPoint != NULL);
}
@ -1033,7 +1033,7 @@ SetupSectorObject(short sectnum, short tag)
short object_num, ndx = 0, startwall, endwall, SpriteNum, NextSprite;
int trash;
short j, k;
short new;
short New;
USERp u;
tag -= (TAG_OBJECT_CENTER - 1);
@ -1117,10 +1117,10 @@ SetupSectorObject(short sectnum, short tag)
sop->track = HIGH_TAG(sectnum);
// 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->sp_child = &sprite[new];
u = User[new];
sop->sp_child = &sprite[New];
u = User[New];
u->sop_parent = sop;
SET(u->Flags2, SPR2_SPRITE_FAKE_BLOCK); // for damage test

View file

@ -4112,7 +4112,7 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i
SPRITEp sp = &sprite[SpriteNum];
SPRITEp np;
USERp nu, u;
short i,new;
short i,New;
// 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++)
{
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
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 = -nu->jump_speed;
//setspritez(new, (vec3_t *)np);
//setspritez(New, (vec3_t *)np);
nu->xchange = MOVEx(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);
DoBeginJump(new);
DoBeginJump(New);
}
}
@ -9195,15 +9195,15 @@ DoGrenade(int16_t Weapon)
{
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
SetOwner(Weapon, new);
SetOwner(Weapon, New);
np->shade = -40;
np->xrepeat = 40;
np->yrepeat = 40;
@ -9217,7 +9217,7 @@ DoGrenade(int16_t Weapon)
nu->ychange = u->ychange;
nu->zchange = u->zchange;
ScaleSpriteVector(new, 22000);
ScaleSpriteVector(New, 22000);
if (TEST(u->Flags, SPR_UNDERWATER))
SET(nu->Flags, SPR_UNDERWATER);
@ -9870,7 +9870,7 @@ DoTracer(int16_t Weapon)
USERp u = User[Weapon];
SPRITEp np;
USERp nu;
short new;
short New;
short spawn_count = 0;
short i;
@ -9902,7 +9902,7 @@ DoEMP(int16_t Weapon)
USERp u = User[Weapon];
SPRITEp np;
USERp nu;
short new;
short New;
short spawn_count = 0;
short i;
@ -9999,7 +9999,7 @@ DoTankShell(int16_t Weapon)
USERp u = User[Weapon];
SPRITEp np;
USERp nu;
short new;
short New;
short spawn_count = 0;
short i;
@ -10031,7 +10031,7 @@ DoTracerStart(int16_t Weapon)
USERp u = User[Weapon];
SPRITEp np;
USERp nu;
short new;
short New;
short spawn_count = 0;
short i;
@ -10059,7 +10059,7 @@ DoLaser(int16_t Weapon)
USERp u = User[Weapon];
SPRITEp np;
USERp nu;
short new;
short New;
short spawn_count = 0;
if (SW_SHAREWARE) return FALSE; // JBF: verify
@ -10083,10 +10083,10 @@ DoLaser(int16_t Weapon)
spawn_count++;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->shade = -40;
np->xrepeat = 16;
@ -10137,7 +10137,7 @@ DoRail(int16_t Weapon)
short NewWeapon;
SPRITEp np;
USERp nu;
short new;
short New;
short spawn_count = 0;
if (SW_SHAREWARE) return FALSE; // JBF: verify
@ -10187,18 +10187,18 @@ DoRail(int16_t Weapon)
spawn_count++;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->xvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
np->yvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
np->zvel += (RANDOM_RANGE(140)-RANDOM_RANGE(140));
nu->RotNum = 5;
NewStateGroup(new, sg_RailPuff);
NewStateGroup(New, sg_RailPuff);
np->shade = -40;
np->xrepeat = 10;
@ -10213,7 +10213,7 @@ DoRail(int16_t Weapon)
nu->ychange = u->ychange;
nu->zchange = u->zchange;
ScaleSpriteVector(new, 1500);
ScaleSpriteVector(New, 1500);
if (TEST(u->Flags, SPR_UNDERWATER))
SET(nu->Flags, SPR_UNDERWATER);
@ -10229,7 +10229,7 @@ DoRailStart(int16_t Weapon)
int32_t dax, day, daz;
SPRITEp np;
USERp nu;
short new;
short New;
if (SW_SHAREWARE) return FALSE; // JBF: verify
@ -10309,15 +10309,15 @@ DoRocket(int16_t Weapon)
{
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
SetOwner(Weapon, new);
SetOwner(Weapon, New);
np->shade = -40;
np->xrepeat = 40;
np->yrepeat = 40;
@ -10331,7 +10331,7 @@ DoRocket(int16_t Weapon)
nu->ychange = u->ychange;
nu->zchange = u->zchange;
ScaleSpriteVector(new, 20000);
ScaleSpriteVector(New, 20000);
//nu->zchange -= Z(8);
@ -10349,7 +10349,7 @@ DoMicroMini(int16_t Weapon)
USERp u = User[Weapon];
SPRITEp np;
USERp nu;
short new;
short New;
short spawn_count = 0;
short i;
@ -10418,7 +10418,7 @@ DoMicro(int16_t Weapon)
SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon];
int32_t dax, day, daz;
short new;
short New;
if (SW_SHAREWARE) return FALSE; // JBF: verify
@ -10437,13 +10437,13 @@ DoMicro(int16_t Weapon)
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
SetOwner(sp->owner, new);
SetOwner(sp->owner, New);
np->shade = -40;
np->xrepeat = 20;
np->yrepeat = 20;
@ -10458,7 +10458,7 @@ DoMicro(int16_t Weapon)
nu->ychange = u->ychange;
nu->zchange = u->zchange;
ScaleSpriteVector(new, 20000);
ScaleSpriteVector(New, 20000);
if (TEST(u->Flags, SPR_UNDERWATER))
SET(nu->Flags, SPR_UNDERWATER);
@ -10466,7 +10466,7 @@ DoMicro(int16_t Weapon)
// last smoke
if ((u->WaitTics -= MISSILEMOVETICS) <= 0)
{
setspritez(new, (vec3_t *)np);
setspritez(New, (vec3_t *)np);
NewStateGroup(Weapon, &sg_MicroMini[0]);
sp->xrepeat = sp->yrepeat = 10;
RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE);
@ -10824,7 +10824,7 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
USERp eu = User[enemy];
SPRITEp np;
USERp nu;
short new;
short New;
if (TEST(u->Flags, SPR_UNDERWATER))
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->hitag = LUMINOUS; //Always full brightness
if (enemy >= 0)
eu->flame = new;
eu->flame = New;
np->xrepeat = 16;
np->yrepeat = 16;
@ -10912,7 +10912,7 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
nu->Counter = 48; // max flame size
}
SetOwner(sp->owner, new);
SetOwner(sp->owner, New);
np->shade = -40;
np->pal = nu->spal = u->spal;
SET(np->cstat, CSTAT_SPRITE_YCENTER);
@ -10923,27 +10923,27 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
if (enemy >= 0)
{
SetAttach(enemy, new);
SetAttach(enemy, New);
}
else
{
if (TestDontStickSector(np->sectnum))
{
KillSprite(new);
KillSprite(New);
return -1;
}
nu->floor_dist = nu->ceiling_dist = 0;
DoFindGround(new);
DoFindGround(New);
nu->jump_speed = 0;
DoBeginJump(new);
DoBeginJump(New);
}
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];
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->hitag = LUMINOUS; //Always full brightness
@ -10969,7 +10969,7 @@ SpawnBreakFlames(int16_t SpriteNum, int16_t enemy)
np->yrepeat = 16;
nu->Counter = 48; // max flame size
//SetOwner(sp->owner, new);
//SetOwner(sp->owner, New);
np->shade = -40;
if (u)
np->pal = nu->spal = u->spal;
@ -10980,14 +10980,14 @@ SpawnBreakFlames(int16_t SpriteNum, int16_t enemy)
nu->floor_dist = nu->ceiling_dist = 0;
DoFindGround(new);
DoFindGround(New);
nu->jump_speed = 0;
DoBeginJump(new);
DoBeginJump(New);
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];
SPRITEp np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
if (RANDOM_RANGE(1000) > 500)
np->picnum = 3143;
@ -11018,7 +11018,7 @@ SpawnBreakStaticFlames(int16_t SpriteNum)
np->yrepeat = 32;
//nu->Counter = 48; // max flame size
//SetOwner(sp->owner, new);
//SetOwner(sp->owner, New);
np->shade = -40;
np->pal = nu->spal = u->spal;
//SET(np->cstat, CSTAT_SPRITE_YCENTER);
@ -11030,14 +11030,14 @@ SpawnBreakStaticFlames(int16_t SpriteNum)
np->z = getflorzofslope(np->sectnum,np->x,np->y);
//DoFindGround(new);
//DoFindGround(New);
//nu->jump_speed = 0;
//DoBeginJump(new);
//DoBeginJump(New);
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;
USERp u = User[Weapon], nu;
short new;
short New;
int offset;
int ox, oy, oz;
@ -12758,18 +12758,18 @@ DoMirv(int16_t Weapon)
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
nu->RotNum = 5;
NewStateGroup(new, &sg_MirvMeteor[0]);
NewStateGroup(New, &sg_MirvMeteor[0]);
nu->StateEnd = s_MirvMeteorExp;
//np->owner = Weapon;
SetOwner(Weapon, new);
SetOwner(Weapon, New);
np->shade = -40;
np->xrepeat = 40;
np->yrepeat = 40;
@ -13382,7 +13382,7 @@ InitSerpRing(short SpriteNum)
{
SPRITEp sp = User[SpriteNum]->SpriteP, np;
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;
#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++)
{
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];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->xvel = 500;
//np->owner = SpriteNum;
SetOwner(SpriteNum, new);
SetOwner(SpriteNum, New);
np->shade = -20;
np->xrepeat = 64;
np->yrepeat = 64;
@ -13438,8 +13438,8 @@ InitSerpRing(short SpriteNum)
nu->Rot = sg_SkullRing;
// defaults do change the statnum
EnemyDefaults(new, NULL, NULL);
change_sprite_stat(new, STAT_SKIP4);
EnemyDefaults(New, NULL, NULL);
change_sprite_stat(New, STAT_SKIP4);
RESET(np->extra, SPRX_PLAYER_OR_ENEMY);
np->clipdist = (128+64) >> 2;
@ -13458,7 +13458,7 @@ InitSerpRing2(short SpriteNum)
{
SPRITEp sp = User[SpriteNum]->SpriteP, np;
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 i;
@ -13482,13 +13482,13 @@ InitSerpRing2(short SpriteNum)
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];
nu = User[new];
np = &sprite[New];
nu = User[New];
//np->owner = SpriteNum;
SetOwner(SpriteNum, new);
SetOwner(SpriteNum, New);
np->shade = -20;
np->xrepeat = 64;
np->yrepeat = 64;
@ -13516,9 +13516,9 @@ InitSerpRing2(short SpriteNum)
nu->Rot = sg_SkullRing;
// defaults do change the statnum
EnemyDefaults(new, NULL, NULL);
EnemyDefaults(New, NULL, NULL);
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;
SET(nu->Flags, SPR_XFLIP_TOGGLE);
@ -14291,7 +14291,7 @@ InitSumoSkull(short SpriteNum)
{
SPRITEp sp = User[SpriteNum]->SpriteP, np;
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;
extern STATE s_SkullExplode[];
@ -14302,13 +14302,13 @@ InitSumoSkull(short SpriteNum)
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];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->xvel = 500;
SetOwner(SpriteNum, new);
SetOwner(SpriteNum, New);
np->shade = -20;
np->xrepeat = 64;
np->yrepeat = 64;
@ -14331,8 +14331,8 @@ InitSumoSkull(short SpriteNum)
nu->Health = 100;
// defaults do change the statnum
EnemyDefaults(new, NULL, NULL);
//change_sprite_stat(new, STAT_SKIP4);
EnemyDefaults(New, NULL, NULL);
//change_sprite_stat(New, STAT_SKIP4);
SET(np->extra, SPRX_PLAYER_OR_ENEMY);
np->clipdist = (128+64) >> 2;
@ -16432,7 +16432,7 @@ InitSerpSpell(short SpriteNum)
SPRITEp sp = &sprite[SpriteNum], np;
USERp u = User[SpriteNum], nu;
int dist;
short new, save_ang, i;
short New, save_ang, i;
short oclipdist;
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);
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
np->z = SPRITEp_TOS(sp);
nu->RotNum = 5;
NewStateGroup(new, &sg_SerpMeteor[0]);
NewStateGroup(New, &sg_SerpMeteor[0]);
nu->StateEnd = s_MirvMeteorExp;
//np->owner = SpriteNum;
SetOwner(SpriteNum, new);
SetOwner(SpriteNum, New);
np->shade = -40;
PlaySound(DIGI_SERPMAGICLAUNCH, &sp->x, &sp->y, &sp->z, v3df_none);
nu->spal = np->pal = 27; // Bright Green
@ -16480,7 +16480,7 @@ InitSerpSpell(short SpriteNum)
sp->clipdist = 1;
np->ang = NORM_ANGLE(np->ang + lat_ang[i]);
HelpMissileLateral(new, 4200L);
HelpMissileLateral(New, 4200L);
np->ang = NORM_ANGLE(np->ang - lat_ang[i]);
// find the distance to the target (player)
@ -16494,7 +16494,7 @@ InitSerpSpell(short SpriteNum)
nu->ychange = MOVEy(np->xvel, np->ang);
nu->zchange = np->zvel;
MissileSetPos(new, DoMirvMissile, 400);
MissileSetPos(New, DoMirvMissile, 400);
sp->clipdist = oclipdist;
if (TEST(u->Flags, SPR_UNDERWATER))
@ -16549,7 +16549,7 @@ InitSerpMonstSpell(short SpriteNum)
SPRITEp sp = &sprite[SpriteNum], np;
USERp u = User[SpriteNum], nu;
int dist;
short new, save_ang, i;
short New, save_ang, i;
short oclipdist;
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);
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
nu->spal = np->pal = 25; // Bright Red
np->z = SPRITEp_TOS(sp);
nu->RotNum = 5;
NewStateGroup(new, &sg_SerpMeteor[0]);
NewStateGroup(New, &sg_SerpMeteor[0]);
//nu->StateEnd = s_MirvMeteorExp;
nu->StateEnd = s_TeleportEffect2;
SetOwner(SpriteNum, new);
SetOwner(SpriteNum, New);
np->shade = -40;
np->xrepeat = 122;
np->yrepeat = 116;
@ -16599,7 +16599,7 @@ InitSerpMonstSpell(short SpriteNum)
sp->clipdist = 1;
np->ang = NORM_ANGLE(np->ang + lat_ang[i]);
HelpMissileLateral(new, 4200L);
HelpMissileLateral(New, 4200L);
np->ang = NORM_ANGLE(np->ang - lat_ang[i]);
// find the distance to the target (player)
@ -16613,7 +16613,7 @@ InitSerpMonstSpell(short SpriteNum)
nu->ychange = MOVEy(np->xvel, np->ang);
nu->zchange = np->zvel;
MissileSetPos(new, DoMirvMissile, 400);
MissileSetPos(New, DoMirvMissile, 400);
sp->clipdist = oclipdist;
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];
SPRITEp wp;
USERp wu;
short new;
short New;
short id;
// 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;
new = SpawnSprite(STAT_MISSILE, id, s_UziSmoke, 0, hit_x, hit_y, hit_z, sp->ang, 0);
wp = &sprite[new];
wu = User[new];
New = SpawnSprite(STAT_MISSILE, id, s_UziSmoke, 0, hit_x, hit_y, hit_z, sp->ang, 0);
wp = &sprite[New];
wu = User[New];
wp->shade = -40;
if (hu->PlayerP)
@ -17767,10 +17767,10 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, short hit_sect, short hit_wall, in
break;
}
SetOwner(sp - sprite, new);
SetOwner(sp - sprite, New);
wp->ang = sp->ang;
setspritez(new, &hit_pos);
setspritez(New, &hit_pos);
SET(wp->cstat, CSTAT_SPRITE_YCENTER);
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;
}
@ -20433,16 +20433,16 @@ SpawnVehicleSmoke(short SpriteNum)
{
SPRITEp sp = &sprite[SpriteNum],np;
USERp u = User[SpriteNum],nu;
short new;
short New;
if (MoveSkip2 != 0)
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
nu->WaitTics = 1*120;
np->shade = -40;
@ -20470,13 +20470,13 @@ SpawnSmokePuff(short SpriteNum)
{
SPRITEp sp = &sprite[SpriteNum],np;
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);
np = &sprite[new];
nu = User[new];
np = &sprite[New];
nu = User[New];
nu->WaitTics = 1*120;
np->shade = -40;

View file

@ -776,7 +776,7 @@ SetupZombie(short SpriteNum)
int
SpawnZombie(PLAYERp pp, short Weapon)
{
short new,i,nexti;
short New,i,nexti;
SPRITEp np,sp;
USERp nu,u;
short owner;
@ -788,20 +788,20 @@ SpawnZombie(PLAYERp pp, short Weapon)
//Zombies++;
new = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->pang, 0);
np = &sprite[new];
nu = User[new];
New = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->pang, 0);
np = &sprite[New];
nu = User[New];
np->sectnum = pp->cursectnum;
np->owner = owner;
np->pal = nu->spal = User[owner]->spal;
np->ang = RANDOM_P2(2048);
SetupZombie(new);
SetupZombie(New);
//np->shade = sprite[pp->PlayerSprite].shade;
np->shade = -10;
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
DoActorPickClosePlayer(new);
DoActorPickClosePlayer(New);
//nu->tgt_sp = pp->SpriteP; // Make it target last killed player initially
// make immediately active
@ -811,9 +811,9 @@ SpawnZombie(PLAYERp pp, short Weapon)
RESET(nu->Flags, SPR_FALLING);
// if I didn't do this here they get stuck in the air sometimes
DoActorZrange(new);
DoActorZrange(New);
return new;
return New;
}
int
@ -821,7 +821,7 @@ SpawnZombie2(short Weapon)
{
SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon];
short new,i,nexti;
short New,i,nexti;
SPRITEp np;
USERp nu;
short owner;
@ -852,20 +852,20 @@ SpawnZombie2(short Weapon)
//Zombies++;
new = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
np = &sprite[new];
nu = User[new];
New = SpawnSprite(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
np = &sprite[New];
nu = User[New];
nu->Counter3 = 0;
np->owner = owner;
np->pal = nu->spal = User[owner]->spal;
np->ang = RANDOM_P2(2048);
SetupZombie(new);
SetupZombie(New);
//np->shade = sprite[pp->PlayerSprite].shade;
np->shade = -10;
SET(nu->Flags2, SPR2_DONT_TARGET_OWNER);
SET(np->cstat, CSTAT_SPRITE_TRANSLUCENT);
DoActorPickClosePlayer(new);
DoActorPickClosePlayer(New);
//nu->tgt_sp = pp->SpriteP; // Make it target last killed player initially
// make immediately active
@ -875,9 +875,9 @@ SpawnZombie2(short Weapon)
RESET(nu->Flags, SPR_FALLING);
// if I didn't do this here they get stuck in the air sometimes
DoActorZrange(new);
DoActorZrange(New);
return new;
return New;
}
int