Skip to content

Commit

Permalink
Fix Haiku build errors (C89)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed Nov 29, 2013
1 parent 07b84b6 commit 2aab485
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cdogs/weapon.c
Expand Up @@ -377,11 +377,12 @@ void WeaponFire(
{
int spreadAngle = spreadStartAngle + i * spreadWidth;
int recoil = 0;
int finalAngle;
if (desc->Recoil > 0)
{
recoil = (rand() % desc->Recoil) - (desc->Recoil + 1) / 2;
}
int finalAngle = angle + spreadAngle + recoil;
finalAngle = angle + spreadAngle + recoil;
if (finalAngle < 0)
{
finalAngle += 256;
Expand Down
2 changes: 1 addition & 1 deletion src/prep.c
Expand Up @@ -93,12 +93,12 @@ int NumPlayersSelection(
0);
for (i = 0; i < MAX_PLAYERS; i++)
{
char buf[2];
if (mode == CAMPAIGN_MODE_DOGFIGHT && i == 0)
{
// At least two players for dogfights
continue;
}
char buf[2];
sprintf(buf, "%d", i + 1);
MenuAddSubmenu(ms.current, MenuCreateReturn(buf, i + 1));
}
Expand Down

0 comments on commit 2aab485

Please sign in to comment.