Skip to content

Commit

Permalink
Fix prox mine not dropped at feet (fixes #812)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed Aug 7, 2023
1 parent c5c4a94 commit 92cbaa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cdogs/draw/draw_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static int CompareY(const void *v1, const void *v2)
{
return -1;
}
else if ((*t1)->Pos.y >(*t2)->Pos.y)
else if ((*t1)->Pos.y > (*t2)->Pos.y)
{
return 1;
}
Expand Down
7 changes: 3 additions & 4 deletions src/cdogs/weapon_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,10 @@ static void LoadWeaponClass(WeaponClass *wc, json_t *node, const int version)
LoadFloat(&wc->u.Normal.Spread.Width, node, "SpreadWidth");
LoadFloat(&wc->u.Normal.AngleOffset, node, "AngleOffset");

int muzzleHeight = 0;
LoadInt(&muzzleHeight, node, "MuzzleHeight");
if (muzzleHeight)
if (json_find_first_label(node, "MuzzleHeight"))
{
wc->u.Normal.MuzzleHeight = muzzleHeight * Z_FACTOR;
LoadInt(&wc->u.Normal.MuzzleHeight, node, "MuzzleHeight");
wc->u.Normal.MuzzleHeight *= Z_FACTOR;
}
if (json_find_first_label(node, "Elevation"))
{
Expand Down

0 comments on commit 92cbaa2

Please sign in to comment.