Skip to content

Commit

Permalink
[ALL] merge 4 pitch params into ini
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-tz committed Apr 12, 2024
1 parent b681e9c commit f204974
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 374 deletions.
16 changes: 8 additions & 8 deletions Client/plugins/sim/configwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ namespace{
#define ADD_VALUE(parent,type,name,defaultvalue,namestring) \
ppm->loadParam(v_##name,#parent"/"#name,defaultvalue);

#define ADD_CLIENT_VALUE(parent, type, name, defaultvalue, namestring) \
zpm->loadParam(v_##name, #parent "/" #name, defaultvalue);
#define ADD_CLIENT_VALUE(parent, type, name, defaultvalue, namestring, ratio) \
v_##name = zpm->value(#parent "/" #namestring, QVariant(ratio * defaultvalue)).to##type() / ratio;

ConfigWidget::ConfigWidget()
{
ADD_VALUE(game_vars,Int,Robots_Count, 16, "Robots Count")
ADD_VALUE(field_vars,Double,Field_Line_Width,0.020,"Line Thickness")
ADD_VALUE(field_vars,Double,Field_Length,9.000,"Length")
ADD_VALUE(field_vars,Double,Field_Width,6.000,"Width")
ADD_CLIENT_VALUE(field,Double,Field_Length,9.000,width, 1000.0)
ADD_CLIENT_VALUE(field,Double,Field_Width,6.000,height, 1000.0)
ADD_VALUE(field_vars,Double,Field_Rad,0.500,"Radius")
ADD_VALUE(field_vars,Double,Field_Free_Kick,0.700,"Free Kick Distanse From Defense Area")
ADD_VALUE(field_vars,Double,Field_Penalty_Width,2.0,"Penalty width")
ADD_VALUE(field_vars,Double,Field_Penalty_Depth,1.0,"Penalty depth")
ADD_CLIENT_VALUE(field,Double,Field_Penalty_Width,2.0,penaltyLength, 1000.0)
ADD_CLIENT_VALUE(field,Double,Field_Penalty_Depth,1.0,penaltyWidth, 1000.0)
ADD_VALUE(field_vars,Double,Field_Penalty_Point,1.0,"Penalty point")
ADD_VALUE(field_vars,Double,Field_Margin,0.4,"Margin")
ADD_VALUE(field_vars,Double,Field_Referee_Margin,0.0,"Referee margin")
ADD_VALUE(field_vars,Double,Wall_Thickness,0.050,"Wall thickness")
ADD_VALUE(field_vars,Double,Goal_Thickness,0.020,"Goal thickness")
ADD_VALUE(field_vars,Double,Goal_Depth,0.200,"Goal depth")
ADD_VALUE(field_vars,Double,Goal_Width,1.000,"Goal width")
ADD_CLIENT_VALUE(field,Double,Goal_Depth,0.200,goalDepth, 1000.0)
ADD_CLIENT_VALUE(field,Double,Goal_Width,1.000,goalWidth, 1000.0)
ADD_VALUE(field_vars,Double,Goal_Height,0.160,"Goal height")
ADD_VALUE(field_vars,Double,overlap,0.20,"Camera Overlap")

Expand Down
1 change: 0 additions & 1 deletion Core/src/Strategy/skill/SmartGotoPosition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ namespace{
CGeoPoint lastFinalPoint[PARAM::Field::MAX_PLAYER];
CGeoPoint veryStart[PARAM::Field::MAX_PLAYER];
bool isExecuting[PARAM::Field::MAX_PLAYER];
const double Fake_PENALTY_AREA_R = 150; // added by ftq
const double TEAMMATE_AVOID_DIST = PARAM::Vehicle::V2::PLAYER_SIZE + 40.0f; // 2014/03/13 修改,为了减少stop的时候卡住的概率 yys
const double OPP_AVOID_DIST = PARAM::Vehicle::V2::PLAYER_SIZE + 55.0f;
const double BALL_AVOID_DIST = PARAM::Field::BALL_SIZE + 50.0f;
Expand Down
Loading

0 comments on commit f204974

Please sign in to comment.