- removed most parameters from fall_common.

This commit is contained in:
Christoph Oelckers 2022-12-21 08:40:51 +01:00
parent a014b3436b
commit 04a027f748
5 changed files with 9 additions and 8 deletions

View file

@ -62,6 +62,7 @@ xx(DukeBloodSplat3)
xx(DukeBloodSplat1)
xx(DukeBloodSplat2)
xx(DukeBloodSplat4)
xx(DukeBloodPool)
xx(spawnstate)
xx(brokenstate)

View file

@ -3298,7 +3298,7 @@ void alterang(int ang, DDukeActor* actor, int playernum)
//
//---------------------------------------------------------------------------
void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLOODPOOL, int SHOTSPARK1, int squished, int thud, int(*fallspecial)(DDukeActor*, int))
void fall_common(DDukeActor *actor, int playernum, int DRONE, int(*fallspecial)(DDukeActor*, int))
{
actor->spr.xoffset = 0;
actor->spr.yoffset = 0;
@ -3346,13 +3346,13 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
if (sphit)
{
spawnguts(actor, PClass::FindActor(NAME_DukeJibs6), 5);
S_PlayActorSound(squished, actor);
S_PlayActorSound(SQUISHED, actor);
}
else
{
spawnguts(actor, PClass::FindActor(NAME_DukeJibs6), 15);
S_PlayActorSound(squished, actor);
spawn(actor, BLOODPOOL);
S_PlayActorSound(SQUISHED, actor);
spawn(actor, PClass::FindActor(NAME_DukeBloodPool));
}
}
@ -3370,7 +3370,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
if (sect != actor->sector() && sect != nullptr)
ChangeActorSect(actor, sect);
S_PlayActorSound(thud, actor);
S_PlayActorSound(THUD, actor);
}
}
if (actor->sector()->lotag == 1)

View file

@ -1335,7 +1335,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
void fall_d(DDukeActor *actor, int g_p)
{
fall_common(actor, g_p, DTILE_JIBS6, DTILE_DRONE, DTILE_BLOODPOOL, DTILE_SHOTSPARK1, SQUISHED, THUD, nullptr);
fall_common(actor, g_p, DTILE_DRONE, nullptr);
}
bool spawnweapondebris_d(int picnum)

View file

@ -1594,7 +1594,7 @@ static int fallspecial(DDukeActor *actor, int playernum)
void fall_r(DDukeActor* ac, int g_p)
{
fall_common(ac, g_p, RTILE_JIBS6, RTILE_DRONE, RTILE_BLOODPOOL, RTILE_SHOTSPARK1, 69, 158, fallspecial);
fall_common(ac, g_p, RTILE_DRONE, fallspecial);
}
//---------------------------------------------------------------------------

View file

@ -82,7 +82,7 @@ void handle_se130(DDukeActor* i, int countmax);
int dodge(DDukeActor*);
void alterang(int ang, DDukeActor* actor, int g_p);
void fall_common(DDukeActor* actor, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOTSPARK1, int squished, int thud, int(*fallspecial)(DDukeActor*, int));
void fall_common(DDukeActor* actor, int g_p, int DRONE, int(*fallspecial)(DDukeActor*, int));
void checkavailweapon(player_struct* p);
void addammo(int weapon, player_struct* p, int amount);