Commit 92f1f43 1 parent ee475f2 commit 92f1f43 Copy full SHA for 92f1f43
File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ void building_dock::static_params::load(archive arch) {
33
33
}
34
34
35
35
void building_dock::static_params::planer_setup_preview_graphics (build_planner &planer) const {
36
- planer.set_tiles_building (anim[animkeys ().base ].first_img () + planer.relative_orientation , building_size);
36
+ const int imgid = anim[animkeys ().base ].first_img () + planer.relative_orientation ;
37
+ planer.set_tiles_building (imgid, building_size);
37
38
}
38
39
39
40
void building_dock::on_create (int orientation) {
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ void building_water_lift::static_params::load(archive arch) {
16
16
}
17
17
18
18
void building_water_lift::static_params::planer_setup_preview_graphics (build_planner &planer) const {
19
- int imgid = anim[animkeys ().base ].first_img () + planer.relative_orientation + planer.building_variant * 4 ;
19
+ const int baseid = anim[animkeys ().base ].first_img ();
20
+ const int imgid = baseid + planer.relative_orientation ;
20
21
planer.set_tiles_building (imgid, building_size);
21
22
}
22
23
Original file line number Diff line number Diff line change @@ -1105,11 +1105,11 @@ void build_planner::update_coord_caches() {
1105
1105
void build_planner::update_orientations (bool check_if_changed) {
1106
1106
int prev_orientation = relative_orientation;
1107
1107
int prev_variant = building_variant;
1108
- int global_rotation = building_rotation_global_rotation ();
1108
+ // int global_rotation = building_rotation_global_rotation();
1109
1109
1110
1110
const auto ¶ms = building_impl::params (build_type);
1111
1111
1112
- relative_orientation = params.planer_update_relative_orientation (*this , global_rotation );
1112
+ relative_orientation = params.planer_update_relative_orientation (*this , relative_orientation );
1113
1113
building_variant = params.planer_update_building_variant (*this );
1114
1114
1115
1115
relative_orientation = relative_orientation % 4 ;
You can’t perform that action at this time.
0 commit comments