- got rid of the laat picnums in Blood.

This commit is contained in:
Christoph Oelckers 2023-01-03 00:03:17 +01:00
parent a662a3bd12
commit 4e8dfe8986
4 changed files with 36 additions and 24 deletions

View file

@ -103,12 +103,6 @@ const GENDUDESND gCustomDudeSnd[] = {
{ 9008, 0, 17, false, false }, // transforming in other dude
};
// for kModernThingThrowableRock
const int16_t gCustomDudeDebrisPics[6] = {
2406, 2280, 2185, 2155, 2620, 3135
};
//---------------------------------------------------------------------------
//
@ -344,7 +338,7 @@ static void ThrowThing(DBloodActor* actor, bool impact)
case kModernThingThrowableRock:
{
double s = 0.375 + Random(42) * REPEAT_SCALE;
spawned->spr.picnum = gCustomDudeDebrisPics[Random(5)];
spawned->spr.setspritetexture(aTexIds[kTexROCKDEBRIS1 + Random(5)]);
spawned->spr.scale = DVector2(s, s);
spawned->spr.cstat |= CSTAT_SPRITE_BLOCK;
spawned->spr.pal = 5;

View file

@ -86,22 +86,23 @@ static const int effectDetail[kViewEffectMax] = {
struct WEAPONICON {
int16_t nTile;
uint8_t zOffset;
FTextureID textureID() const { return tileGetTextureID(nTile); }
};
static const WEAPONICON gWeaponIcon[] = {
{ -1, 0 },
{ -1, 0 }, // 1: pitchfork
{ 524, 6 }, // 2: flare gun
{ 559, 6 }, // 3: shotgun
{ 558, 8 }, // 4: tommy gun
{ 526, 6 }, // 5: napalm launcher
{ 589, 11 }, // 6: dynamite
{ 618, 11 }, // 7: spray can
{ 539, 6 }, // 8: tesla gun
{ 800, 0 }, // 9: life leech
{ 525, 11 }, // 10: voodoo doll
{ 811, 11 }, // 11: proxy bomb
{ 810, 11 }, // 12: remote bomb
{ kICONFLAREGUN, 6 }, // 2: flare gun
{ kICONSHOTGUN, 6 }, // 3: shotgun
{ kICONTOMMY, 8 }, // 4: tommy gun
{ kICONNAPALM, 6 }, // 5: napalm launcher
{ kAmmoIcon5, 11 }, // 6: dynamite
{ kAmmoIcon6, 11 }, // 7: spray can
{ kICONTESLA, 6 }, // 8: tesla gun
{ kICONLEECH, 0 }, // 9: life leech
{ kAmmoIcon9, 11 }, // 10: voodoo doll
{ kAmmoIcon10, 11 }, // 11: proxy bomb
{ kAmmoIcon11, 11 }, // 12: remote bomb
{ -1, 0 },
};
@ -133,7 +134,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
if (!pNSprite2)
break;
pNSprite2->picnum = 2203;
pNSprite2->setspritetexture(aTexIds[kTexSPOTPROGRESS]);
pNSprite2->scale = DVector2(width * REPEAT_SCALE, 0.3125);
pNSprite2->pal = 10;
@ -466,17 +467,17 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
assert(pTSprite->type >= kDudePlayer1 && pTSprite->type <= kDudePlayer8);
PLAYER* pPlayer = &gPlayer[pTSprite->type - kDudePlayer1];
WEAPONICON weaponIcon = gWeaponIcon[pPlayer->curWeapon];
auto& nTile = weaponIcon.nTile;
if (nTile < 0) break;
auto nTex = weaponIcon.textureID();
if (!nTex.isValid()) break;
auto pNSprite = viewInsertTSprite(tsprites, pTSprite->sectp, 32767, pTSprite);
if (!pNSprite)
break;
pNSprite->pos = pTSprite->pos.plusZ(-32 - weaponIcon.zOffset);
pNSprite->picnum = nTile;
pNSprite->setspritetexture(nTex);
pNSprite->shade = pTSprite->shade;
pNSprite->scale = DVector2(0.5, 0.5);
int nVoxel = GetExtInfo(tileGetTextureID(nTile)).tiletovox;
int nVoxel = GetExtInfo(nTex).tiletovox;
if (cl_showweapon == 2 && r_voxels && nVoxel != -1)
{
auto gView = &gPlayer[gViewIndex];
@ -674,11 +675,12 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
}
nShade += GetExtInfo(pTSprite->spritetexture()).tileshade;
pTSprite->shade = ClipRange(nShade, -128, 127);
#if 0 // This was disabled because it seemingly cannot be activated (see comment below) and the sprites being used here are part of something else.
if ((pTSprite->flags & kHitagRespawn) && pTSprite->ownerActor->spr.intowner == 3 && owneractor->hasX()) // Where does this 3 come from? Nothing sets it.
{
pTSprite->scale = DVector2(0.75, 0.75);
pTSprite->shade = -128;
pTSprite->picnum = 2272 + 2 * owneractor->xspr.respawnPending;
pTSprite->p icnum = 2272 + 2 * owneractor->xspr.respawnPending;
pTSprite->cstat &= ~(CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_TRANS_FLIP);
if (((IsItemSprite(pTSprite) || IsAmmoSprite(pTSprite)) && gGameOptions.nItemSettings == 2)
|| (IsWeaponSprite(pTSprite) && gGameOptions.nWeaponSettings == 3))
@ -690,6 +692,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
pTSprite->scale = DVector2(0, 0);
}
}
#endif
if (owneractor->hasX() && owneractor->xspr.burnTime > 0)
{
pTSprite->shade = ClipRange(pTSprite->shade - 16 - QRandom(8), -128, 127);

View file

@ -196,6 +196,7 @@ x(ICONSHOTGUN, 559)
x(ICONTOMMY, 558)
x(ICONTESLA, 539)
x(ICONLEECH, 800)
x(ICONNAPALM, 526)
x(FLESHHIT, 2123)
x(ATOMEFFECT, 1720)
@ -218,3 +219,10 @@ x(BULLETCASE, 2465)
x(SHELLCASE, 2464)
x(WATERDRIP, 1147)
x(BLOODDRIP, 1160)
x(SPOTPROGRESS, 2203)
x(ROCKDEBRIS1, 2406)
x(ROCKDEBRIS2, 2280)
x(ROCKDEBRIS3, 2185)
x(ROCKDEBRIS4, 2155)
x(ROCKDEBRIS5, 2620)
x(ROCKDEBRIS6, 3135)

View file

@ -22,3 +22,10 @@ x(FLAGHAVE)
x(ICONLEECH)
x(WATERDRIP)
x(BLOODDRIP)
x(SPOTPROGRESS)
x(ROCKDEBRIS1)
x(ROCKDEBRIS2)
x(ROCKDEBRIS3)
x(ROCKDEBRIS4)
x(ROCKDEBRIS5)
x(ROCKDEBRIS6)