mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- renamed DDukeActor::picnum to attackertype.
This one having the same name here as spritetype::picnum is just confusing as hell and badly describes this variable's function.
This commit is contained in:
parent
a15e5399fa
commit
16635e53fc
11 changed files with 50 additions and 50 deletions
|
@ -2327,7 +2327,7 @@ bool bloodpool(DDukeActor* actor, bool puke, int TIRE)
|
|||
if (actor->temp_data[2] < 32)
|
||||
{
|
||||
actor->temp_data[2]++;
|
||||
if (actor->picnum == TIRE)
|
||||
if (actor->attackertype == TIRE)
|
||||
{
|
||||
if (actor->spr.xrepeat < 64 && actor->spr.yrepeat < 64)
|
||||
{
|
||||
|
@ -2363,7 +2363,7 @@ bool bloodpool(DDukeActor* actor, bool puke, int TIRE)
|
|||
if (actor->temp_data[1] == 1) return false;
|
||||
actor->temp_data[1] = 1;
|
||||
|
||||
if (actor->picnum == TIRE)
|
||||
if (actor->attackertype == TIRE)
|
||||
ps[p].footprintcount = 10;
|
||||
else ps[p].footprintcount = 3;
|
||||
|
||||
|
@ -5149,7 +5149,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
|
|||
|
||||
SKIPJIBS:
|
||||
|
||||
actor->picnum = SHOTSPARK1;
|
||||
actor->attackertype = SHOTSPARK1;
|
||||
actor->extra = 1;
|
||||
actor->spr.zvel = 0;
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ bool ifsquished(DDukeActor* actor, int p)
|
|||
|
||||
if (actor->spr.pal == 1)
|
||||
{
|
||||
actor->picnum = SHOTSPARK1;
|
||||
actor->attackertype = SHOTSPARK1;
|
||||
actor->extra = 1;
|
||||
return false;
|
||||
}
|
||||
|
@ -352,26 +352,26 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
act2->ang = getangle(act2->spr.pos.X - actor->spr.pos.X, act2->spr.pos.Y - actor->spr.pos.Y);
|
||||
|
||||
if (actor->spr.picnum == RPG && act2->spr.extra > 0)
|
||||
act2->picnum = RPG;
|
||||
act2->attackertype = RPG;
|
||||
else if (!isWorldTour())
|
||||
{
|
||||
if (actor->spr.picnum == SHRINKSPARK)
|
||||
act2->picnum = SHRINKSPARK;
|
||||
else act2->picnum = RADIUSEXPLOSION;
|
||||
act2->attackertype = SHRINKSPARK;
|
||||
else act2->attackertype = RADIUSEXPLOSION;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (actor->spr.picnum == SHRINKSPARK || actor->spr.picnum == FLAMETHROWERFLAME)
|
||||
act2->picnum = actor->spr.picnum;
|
||||
act2->attackertype = actor->spr.picnum;
|
||||
else if (actor->spr.picnum != FIREBALL || !Owner || Owner->spr.picnum != APLAYER)
|
||||
{
|
||||
if (actor->spr.picnum == LAVAPOOL)
|
||||
act2->picnum = FLAMETHROWERFLAME;
|
||||
act2->attackertype = FLAMETHROWERFLAME;
|
||||
else
|
||||
act2->picnum = RADIUSEXPLOSION;
|
||||
act2->attackertype = RADIUSEXPLOSION;
|
||||
}
|
||||
else
|
||||
act2->picnum = FLAMETHROWERFLAME;
|
||||
act2->attackertype = FLAMETHROWERFLAME;
|
||||
}
|
||||
|
||||
if (actor->spr.picnum != SHRINKSPARK && (!isWorldTour() || actor->spr.picnum != LAVAPOOL))
|
||||
|
@ -415,7 +415,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
{
|
||||
int p = act2->spr.yvel;
|
||||
|
||||
if (isWorldTour() && act2->picnum == FLAMETHROWERFLAME && Owner->spr.picnum == APLAYER)
|
||||
if (isWorldTour() && act2->attackertype == FLAMETHROWERFLAME && Owner->spr.picnum == APLAYER)
|
||||
{
|
||||
ps[p].numloogs = -1 - actor->spr.yvel;
|
||||
}
|
||||
|
@ -728,7 +728,7 @@ int ifhitbyweapon_d(DDukeActor *actor)
|
|||
{
|
||||
if (actor->spr.picnum == APLAYER)
|
||||
{
|
||||
if (ud.god && actor->picnum != SHRINKSPARK) return -1;
|
||||
if (ud.god && actor->attackertype != SHRINKSPARK) return -1;
|
||||
|
||||
p = actor->spr.yvel;
|
||||
|
||||
|
@ -742,7 +742,7 @@ int ifhitbyweapon_d(DDukeActor *actor)
|
|||
|
||||
if (hitowner)
|
||||
{
|
||||
if (actor->spr.extra <= 0 && actor->picnum != FREEZEBLAST)
|
||||
if (actor->spr.extra <= 0 && actor->attackertype != FREEZEBLAST)
|
||||
{
|
||||
actor->spr.extra = 0;
|
||||
|
||||
|
@ -756,7 +756,7 @@ int ifhitbyweapon_d(DDukeActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
switch(actor->picnum)
|
||||
switch(actor->attackertype)
|
||||
{
|
||||
case RADIUSEXPLOSION:
|
||||
case RPG:
|
||||
|
@ -777,12 +777,12 @@ int ifhitbyweapon_d(DDukeActor *actor)
|
|||
else
|
||||
{
|
||||
if (actor->extra == 0)
|
||||
if (actor->picnum == SHRINKSPARK && actor->spr.xrepeat < 24)
|
||||
if (actor->attackertype == SHRINKSPARK && actor->spr.xrepeat < 24)
|
||||
return -1;
|
||||
|
||||
if (isWorldTour() && actor->picnum == FIREFLY && actor->spr.xrepeat < 48)
|
||||
if (isWorldTour() && actor->attackertype == FIREFLY && actor->spr.xrepeat < 48)
|
||||
{
|
||||
if (actor->picnum != RADIUSEXPLOSION && actor->picnum != RPG)
|
||||
if (actor->attackertype != RADIUSEXPLOSION && actor->attackertype != RPG)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -793,13 +793,13 @@ int ifhitbyweapon_d(DDukeActor *actor)
|
|||
}
|
||||
|
||||
actor->extra = -1;
|
||||
return actor->picnum;
|
||||
return actor->attackertype;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ud.multimode < 2 || !isWorldTour()
|
||||
|| actor->picnum != FLAMETHROWERFLAME
|
||||
|| actor->attackertype != FLAMETHROWERFLAME
|
||||
|| actor->extra >= 0
|
||||
|| actor->spr.extra > 0
|
||||
|| actor->spr.picnum != APLAYER
|
||||
|
@ -1663,7 +1663,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
switch (proj->spr.picnum)
|
||||
{
|
||||
case RPG:
|
||||
if (proj->picnum != BOSS2 && proj->spr.xrepeat >= 10 && proj->spr.sector()->lotag != 2)
|
||||
if (proj->attackertype != BOSS2 && proj->spr.xrepeat >= 10 && proj->spr.sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(proj, SMALLSMOKE);
|
||||
if (spawned) spawned->spr.pos.Z += (1 << 8);
|
||||
|
|
|
@ -304,11 +304,11 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
act2->ang = getangle(act2->spr.pos.X - actor->spr.pos.X, act2->spr.pos.Y - actor->spr.pos.Y);
|
||||
|
||||
if (actor->spr.picnum == RPG && act2->spr.extra > 0)
|
||||
act2->picnum = RPG;
|
||||
act2->attackertype = RPG;
|
||||
else if ((isRRRA()) && actor->spr.picnum == RPG2 && act2->spr.extra > 0)
|
||||
act2->picnum = RPG;
|
||||
act2->attackertype = RPG;
|
||||
else
|
||||
act2->picnum = RADIUSEXPLOSION;
|
||||
act2->attackertype = RADIUSEXPLOSION;
|
||||
|
||||
if (d < r / 3)
|
||||
{
|
||||
|
@ -657,7 +657,7 @@ int ifhitbyweapon_r(DDukeActor *actor)
|
|||
|
||||
if (hitowner)
|
||||
{
|
||||
if (actor->spr.extra <= 0 && actor->picnum != FREEZEBLAST)
|
||||
if (actor->spr.extra <= 0 && actor->attackertype != FREEZEBLAST)
|
||||
{
|
||||
actor->spr.extra = 0;
|
||||
|
||||
|
@ -671,7 +671,7 @@ int ifhitbyweapon_r(DDukeActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
int pn = actor->picnum;
|
||||
int pn = actor->attackertype;
|
||||
if (pn == RPG2 && !isRRRA()) pn = 0; // avoid messing around with gotos.
|
||||
switch (pn)
|
||||
{
|
||||
|
@ -705,7 +705,7 @@ int ifhitbyweapon_r(DDukeActor *actor)
|
|||
}
|
||||
|
||||
actor->extra = -1;
|
||||
return actor->picnum;
|
||||
return actor->attackertype;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1067,7 +1067,7 @@ void movestandables_r(void)
|
|||
static void chickenarrow(DDukeActor* actor)
|
||||
{
|
||||
actor->spr.hitag++;
|
||||
if (actor->picnum != BOSS2 && actor->spr.xrepeat >= 10 && actor->spr.sector()->lotag != 2)
|
||||
if (actor->attackertype != BOSS2 && actor->spr.xrepeat >= 10 && actor->spr.sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(actor, SMALLSMOKE);
|
||||
if (spawned) spawned->spr.pos.Z += (1 << 8);
|
||||
|
@ -1347,7 +1347,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
switch (proj->spr.picnum)
|
||||
{
|
||||
case RPG:
|
||||
if (proj->picnum != BOSS2 && proj->spr.xrepeat >= 10 && proj->spr.sector()->lotag != 2)
|
||||
if (proj->attackertype != BOSS2 && proj->spr.xrepeat >= 10 && proj->spr.sector()->lotag != 2)
|
||||
{
|
||||
spawn(proj, SMALLSMOKE)->spr.pos.Z += (1 << 8);
|
||||
}
|
||||
|
@ -2678,7 +2678,7 @@ DETONATEB:
|
|||
SetPlayerPal(&ps[p], PalEntry(32, 0, 32, 0));
|
||||
}
|
||||
|
||||
if (Owner && (Owner->picnum != HEAVYHBOMB || ud.respawn_items == 0 || Owner->spr.picnum == APLAYER))
|
||||
if (Owner && (Owner->attackertype != HEAVYHBOMB || ud.respawn_items == 0 || Owner->spr.picnum == APLAYER))
|
||||
{
|
||||
if (actor->spr.picnum == HEAVYHBOMB && Owner->spr.picnum != APLAYER && ud.coop)
|
||||
return;
|
||||
|
@ -4014,7 +4014,7 @@ static int fallspecial(DDukeActor *actor, int playernum)
|
|||
addspritetodelete();
|
||||
return 0;
|
||||
}
|
||||
actor->picnum = SHOTSPARK1;
|
||||
actor->attackertype = SHOTSPARK1;
|
||||
actor->extra = 1;
|
||||
}
|
||||
else if (isRRRA() && (actor->spr.sector()->floorpicnum == RRTILE7820 || actor->spr.sector()->floorpicnum == RRTILE7768))
|
||||
|
@ -4023,7 +4023,7 @@ static int fallspecial(DDukeActor *actor, int playernum)
|
|||
{
|
||||
if ((krand() & 3) == 1)
|
||||
{
|
||||
actor->picnum = SHOTSPARK1;
|
||||
actor->attackertype = SHOTSPARK1;
|
||||
actor->extra = 5;
|
||||
}
|
||||
}
|
||||
|
@ -4075,7 +4075,7 @@ void destroyit(DDukeActor *actor)
|
|||
{
|
||||
if (a3->spr.picnum == DESTRUCTO)
|
||||
{
|
||||
a3->picnum = SHOTSPARK1;
|
||||
a3->attackertype = SHOTSPARK1;
|
||||
a3->extra = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -469,7 +469,7 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
case SCRAP6 + 6:
|
||||
case SCRAP6 + 7:
|
||||
|
||||
if (h->picnum == BLIMP && t->picnum == SCRAP1 && h->spr.yvel >= 0)
|
||||
if (h->attackertype == BLIMP && t->picnum == SCRAP1 && h->spr.yvel >= 0)
|
||||
t->picnum = h->spr.yvel;
|
||||
else t->picnum += h->temp_data[0];
|
||||
t->shade -= 6;
|
||||
|
|
|
@ -1277,8 +1277,8 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
else SetGameVarID(lVar2, act->cgg, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_HTPICNUM:
|
||||
if (bSet) act->picnum = lValue;
|
||||
else SetGameVarID(lVar2, act->picnum, sActor, sPlayer);
|
||||
if (bSet) act->attackertype = lValue;
|
||||
else SetGameVarID(lVar2, act->attackertype, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_HTANG:
|
||||
if (bSet) act->ang = lValue;
|
||||
|
@ -2155,7 +2155,7 @@ int ParseState::parse(void)
|
|||
case concmd_ifwasweapon:
|
||||
case concmd_ifspawnedby: // these two are the same
|
||||
insptr++;
|
||||
parseifelse( g_ac->picnum == *insptr);
|
||||
parseifelse( g_ac->attackertype == *insptr);
|
||||
break;
|
||||
case concmd_ifai:
|
||||
insptr++;
|
||||
|
|
|
@ -2475,7 +2475,7 @@ void onMotorcycleHit(int snum, DDukeActor* victim)
|
|||
}
|
||||
else
|
||||
victim->SetHitOwner(p->GetActor());
|
||||
victim->picnum = MOTOHIT;
|
||||
victim->attackertype = MOTOHIT;
|
||||
victim->extra = xs_CRoundToInt(p->MotoSpeed / 2.);
|
||||
p->MotoSpeed -= p->MotoSpeed / 4.;
|
||||
p->TurbCount = 6;
|
||||
|
@ -2535,7 +2535,7 @@ void onBoatHit(int snum, DDukeActor* victim)
|
|||
}
|
||||
else
|
||||
victim->SetHitOwner(p->GetActor());
|
||||
victim->picnum = MOTOHIT;
|
||||
victim->attackertype = MOTOHIT;
|
||||
victim->extra = xs_CRoundToInt(p->MotoSpeed / 4.);
|
||||
p->MotoSpeed -= p->MotoSpeed / 4.;
|
||||
p->TurbCount = 6;
|
||||
|
@ -3458,7 +3458,7 @@ void processinput_r(int snum)
|
|||
if (p->OnMotorcycle)
|
||||
if (badguy(clz.actor()))
|
||||
{
|
||||
clz.actor()->picnum = MOTOHIT;
|
||||
clz.actor()->attackertype = MOTOHIT;
|
||||
clz.actor()->extra = xs_CRoundToInt(2 + (p->MotoSpeed / 2.));
|
||||
p->MotoSpeed -= p->MotoSpeed / 16.;
|
||||
}
|
||||
|
@ -3466,7 +3466,7 @@ void processinput_r(int snum)
|
|||
{
|
||||
if (badguy(clz.actor()))
|
||||
{
|
||||
clz.actor()->picnum = MOTOHIT;
|
||||
clz.actor()->attackertype = MOTOHIT;
|
||||
clz.actor()->extra = xs_CRoundToInt(2 + (p->MotoSpeed / 2.));
|
||||
p->MotoSpeed -= p->MotoSpeed / 16.;
|
||||
}
|
||||
|
|
|
@ -300,7 +300,7 @@ void DDukeActor::Serialize(FSerializer& arc)
|
|||
|
||||
arc("cgg", cgg)
|
||||
("spriteextra", spriteextra)
|
||||
("picnum", picnum)
|
||||
("picnum", attackertype)
|
||||
("ang", ang)
|
||||
("extra", extra)
|
||||
("owneractor", ownerActor)
|
||||
|
|
|
@ -1452,7 +1452,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
hitpic = FLAMETHROWERFLAME;
|
||||
}
|
||||
|
||||
targ->picnum = hitpic;
|
||||
targ->attackertype = hitpic;
|
||||
targ->extra += proj->spr.extra;
|
||||
targ->ang = proj->spr.ang;
|
||||
targ->SetHitOwner(Owner);
|
||||
|
|
|
@ -2399,7 +2399,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
if (proj->spr.picnum == FREEZEBLAST && ((targ->spr.picnum == APLAYER && targ->spr.pal == 1) || (gs.freezerhurtowner == 0 && proj->GetOwner() == targ)))
|
||||
return;
|
||||
|
||||
targ->picnum = proj->spr.picnum;
|
||||
targ->attackertype = proj->spr.picnum;
|
||||
targ->extra += proj->spr.extra;
|
||||
if (targ->spr.picnum != COW)
|
||||
targ->ang = proj->spr.ang;
|
||||
|
@ -2915,7 +2915,7 @@ void tearitup(sectortype* sect)
|
|||
{
|
||||
if (act->spr.picnum == DESTRUCTO)
|
||||
{
|
||||
act->picnum = SHOTSPARK1;
|
||||
act->attackertype = SHOTSPARK1;
|
||||
act->extra = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ DDukeActor* EGS(sectortype* whatsectp, int s_x, int s_y, int s_z, int s_pn, int8
|
|||
|
||||
if (s_ow)
|
||||
{
|
||||
act->picnum = s_ow->spr.picnum;
|
||||
act->attackertype = s_ow->spr.picnum;
|
||||
act->floorz = s_ow->floorz;
|
||||
act->ceilingz = s_ow->ceilingz;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ DDukeActor* EGS(sectortype* whatsectp, int s_x, int s_y, int s_z, int s_pn, int8
|
|||
|
||||
bool initspriteforspawn(DDukeActor* act, const std::initializer_list<int> &excludes)
|
||||
{
|
||||
act->picnum = act->spr.picnum;
|
||||
act->attackertype = act->spr.picnum;
|
||||
act->timetosleep = 0;
|
||||
act->extra = -1;
|
||||
|
||||
|
@ -220,7 +220,7 @@ DDukeActor* spawn(DDukeActor* actj, int pn)
|
|||
auto spawned = EGS(actj->spr.sector(), actj->spr.pos.X, actj->spr.pos.Y, actj->spr.pos.Z, pn, 0, 0, 0, 0, 0, 0, actj, 0);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->picnum = actj->spr.picnum;
|
||||
spawned->attackertype = actj->spr.picnum;
|
||||
return fi.spawninit(actj, spawned, nullptr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
uint8_t cgg;
|
||||
uint8_t spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
|
||||
TObjPtr<DDukeActor*> ownerActor, hitOwnerActor;
|
||||
short picnum, ang, extra, movflag;
|
||||
short attackertype, ang, extra, movflag;
|
||||
short tempang, dispicnum;
|
||||
short timetosleep;
|
||||
int floorz, ceilingz, lastvx, lastvy, aflags;
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
ownerActor = nullptr;
|
||||
hitOwnerActor = nullptr;
|
||||
cgg = spriteextra = 0;
|
||||
picnum = ang = extra = movflag = tempang = dispicnum = timetosleep = 0;
|
||||
attackertype = ang = extra = movflag = tempang = dispicnum = timetosleep = 0;
|
||||
floorz = ceilingz = lastvx = lastvy = aflags = saved_ammo = 0;
|
||||
memset(temp_data, 0, sizeof(temp_data));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue