mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- added a few new flags and renamed some sprites.
All this is preparations for scriptifying the projectiles.
This commit is contained in:
parent
15fb7dab35
commit
44fa420387
10 changed files with 103 additions and 34 deletions
|
@ -699,7 +699,7 @@ static bool weaponhitsprite(DDukeActor *proj, DDukeActor *targ, const DVector3 &
|
|||
int p = targ->PlayerIndex();
|
||||
S_PlayActorSound(PISTOL_BODYHIT, targ);
|
||||
|
||||
if (proj->spr.picnum == SPIT)
|
||||
if (proj->spr.picnum == SHITBALL)
|
||||
{
|
||||
if (isRRRA() && proj->GetOwner() && proj->GetOwner()->spr.picnum == MAMA)
|
||||
{
|
||||
|
@ -741,7 +741,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const DVector3& oldpo
|
|||
rabbitguts(proj);
|
||||
}
|
||||
|
||||
if (proj->spr.picnum != RPG && (!isRRRA() || proj->spr.picnum != RPG2) && proj->spr.picnum != FREEZEBLAST && proj->spr.picnum != SPIT && proj->spr.picnum != SHRINKSPARK && (wal->overpicnum == MIRROR || wal->picnum == MIRROR))
|
||||
if (proj->spr.picnum != RPG && (!isRRRA() || proj->spr.picnum != RPG2) && proj->spr.picnum != FREEZEBLAST && proj->spr.picnum != SHITBALL && proj->spr.picnum != SHITBALL && (wal->overpicnum == MIRROR || wal->picnum == MIRROR))
|
||||
{
|
||||
DAngle walang = wal->delta().Angle();
|
||||
proj->spr.Angles.Yaw = walang * 2 - proj->spr.Angles.Yaw;
|
||||
|
@ -770,7 +770,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const DVector3& oldpo
|
|||
proj->spr.Angles.Yaw = walang * 2 - proj->spr.Angles.Yaw;
|
||||
return true;
|
||||
}
|
||||
if (proj->spr.picnum == SHRINKSPARK)
|
||||
if (proj->spr.picnum == SAWBLADE)
|
||||
{
|
||||
if (wal->picnum >= RRTILE3643 && wal->picnum < RRTILE3643 + 3)
|
||||
{
|
||||
|
@ -956,7 +956,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (proj->spr.picnum == SPIT) if (proj->vel.Z < 24)
|
||||
else if (proj->spr.picnum == SHITBALL) if (proj->vel.Z < 24)
|
||||
proj->vel.Z += gs.gravity - 112/256.;
|
||||
|
||||
if (coll.type != 0)
|
||||
|
@ -974,12 +974,12 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
if (weaponhitsector(proj, oldpos)) return;
|
||||
}
|
||||
|
||||
if (proj->spr.picnum != SPIT)
|
||||
if (proj->spr.picnum != SHITBALL)
|
||||
{
|
||||
if (proj->spr.picnum == RPG) rpgexplode(proj, coll.type, oldpos, EXPLOSION2, -1, -1, RPG_EXPLODE);
|
||||
else if (isRRRA() && proj->spr.picnum == RPG2) rpgexplode(proj, coll.type, oldpos, EXPLOSION2, -1, 150, 247);
|
||||
else if (isRRRA() && proj->spr.picnum == BOATGRENADE) rpgexplode(proj, coll.type, oldpos, EXPLOSION2, -1, 160, RPG_EXPLODE);
|
||||
else if (proj->spr.picnum != FREEZEBLAST && proj->spr.picnum != FIRELASER && proj->spr.picnum != SHRINKSPARK)
|
||||
else if (proj->spr.picnum != FREEZEBLAST && proj->spr.picnum != FIRELASER && proj->spr.picnum != SAWBLADE)
|
||||
{
|
||||
auto spawned = spawn(proj, 1441);
|
||||
if (spawned)
|
||||
|
@ -1047,10 +1047,10 @@ void moveweapons_r(void)
|
|||
case BOATGRENADE:
|
||||
if (!isRRRA()) continue;
|
||||
[[fallthrough]];
|
||||
case SHRINKSPARK:
|
||||
case SAWBLADE:
|
||||
case RPG:
|
||||
case FIRELASER:
|
||||
case SPIT:
|
||||
case SHITBALL:
|
||||
case COOLEXPLOSION1:
|
||||
case OWHIP:
|
||||
case UWHIP:
|
||||
|
|
|
@ -205,14 +205,14 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
case CRYSTALAMMO:
|
||||
t->shade = int(BobVal(PlayClock << 4) * 16);
|
||||
break;
|
||||
case SHRINKSPARK:
|
||||
case SAWBLADE:
|
||||
if (OwnerAc && (OwnerAc->spr.picnum == CHEER || OwnerAc->spr.picnum == CHEERSTAYPUT) && isRRRA())
|
||||
{
|
||||
t->picnum = CHEERBLADE + ((PlayClock >> 4) & 3);
|
||||
t->shade = -127;
|
||||
}
|
||||
else
|
||||
t->picnum = SHRINKSPARK + ((PlayClock >> 4) & 7);
|
||||
t->picnum = SAWBLADE + ((PlayClock >> 4) & 7);
|
||||
break;
|
||||
case CHEERBOMB:
|
||||
if (isRRRA())
|
||||
|
@ -221,14 +221,14 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
break;
|
||||
}
|
||||
else goto default_case;
|
||||
case SPIT:
|
||||
case SHITBALL:
|
||||
if (isRRRA() && OwnerAc)
|
||||
{
|
||||
if (OwnerAc->spr.picnum == MINION && OwnerAc->spr.pal == 8)
|
||||
t->picnum = RRTILE3500 + ((PlayClock >> 4) % 6);
|
||||
t->picnum = FROGBALL1 + ((PlayClock >> 4) % 6);
|
||||
else if (OwnerAc->spr.picnum == MINION && OwnerAc->spr.pal == 19)
|
||||
{
|
||||
t->picnum = RRTILE5090 + ((PlayClock >> 4) & 3);
|
||||
t->picnum = SHITBURN1 + ((PlayClock >> 4) & 3);
|
||||
t->shade = -127;
|
||||
}
|
||||
else if (OwnerAc->spr.picnum == MAMA)
|
||||
|
@ -241,13 +241,13 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
t->cstat |= CSTAT_SPRITE_XFLIP;
|
||||
}
|
||||
else t->cstat &= ~CSTAT_SPRITE_XFLIP;
|
||||
t->picnum = RRTILE7274 + k;
|
||||
t->picnum = RABBITBALL + k;
|
||||
}
|
||||
else
|
||||
t->picnum = SPIT + ((PlayClock >> 4) & 3);
|
||||
t->picnum = SHITBALL + ((PlayClock >> 4) & 3);
|
||||
}
|
||||
else
|
||||
t->picnum = SPIT + ((PlayClock >> 4) & 3);
|
||||
t->picnum = SHITBALL + ((PlayClock >> 4) & 3);
|
||||
break;
|
||||
case EMPTYBIKE:
|
||||
if (!isRRRA()) goto default_case;
|
||||
|
@ -646,7 +646,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
case FREEZEBLAST:
|
||||
case ATOMICHEALTH:
|
||||
case FIRELASER:
|
||||
case SHRINKSPARK:
|
||||
case SAWBLADE:
|
||||
case CHAINGUN:
|
||||
case RPG:
|
||||
case EXPLOSION3:
|
||||
|
|
|
@ -376,6 +376,12 @@ enum sflags2_t
|
|||
SFLAG2_DONTDIVE = 0x00400000,
|
||||
SFLAG2_FLOATING = 0x00800000,
|
||||
SFLAG2_PAL8OOZ = 0x01000000, // dirty hack - only needed because this needs to work from CON.
|
||||
SFLAG2_SPAWNRABBITGUTS = 0x02000000, // this depends on the shooter, not the projectile so it has to be done with a flag.
|
||||
SFLAG2_NONSMOKYROCKET = 0x04000000, // same with this one. Flags should later be copied to the projectile once posible.
|
||||
SFLAG2_MIRRORREFLECT = 0x08000000,
|
||||
SFLAG2_ALTPROJECTILESPRITE = 0x10000000, // yet another shooter flag. :(
|
||||
SFLAG2_UNDERWATERSLOWDOWN = 0x20000000,
|
||||
|
||||
};
|
||||
|
||||
using EDukeFlags2 = TFlags<sflags2_t, uint32_t>;
|
||||
|
|
|
@ -118,7 +118,8 @@ void initactorflags_d()
|
|||
setflag(SFLAG2_DONTANIMATE, { TRIPBOMB, LASERLINE });
|
||||
setflag(SFLAG2_INTERPOLATEANGLE, { BEARINGPLATE });
|
||||
setflag(SFLAG2_GREENBLOOD, { OOZFILTER, NEWBEAST });
|
||||
setflag(SFLAG2_ALWAYSROTATE1, { RAT, CAMERA1 });
|
||||
setflag(SFLAG2_ALWAYSROTATE1, { RPG, RAT, CAMERA1 });
|
||||
setflag(SFLAG2_ALWAYSROTATE2, { RPG });
|
||||
setflag(SFLAG2_DIENOW, { RADIUSEXPLOSION, KNEE });
|
||||
setflag(SFLAG2_TRANFERPALTOJIBS, { LIZTROOP });
|
||||
setflag(SFLAG2_NORADIUSPUSH, { TANK, ROTATEGUN, RECON });
|
||||
|
@ -128,6 +129,9 @@ void initactorflags_d()
|
|||
setflag(SFLAG2_IGNOREHITOWNER, { RECON });
|
||||
setflag(SFLAG2_NODAMAGEPUSH, { RECON, TANK, ROTATEGUN });
|
||||
setflag(SFLAG2_FLOATING, { DRONE, SHARK, COMMANDER });
|
||||
setflag(SFLAG2_NONSMOKYROCKET, { BOSS2 }); // If this wasn't needed for a CON defined actor it could be handled better
|
||||
setflag(SFLAG2_MIRRORREFLECT, { SHRINKSPARK, FIRELASER, COOLEXPLOSION1 });
|
||||
setflag(SFLAG2_UNDERWATERSLOWDOWN, { RPG });
|
||||
|
||||
if (isWorldTour())
|
||||
{
|
||||
|
|
|
@ -176,7 +176,8 @@ void initactorflags_r()
|
|||
if (isRRRA()) setflag(SFLAG2_BREAKMIRRORS, { RPG2 });
|
||||
setflag(SFLAG2_CAMERA, { CAMERA1 });
|
||||
setflag(SFLAG2_GREENBLOOD, { OOZFILTER });
|
||||
setflag(SFLAG2_ALWAYSROTATE1, { RAT, CAMERA1 });
|
||||
setflag(SFLAG2_ALWAYSROTATE1, { RPG, RAT, CAMERA1 });
|
||||
setflag(SFLAG2_ALWAYSROTATE2, { RPG });
|
||||
setflag(SFLAG2_DIENOW, { RADIUSEXPLOSION });
|
||||
setflag(SFLAG2_NORADIUSPUSH, { HULK });
|
||||
setflag(SFLAG2_FREEZEDAMAGE | SFLAG2_REFLECTIVE, { FREEZEBLAST });
|
||||
|
@ -197,6 +198,10 @@ void initactorflags_r()
|
|||
setflag(SFLAG2_NORADIUSPUSH, { MAMA, BILLYPLAY, COOTPLAY, MAMACLOUD });
|
||||
setflag(SFLAG2_DONTDIVE, { CHEERBOAT, HULKBOAT, MINIONBOAT, UFO1_RRRA });
|
||||
setflag(SFLAG2_FLOATING, { UFO1_RRRA });
|
||||
setflag(SFLAG2_SPAWNRABBITGUTS, { MAMA });
|
||||
setflag(SFLAG2_ALTPROJECTILESPRITE, { CHEER, CHEERSTAYPUT });
|
||||
setflag(SFLAG2_UNDERWATERSLOWDOWN, { RPG2 });
|
||||
setflag(SFLAG2_ALWAYSROTATE2, { RPG2 });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -402,6 +402,25 @@ x(FETUSBROKE, 1359)
|
|||
x(MONK, 1352)
|
||||
x(LUKE, 1354)
|
||||
x(COOLEXPLOSION1, 1360)
|
||||
x(COOLEXPLOSION2, 1361)
|
||||
x(COOLEXPLOSION3, 1362)
|
||||
x(COOLEXPLOSION4, 1363)
|
||||
x(COOLEXPLOSION5, 1364)
|
||||
x(COOLEXPLOSION6, 1365)
|
||||
x(COOLEXPLOSION7, 1366)
|
||||
x(COOLEXPLOSION8, 1367)
|
||||
x(COOLEXPLOSION9, 1368)
|
||||
x(COOLEXPLOSION10, 1369)
|
||||
x(COOLEXPLOSION11, 1370)
|
||||
x(COOLEXPLOSION12, 1371)
|
||||
x(COOLEXPLOSION13, 1372)
|
||||
x(COOLEXPLOSION14, 1373)
|
||||
x(COOLEXPLOSION15, 1374)
|
||||
x(COOLEXPLOSION16, 1375)
|
||||
x(COOLEXPLOSION17, 1376)
|
||||
x(COOLEXPLOSION18, 1377)
|
||||
x(COOLEXPLOSION19, 1378)
|
||||
x(COOLEXPLOSION20, 1379)
|
||||
x(WATERSPLASH2, 1380)
|
||||
x(FIREVASE, 1390)
|
||||
x(SCRATCH, 1393)
|
||||
|
@ -423,7 +442,10 @@ x(FIST, 1640)
|
|||
x(FREEZEBLAST, 1641)
|
||||
x(DEVISTATORBLAST, 1642)
|
||||
x(SHRINKSPARK, 1646)
|
||||
x(TONGUE, 1647)
|
||||
x(SHRINKSPARK1, 1647)
|
||||
x(SHRINKSPARK2, 1648)
|
||||
x(SHRINKSPARK3, 1649)
|
||||
x(TONGUE, 1647) // this is development garbage.
|
||||
x(MORTER, 1650)
|
||||
x(SHRINKEREXPLOSION, 1656)
|
||||
x(RADIUSEXPLOSION, 1670)
|
||||
|
|
|
@ -982,13 +982,28 @@ x(SCUBAMASK, 3374)
|
|||
x(CHAINGUN, 3380)
|
||||
x(SHRINKER, 3384)
|
||||
x(CIRCLESTUCK, 3388)
|
||||
x(SPIT, 3390)
|
||||
x(SHITBALL, 3390)
|
||||
x(SHITBALL2, 3391)
|
||||
x(SHITBALL3, 3392)
|
||||
x(SHITBALL4, 3393)
|
||||
x(GROWSPARK, 3395)
|
||||
x(SHRINKSPARK, 3400)
|
||||
x(SAWBLADE, 3400)
|
||||
x(SAWBLADE2, 3401)
|
||||
x(SAWBLADE3, 3402)
|
||||
x(SAWBLADE4, 3403)
|
||||
x(SAWBLADE5, 3404)
|
||||
x(SAWBLADE6, 3405)
|
||||
x(SAWBLADE7, 3406)
|
||||
x(SAWBLADE8, 3407)
|
||||
x(LUMBERBLADE1, 3410)
|
||||
x(LUMBERBLADE, 3411)
|
||||
x(FREEZE, 3415)
|
||||
x(FIRELASER, 3420)
|
||||
x(FIRELASER2, 3421)
|
||||
x(FIRELASER3, 3422)
|
||||
x(FIRELASER4, 3423)
|
||||
x(FIRELASER5, 3424)
|
||||
x(FIRELASER6, 3425)
|
||||
x(BOWLINGBALLH, 3428)
|
||||
x(BOWLINGBALL, 3430)
|
||||
x(BOWLINGBALLSPRITE, 3437)
|
||||
|
@ -1003,7 +1018,12 @@ x(RPGGUN2, 3482)
|
|||
y(RRTILE3497, 3497)
|
||||
y(RRTILE3498, 3498)
|
||||
y(RRTILE3499, 3499)
|
||||
y(RRTILE3500, 3500)
|
||||
y(FROGBALL1, 3500)
|
||||
y(FROGBALL2, 3501)
|
||||
y(FROGBALL3, 3502)
|
||||
y(FROGBALL4, 3503)
|
||||
y(FROGBALL5, 3504)
|
||||
y(FROGBALL6, 3505)
|
||||
x(SLINGBLADE, 3510)
|
||||
y(RRTILE3584, 3584)
|
||||
y(RRTILE3586, 3586)
|
||||
|
@ -1129,7 +1149,10 @@ y(RRTILE5085, 5085)
|
|||
y(RRTILE5086, 5086)
|
||||
y(RRTILE5087, 5087)
|
||||
y(RRTILE5088, 5088)
|
||||
y(RRTILE5090, 5090)
|
||||
y(SHITBURN1, 5090)
|
||||
y(SHITBURN2, 5091)
|
||||
y(SHITBURN3, 5092)
|
||||
y(SHITBURN4, 5093)
|
||||
x(SHARK, 5501)
|
||||
x(FEM10, 5581)
|
||||
x(TOUGHGAL, 5583)
|
||||
|
@ -1370,6 +1393,9 @@ x(BOULDER1, 264)
|
|||
x(TORNADO, 1930)
|
||||
x(CHEERBOMB, 3464)
|
||||
x(CHEERBLADE, 3460)
|
||||
x(CHEERBLADE2, 3461)
|
||||
x(CHEERBLADE3, 3462)
|
||||
x(CHEERBLADE4, 3463)
|
||||
x(DOGATTACK, 4060)
|
||||
x(BILLYWALK, 4096)
|
||||
x(BILLYDIE, 4137)
|
||||
|
@ -1479,7 +1505,7 @@ x(BILLYPLAY, 7035)
|
|||
x(MINIONBOAT, 7192)
|
||||
x(HULKBOAT, 7199)
|
||||
x(CHEERBOAT, 7206)
|
||||
y(RRTILE7274, 7274)
|
||||
y(RABBITBALL, 7274)
|
||||
x(RABBIT, 7280)
|
||||
x(RABBITJIBA, 7387)
|
||||
x(RABBITJIBB, 7392)
|
||||
|
|
|
@ -462,10 +462,10 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
|
|||
|
||||
if (isRRRA())
|
||||
{
|
||||
if (atwith != SPIT && actor->spr.extra >= 0) actor->spr.shade = -96;
|
||||
if (atwith != SHITBALL && actor->spr.extra >= 0) actor->spr.shade = -96;
|
||||
|
||||
scount = 1;
|
||||
if (atwith == SPIT)
|
||||
if (atwith == SHITBALL)
|
||||
{
|
||||
if (actor->spr.picnum == 8705)
|
||||
vel = 37.5;
|
||||
|
@ -478,9 +478,9 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
|
|||
if (actor->spr.extra >= 0) actor->spr.shade = -96;
|
||||
|
||||
scount = 1;
|
||||
if (atwith == SPIT) vel = 25;
|
||||
if (atwith == SHITBALL) vel = 25;
|
||||
}
|
||||
if (atwith != SPIT)
|
||||
if (atwith != SHITBALL)
|
||||
{
|
||||
vel = 52.5;
|
||||
pos.Z -= 4;
|
||||
|
@ -532,7 +532,7 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
|
|||
double oldzvel = zvel;
|
||||
double scale = p >= 0? 0.109375 : atwith == COOLEXPLOSION1? 0.125 : 0.28125;
|
||||
|
||||
if (atwith == SPIT)
|
||||
if (atwith == SHITBALL)
|
||||
{
|
||||
if (!isRRRA() || actor->spr.picnum != MAMA) pos.Z -= 10; else pos.Z -= 20;
|
||||
}
|
||||
|
@ -892,7 +892,7 @@ void shoot_r(DDukeActor* actor, int atwith, PClass* cls)
|
|||
return;
|
||||
|
||||
case FIRELASER:
|
||||
case SPIT:
|
||||
case SHITBALL:
|
||||
case COOLEXPLOSION1:
|
||||
shootstuff(actor, p, spos, sang, atwith);
|
||||
return;
|
||||
|
@ -907,7 +907,7 @@ void shoot_r(DDukeActor* actor, int atwith, PClass* cls)
|
|||
[[fallthrough]];
|
||||
|
||||
case RPG:
|
||||
case SHRINKSPARK:
|
||||
case SAWBLADE:
|
||||
rrra_rpg2:
|
||||
shootrpg(actor, p, spos, sang, atwith);
|
||||
break;
|
||||
|
@ -2956,7 +2956,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
if (p->kickback_pic == 1)
|
||||
{
|
||||
p->ammo_amount[THROWSAW_WEAPON]--;
|
||||
fi.shoot(pact, SHRINKSPARK, nullptr);
|
||||
fi.shoot(pact, SAWBLADE, nullptr);
|
||||
checkavailweapon(p);
|
||||
}
|
||||
p->kickback_pic++;
|
||||
|
|
|
@ -1305,7 +1305,7 @@ void checkhitdefault_r(DDukeActor* targ, DDukeActor* proj)
|
|||
if ((targ->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL) && targ->spr.hitag == 0 && targ->spr.lotag == 0 && targ->spr.statnum == 0)
|
||||
return;
|
||||
|
||||
if ((proj->spr.picnum == SHRINKSPARK || proj->spr.picnum == FREEZEBLAST || proj->GetOwner() != targ) && targ->spr.statnum != 4)
|
||||
if ((proj->spr.picnum == SAWBLADE || proj->spr.picnum == FREEZEBLAST || proj->GetOwner() != targ) && targ->spr.statnum != 4)
|
||||
{
|
||||
if (badguy(targ) == 1)
|
||||
{
|
||||
|
|
|
@ -334,4 +334,10 @@ enum sflags2_t
|
|||
SFLAG2_DONTDIVE = 0x00400000,
|
||||
SFLAG2_FLOATING = 0x00800000,
|
||||
SFLAG2_PAL8OOZ = 0x01000000, // dirty hack - only needed because this needs to work from CON.
|
||||
SFLAG2_SPAWNRABBITGUTS = 0x02000000, // this depends on the shooter, not the projectile so it has to be done with a flag.
|
||||
SFLAG2_NONSMOKYROCKET = 0x04000000, // same with this one. Flags should later be copied to the projectile once posible.
|
||||
SFLAG2_MIRRORREFLECT = 0x08000000,
|
||||
SFLAG2_ALTPROJECTILESPRITE = 0x10000000, // yet another shooter flag. RRRA has some projectiles with alternative visuals, again this is on the caller thanks to CON.
|
||||
SFLAG2_UNDERWATERSLOWDOWN = 0x20000000,
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue