Repository navigation
Fix the noise rate parameters written by PlayerTypeT - #122
Merged
Merged
Conversation
rcg::PlayerTypeT::toServerString() と toJSON() が、focus_dist_noise_rate・ land_dist_noise_rate・land_focus_dist_noise_rate に dist_noise_rate の値を 出力していたのを修正した。librcsc で書き直した rcg (rcgrenameteam、 rcgreverse、rcgverconv、soccerwindow2 の保存) で値が誤っていた。 - 単体テスト run_test_rcg_types を追加 (CMake・Autotools) - 計画書を追加し、リリースノートと docs/build.md を更新 Fix rcg::PlayerTypeT::toServerString() and toJSON(), which wrote the value of dist_noise_rate for focus_dist_noise_rate, land_dist_noise_rate and land_focus_dist_noise_rate. The rcg files written by librcsc (rcgrenameteam, rcgreverse, rcgverconv and soccerwindow2) had the wrong values. - Add the unit test run_test_rcg_types (CMake and Autotools). - Add the plan, and update the release notes and docs/build.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rcsc::rcg::PlayerTypeT::toServerString()andtoJSON()wrote the value ofdist_noise_ratefor
focus_dist_noise_rate,land_dist_noise_rateandland_focus_dist_noise_rate(v19).The bug was introduced in #72.
Impact
The rcg files written by librcsc had the wrong values for these parameters of the player types:
the tools that rewrite rcg files (
rcgrenameteam,rcgreverse,rcgverconv) and soccerwindow2 when it saves an rcg file.With the default values of rcssserver,
land_dist_noise_rateandland_focus_dist_noise_ratebecame 0.0125 instead of 0.00125. The rcg files written by rcssserver are not affected.
Changes
rcsc/rcg/types.cpp: write the matching member for each parameter in both functions.The rounding of the values is not changed.
run_test_rcg_types(CppUnit, CMake and Autotools).Besides checking the four parameters, it sets a different value to every parameter printed
by
PlayerTypeTand checks that each one is written with its own value in both formats,so the same mistake is detected when a parameter is added.
docs/plan/2026-11-24-01_player-type-noise-rate.md. Release notes anddocs/build.mdare updated.Tests
Expected: 0.0225,Actual: 0.0125) and passes with it../cmake-helper.sh test).make checkandmake distcheckwith--enable-unit-testpass.