mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Factor out modification of DukePlayer_t->actors_killed into P_AddKills().
git-svn-id: https://svn.eduke32.com/eduke32@6319 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9fdfd10723
commit
57a7802f6c
4 changed files with 13 additions and 7 deletions
|
@ -3947,7 +3947,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
int const newSprite = A_Spawn(spriteNum, EXPLOSION2);
|
||||
A_PlaySound(LASERTRIP_EXPLODE, newSprite);
|
||||
A_Spawn(spriteNum, PIGCOP);
|
||||
g_player[myconnectindex].ps->actors_killed++;
|
||||
P_AddKills(g_player[myconnectindex].ps, 1);
|
||||
DELETE_SPRITE_AND_CONTINUE(spriteNum);
|
||||
}
|
||||
|
||||
|
@ -4173,7 +4173,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
if (damageTile == FREEZEBLAST)
|
||||
goto next_sprite;
|
||||
|
||||
pPlayer->actors_killed++;
|
||||
P_AddKills(pPlayer, 1);
|
||||
|
||||
for (bssize_t j = 16; j >= 0; --j)
|
||||
{
|
||||
|
@ -4234,7 +4234,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
sprite[j].pal = 0;
|
||||
}
|
||||
|
||||
pPlayer->actors_killed++;
|
||||
P_AddKills(pPlayer, 1);
|
||||
pData[0] = -3;
|
||||
|
||||
if (pPlayer->somethingonplayer == spriteNum)
|
||||
|
@ -4315,7 +4315,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
goto next_sprite;
|
||||
}
|
||||
|
||||
pPlayer->actors_killed++;
|
||||
P_AddKills(pPlayer, 1);
|
||||
|
||||
if ((krand()&255) < 32)
|
||||
{
|
||||
|
|
|
@ -1728,7 +1728,7 @@ skip_check:
|
|||
|
||||
case CON_ADDKILLS:
|
||||
insptr++;
|
||||
pPlayer->actors_killed += *insptr++;
|
||||
P_AddKills(pPlayer, *insptr++);
|
||||
vm.pActor->actorstayput = -1;
|
||||
continue;
|
||||
|
||||
|
@ -5898,7 +5898,7 @@ void A_Execute(int spriteNum, int playerNum, int playerDist)
|
|||
if (EDUKE32_PREDICT_FALSE((unsigned)vm.pSprite->sectnum >= MAXSECTORS))
|
||||
{
|
||||
if (A_CheckEnemySprite(vm.pSprite))
|
||||
vm.pPlayer->actors_killed++;
|
||||
P_AddKills(vm.pPlayer, 1);
|
||||
|
||||
A_DeleteSprite(vm.spriteNum);
|
||||
return;
|
||||
|
|
|
@ -40,6 +40,11 @@ extern int32_t g_levelTextTime, ticrandomseed;
|
|||
int32_t g_numObituaries = 0;
|
||||
int32_t g_numSelfObituaries = 0;
|
||||
|
||||
void P_AddKills(DukePlayer_t * const pPlayer, uint16_t kills)
|
||||
{
|
||||
pPlayer->actors_killed += kills;
|
||||
}
|
||||
|
||||
void P_UpdateScreenPal(DukePlayer_t * const pPlayer)
|
||||
{
|
||||
int inWater = 0;
|
||||
|
@ -5408,7 +5413,7 @@ HORIZONLY:;
|
|||
}
|
||||
default:
|
||||
if (A_CheckEnemySprite(&sprite[pPlayer->actorsqu]))
|
||||
pPlayer->actors_killed++;
|
||||
P_AddKills(pPlayer, 1);
|
||||
A_DeleteSprite(pPlayer->actorsqu);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -336,6 +336,7 @@ static inline void P_PalFrom(DukePlayer_t *pPlayer, uint8_t f, uint8_t r, uint8_
|
|||
}
|
||||
}
|
||||
|
||||
void P_AddKills(DukePlayer_t * const pPlayer, uint16_t kills);
|
||||
int32_t A_GetHitscanRange(int spriteNum);
|
||||
void P_GetInput(int playerNum);
|
||||
void P_AddAmmo(DukePlayer_t * const pPlayer, int const weaponNum, int const addAmount);
|
||||
|
|
Loading…
Reference in a new issue