Skip to content

Commit

Permalink
Allow negative percentages for DDFMainGetPercentAny and DDFWEAPON bob…
Browse files Browse the repository at this point in the history
…bing
  • Loading branch information
dashodanger committed Sep 24, 2024
1 parent cd3f07d commit a103741
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source_files/ddf/ddf_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ void DDFMainGetPercentAny(const char *info, void *storage)

// check that the string is valid
epi::CStringCopyMax(s, info, 100);
for (p = s; epi::IsDigitASCII(*p) || *p == '.'; p++)
for (p = s; epi::IsDigitASCII(*p) || *p == '-' || *p == '.'; p++)
{ /* do nothing */
}

Expand Down
2 changes: 1 addition & 1 deletion source_files/ddf/ddf_weapon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static const DDFCommandList weapon_commands[] = {
DDF_FIELD("REFIRE_INACCURATE", dummy_weapon, refire_inacc_, DDFMainGetBoolean),
DDF_FIELD("SHOW_CLIP", dummy_weapon, show_clip_, DDFMainGetBoolean),
DDF_FIELD("SHARED_CLIP", dummy_weapon, shared_clip_, DDFMainGetBoolean),
DDF_FIELD("BOBBING", dummy_weapon, bobbing_, DDFMainGetPercent),
DDF_FIELD("BOBBING", dummy_weapon, bobbing_, DDFMainGetPercentAny),
DDF_FIELD("SWAYING", dummy_weapon, swaying_, DDFMainGetPercent),
DDF_FIELD("IDLE_WAIT", dummy_weapon, idle_wait_, DDFMainGetTime),
DDF_FIELD("IDLE_CHANCE", dummy_weapon, idle_chance_, DDFMainGetPercent),
Expand Down

0 comments on commit a103741

Please sign in to comment.