Skip to content

Commit fae9dcb

Browse files
committed
building: set correct animation for dock
1 parent da13c1c commit fae9dcb

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/building/building_dock.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ bool building_dock::draw_ornaments_and_animations_height(painter &ctx, vec2i poi
151151
auto &anim_dockers = base.anim;
152152

153153
if (anim_dockers.valid()) {
154-
int img_id = anim_dockers.base + (data.dock.docker_anim_frame / anim_dockers.frame_duration) * 4;
155-
const image_t *img = image_get(img_id);
154+
int img_id = anim_dockers.start() + (data.dock.docker_anim_frame / anim_dockers.frame_duration) * 4;
156155
ImageDraw::img_generic(ctx, img_id, point + anim_dockers.pos, color_mask, 1.f, true);
157156
}
158157
return false;

src/scripts/building_info.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,10 @@ building_dock = {
631631
animations : {
632632
preview : { pack:PACK_TERRAIN, id:49 },
633633
base : { pack:PACK_TERRAIN, id:49 },
634-
work_n : { pos:[125, -47], pack:PACK_SPR_AMBIENT, id:55, offset:3, max_frames:25, duration:8 },
635-
work_w : { pos:[100, -7], pack:PACK_SPR_AMBIENT, id:55, offset:0, max_frames:25, duration:8 },
636-
work_s : { pos:[55, -27], pack:PACK_SPR_AMBIENT, id:55, offset:2, max_frames:25, duration:4 },
637-
work_e : { pos:[55, -27], pack:PACK_SPR_AMBIENT, id:55, offset:3, max_frames:25, duration:4 }
634+
work_n : { pos:[135, -7], pack:PACK_SPR_AMBIENT, id:55, offset:3, max_frames:25, duration:8 },
635+
work_w : { pos:[100, -7], pack:PACK_SPR_AMBIENT, id:55, offset:1, max_frames:25, duration:8 },
636+
work_s : { pos:[55, -27], pack:PACK_SPR_AMBIENT, id:55, offset:0, max_frames:25, duration:4 },
637+
work_e : { pos:[55, -27], pack:PACK_SPR_AMBIENT, id:55, offset:2, max_frames:25, duration:4 }
638638
},
639639
labor_category : LABOR_CATEGORY_INDUSTRY_COMMERCE,
640640
building_size : 3,

0 commit comments

Comments
 (0)