shithub: cstory

Download patch

ref: ce4373481b4b67cc98ef6d3b908fd0188c328891
parent: 63e855c7fa89701ac571c7d3952a2a7875b1371d
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Jan 7 15:52:58 EST 2020

More-accurate NpcHit.cpp variable arrangement

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