More-accurate NpcHit.cpp variable arrangement

This commit is contained in:
Clownacy 2020-01-07 20:52:58 +00:00
parent 63e855c7fa
commit ce4373481b

View file

@ -264,15 +264,15 @@ void JudgeHitNpCharWater(NPCHAR *npc, int x, int y)
npc->flag |= hit; npc->flag |= hit;
} }
void HitNpCharMap() void HitNpCharMap(void)
{ {
int judg, x, y; int x, y;
int judg;
int offx[9]; int offx[9];
int offy[9]; int offy[9];
int i; int i, j;
int j;
offx[0] = 0; offx[0] = 0;
offx[1] = 1; offx[1] = 1;
@ -460,6 +460,8 @@ void HitNpCharMap()
void LoseNpChar(NPCHAR *npc, BOOL bVanish) void LoseNpChar(NPCHAR *npc, BOOL bVanish)
{ {
int val;
// Play death sound // Play death sound
PlaySoundObject(npc->destroy_voice, 1); PlaySoundObject(npc->destroy_voice, 1);
@ -482,8 +484,6 @@ void LoseNpChar(NPCHAR *npc, BOOL bVanish)
// Create drop // Create drop
if (npc->exp != 0) if (npc->exp != 0)
{ {
int val;
switch (Random(1, 5)) switch (Random(1, 5))
{ {
case 1: case 1:
@ -534,8 +534,7 @@ void LoseNpChar(NPCHAR *npc, BOOL bVanish)
void HitNpCharBullet(void) void HitNpCharBullet(void)
{ {
int n; int n, b;
int b;
BOOL bHit; BOOL bHit;
for (n = 0; n < NPC_MAX; ++n) for (n = 0; n < NPC_MAX; ++n)