Combined guns bug fix.
This commit is contained in:
parent
691068a634
commit
7701fc0336
|
@ -257,8 +257,16 @@ static void drawBoostECMBar(int current, int max, int x, int y, int r, int g, in
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drawWeaponInfo(void)
|
static void drawWeaponInfo(void)
|
||||||
|
{
|
||||||
|
if (!player->combinedGuns)
|
||||||
{
|
{
|
||||||
drawText(10, 70, 14, TA_LEFT, colors.white, (player->selectedGunType != -1) ? gunName[player->selectedGunType] : "(None)");
|
drawText(10, 70, 14, TA_LEFT, colors.white, (player->selectedGunType != -1) ? gunName[player->selectedGunType] : "(None)");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
drawText(10, 70, 14, TA_LEFT, colors.white, "(Combined Guns)");
|
||||||
|
}
|
||||||
|
|
||||||
drawText(260, 70, 14, TA_RIGHT, colors.white, "Missiles (%d)", player->missiles);
|
drawText(260, 70, 14, TA_RIGHT, colors.white, "Missiles (%d)", player->missiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@ void initPlayer(void)
|
||||||
|
|
||||||
player->selectedGunType = -1;
|
player->selectedGunType = -1;
|
||||||
|
|
||||||
|
if (!player->combinedGuns)
|
||||||
|
{
|
||||||
for (i = 0 ; i < MAX_FIGHTER_GUNS ; i++)
|
for (i = 0 ; i < MAX_FIGHTER_GUNS ; i++)
|
||||||
{
|
{
|
||||||
n = player->guns[i].type;
|
n = player->guns[i].type;
|
||||||
|
@ -60,6 +62,11 @@ void initPlayer(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player->selectedGunType = 0;
|
||||||
|
}
|
||||||
|
|
||||||
STRNCPY(player->name, "Player", MAX_NAME_LENGTH);
|
STRNCPY(player->name, "Player", MAX_NAME_LENGTH);
|
||||||
|
|
||||||
|
@ -370,11 +377,14 @@ static void switchGuns(void)
|
||||||
|
|
||||||
i = player->selectedGunType;
|
i = player->selectedGunType;
|
||||||
|
|
||||||
|
if (!player->combinedGuns)
|
||||||
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
i = (i + 1) % BT_MAX;
|
i = (i + 1) % BT_MAX;
|
||||||
}
|
}
|
||||||
while (!availableGuns[i]);
|
while (!availableGuns[i]);
|
||||||
|
}
|
||||||
|
|
||||||
player->selectedGunType = i;
|
player->selectedGunType = i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue