- chunksofmeat

This commit is contained in:
Christoph Oelckers 2021-11-14 08:53:41 +01:00
parent c74c868dce
commit 8b213edf4c
15 changed files with 58 additions and 54 deletions

View file

@ -208,7 +208,7 @@ static void nukeddemon(PLAYER& plr, DWHActor* actor)
int i = actor->GetSpriteIndex();
SPRITE& spr = actor->s();
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
}

View file

@ -233,7 +233,7 @@ static void nukeddevil(PLAYER& plr, DWHActor* actor)
SPRITE& spr = actor->s();
if (isWh2()) {
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
return;

View file

@ -260,7 +260,7 @@ static void nukedgonzo(PLAYER& plr, DWHActor* actor)
int i = actor->GetSpriteIndex();
SPRITE& spr = actor->s();
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
}

View file

@ -191,7 +191,7 @@ static void nukedgron(PLAYER& plr, DWHActor* actor)
SPRITE& spr = actor->s();
if (isWh2()) {
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
return;

View file

@ -78,7 +78,7 @@ static void nukedguardian(PLAYER& plr, DWHActor* actor)
SPRITE& spr = actor->s();
if (isWh2()) {
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
return;

View file

@ -145,7 +145,7 @@ static void nukedimp(PLAYER& plr, DWHActor* actor)
int i = actor->GetSpriteIndex();
SPRITE& spr = actor->s();
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
}

View file

@ -284,7 +284,7 @@ static void nukedkobold(PLAYER& plr, DWHActor* actor)
SPRITE& spr = actor->s();
if (isWh2()) {
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
return;

View file

@ -26,7 +26,7 @@ static void nukedkurt(PLAYER& plr, DWHActor* actor)
int i = actor->GetSpriteIndex();
SPRITE& spr = actor->s();
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
}

View file

@ -138,7 +138,7 @@ static void nukedminotaur(PLAYER& plr, DWHActor* actor)
SPRITE& spr = actor->s();
if (isWh2()) {
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
return;

View file

@ -173,7 +173,7 @@ static void nukednewguy(PLAYER& plr, DWHActor* actor)
int i = actor->GetSpriteIndex();
SPRITE& spr = actor->s();
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
}

View file

@ -288,7 +288,7 @@ static void nukedskeleton(PLAYER& plr, DWHActor* actor)
SPRITE& spr = actor->s();
if (isWh2()) {
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
return;

View file

@ -241,7 +241,7 @@ static void nukedwillow(PLAYER& plr, DWHActor* actor)
SPRITE& spr = actor->s();
if (isWh2()) {
chunksofmeat(plr, i, spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
chunksofmeat(plr, actor,spr.x, spr.y, spr.z, spr.sectnum, spr.ang);
trailingsmoke(actor,false);
SetNewStatus(actor, DIE);
}

View file

@ -897,6 +897,7 @@ void madenoise(PLAYER& plr, int val, int x, int y, int z) {
void shootgun(PLAYER& plr, float ang, int guntype) {
int k = 0, daz2;
short j;
DWHActor* hitActor = nullptr;
int daang = (int) ang;
@ -915,7 +916,10 @@ void shootgun(PLAYER& plr, float ang, int guntype) {
pHitInfo, CLIPMASK1);
if (pHitInfo.hitsprite >= 0)
{
madeahit = true;
hitActor = &whActors[pHitInfo.hitsprite];
}
if (pHitInfo.hitwall >= 0) {
if ((abs(plr.x - pHitInfo.hitx) + abs(plr.y - pHitInfo.hity) < 512)
@ -1295,98 +1299,98 @@ void shootgun(PLAYER& plr, float ang, int guntype) {
case 1: // knife
if (plr.currweaponframe == KNIFEATTACK + 6)
if (plr.currweaponanim == 8 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == KNIFEATTACK2 + 2)
if (plr.currweaponanim == 5 || plr.currweaponanim == 9 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 2: // short sword
if (plr.currweaponframe == GOBSWORDATTACK + 4
|| plr.currweaponframe == ZSHORTATTACK + 7)
if (plr.currweaponanim == 4 && plr.currweapontics == 10)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == GOBSWORDATTACK2 + 4
|| plr.currweaponframe == ZSHORTATTACK + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 10)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 3: // morning
if (plr.currweaponframe == MORNINGSTAR + 5 || plr.currweaponframe == ZSTARATTACK + 7)
if (plr.currweaponanim == 7 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == MORNINGATTACK2 + 3
|| plr.currweaponframe == ZSTARATTACK2 + 3)
if (plr.currweaponanim == 3 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 4: // sword
if (plr.currweaponframe == SWORDATTACK + 7)
if (plr.currweaponanim == 7 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == SWORDATTACK2 + 6)
if (plr.currweaponanim == 6 && plr.currweapontics == 8)
break;
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
pHitInfo.hitsect, daang);
case 5: // battleaxe
if (plr.currweaponframe == BIGAXEATTACK + 7 || plr.currweaponframe == ZAXEATTACK + 12)
if (plr.currweaponanim == 7 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == BIGAXEATTACK2 + 6 || plr.currweaponframe == ZAXEATTACK2 + 6)
if (plr.currweaponanim == 6 && plr.currweapontics == 12)
break;
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
pHitInfo.hitsect, daang);
case 6: // bow
if (plr.currweaponframe == BOWWALK + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 6)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == ZBOWATTACK + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 6)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 7: // pike
if (plr.currweaponframe == PIKEATTACK1 + 4 || plr.currweaponframe == ZPIKEATTACK + 4)
if (plr.currweaponanim == 8 && plr.currweapontics == 10)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == PIKEATTACK2 + 4 || plr.currweaponframe == ZPIKEATTACK2 + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 10)
break;
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
pHitInfo.hitsect, daang);
case 8: // two handed sword
if (plr.currweaponframe == EXCALATTACK1 + 7
|| plr.currweaponframe == ZTWOHANDATTACK + 12)
if (plr.currweaponanim == 7 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == EXCALATTACK2 + 5
|| plr.currweaponframe == ZTWOHANDATTACK2 + 5)
if (plr.currweaponanim == 5 && plr.currweapontics == 8)
break;
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
pHitInfo.hitsect, daang);
case 9: // halberd
if (plr.currweaponframe == HALBERDATTACK1 + 3
|| plr.currweaponframe == ZHALBERDATTACK + 4)
if (plr.currweaponanim == 6 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == HALBERDATTACK2 + 3
|| plr.currweaponframe == ZHALBERDATTACK2 + 3)
if (plr.currweaponanim == 4 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
}
@ -1500,98 +1504,98 @@ void shootgun(PLAYER& plr, float ang, int guntype) {
case 1: // knife
if (plr.currweaponframe == KNIFEATTACK + 6)
if (plr.currweaponanim == 8 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == KNIFEATTACK2 + 2)
if (plr.currweaponanim == 5 || plr.currweaponanim == 9 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 2: // short sword
if (plr.currweaponframe == GOBSWORDATTACK + 4
|| plr.currweaponframe == ZSHORTATTACK + 7)
if (plr.currweaponanim == 4 && plr.currweapontics == 10)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == GOBSWORDATTACK2 + 4
|| plr.currweaponframe == ZSHORTATTACK2 + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 10)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 3: // morning
if (plr.currweaponframe == MORNINGSTAR + 5 || plr.currweaponframe == ZSTARATTACK + 7)
if (plr.currweaponanim == 7 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == MORNINGATTACK2 + 3
|| plr.currweaponframe == ZSTARATTACK2 + 3)
if (plr.currweaponanim == 3 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 4: // sword
if (plr.currweaponframe == SWORDATTACK + 7)
if (plr.currweaponanim == 7 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == SWORDATTACK2 + 6)
if (plr.currweaponanim == 6 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 5: // battleaxe
if (plr.currweaponframe == BIGAXEATTACK + 7 || plr.currweaponframe == ZAXEATTACK + 12)
if (plr.currweaponanim == 7 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == BIGAXEATTACK2 + 6 || plr.currweaponframe == ZAXEATTACK2 + 6)
if (plr.currweaponanim == 6 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 6: // bow
if (plr.currweaponframe == BOWWALK + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 6)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == ZBOWATTACK + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 6)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 7: // pike
if (plr.currweaponframe == PIKEATTACK1 + 4 || plr.currweaponframe == ZPIKEATTACK + 4)
if (plr.currweaponanim == 8 && plr.currweapontics == 10)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == PIKEATTACK2 + 4 || plr.currweaponframe == ZPIKEATTACK2 + 4)
if (plr.currweaponanim == 4 && plr.currweapontics == 10)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 8: // two handed sword
if (plr.currweaponframe == EXCALATTACK1 + 7
|| plr.currweaponframe == ZTWOHANDATTACK + 12)
if (plr.currweaponanim == 7 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == EXCALATTACK2 + 5
|| plr.currweaponframe == ZTWOHANDATTACK2 + 5)
if (plr.currweaponanim == 5 && plr.currweapontics == 8)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
case 9: // halberd
if (plr.currweaponframe == HALBERDATTACK1 + 3
|| plr.currweaponframe == ZHALBERDATTACK + 4)
if (plr.currweaponanim == 6 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
if (plr.currweaponframe == HALBERDATTACK2 + 3
|| plr.currweaponframe == ZHALBERDATTACK2 + 3)
if (plr.currweaponanim == 4 && plr.currweapontics == 12)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity,
pHitInfo.hitz, pHitInfo.hitsect, daang);
break;
}
@ -1606,7 +1610,7 @@ void shootgun(PLAYER& plr, float ang, int guntype) {
if (plr.selectedgun > 1) {
// JSA GORE on death ?
// RAF ans:death
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
pHitInfo.hitsect, daang);
if (hitspr.picnum == SKELETON
|| hitspr.picnum == SKELETONATTACK
@ -1807,7 +1811,7 @@ void shootgun(PLAYER& plr, float ang, int guntype) {
if (hitspr.hitag <= 0) {
newstatus(pHitInfo.hitsprite, DIE);
if (hitspr.picnum == RAT)
chunksofmeat(plr, pHitInfo.hitsprite, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
chunksofmeat(plr, hitActor, pHitInfo.hitx, pHitInfo.hity, pHitInfo.hitz,
pHitInfo.hitsect, daang);
} else {
hitspr.ang = (short) (getangle(plr.x - hitspr.x,

View file

@ -223,7 +223,7 @@ void playerdead(PLAYER& plr);
void initplayersprite(PLAYER& plr);
void updateviewmap(PLAYER& plr);
void plruse(PLAYER& plr);
void chunksofmeat(PLAYER& plr, int hitsprite, int hitx, int hity, int hitz, short hitsect, int daang);
void chunksofmeat(PLAYER& plr, DWHActor* hitsprite, int hitx, int hity, int hitz, short hitsect, int daang);
void addhealth(PLAYER& plr, int hp);
void addarmor(PLAYER& plr, int arm);
void addscore(PLAYER* plr, int score);

View file

@ -279,7 +279,7 @@ void plruse(PLAYER& plr) {
}
}
void chunksofmeat(PLAYER& plr, int hitsprite, int hitx, int hity, int hitz, short hitsect, int daang) {
void chunksofmeat(PLAYER& plr, DWHActor* hitActor, int hitx, int hity, int hitz, short hitsect, int daang) {
int j;
short k;
@ -287,7 +287,7 @@ void chunksofmeat(PLAYER& plr, int hitsprite, int hitx, int hity, int hitz, shor
int chunk = REDCHUNKSTART;
int newchunk;
auto& hitspr = sprite[hitsprite];
auto& hitspr = hitActor->s();
if (adult_lockout)
return;
@ -341,7 +341,7 @@ void chunksofmeat(PLAYER& plr, int hitsprite, int hitx, int hity, int hitz, shor
spritesound(S_GORE1 + (krand() % 4), &hitspr);
}
if ((hitsprite >= 0) && (hitspr.statnum < MAXSTATUS)) {
if (hitActor != nullptr) {
for (k = 0; k < zgore; k++) {
newchunk = 0;