From da895e8542fcd19545287e4a99654f17c2d4c3d8 Mon Sep 17 00:00:00 2001 From: Guilherme Felipe Date: Thu, 3 Sep 2015 19:23:39 -0300 Subject: Fix for smoothing camera2D when you change zoom, fix #2074. --- scene/2d/camera_2d.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/2d') diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 49683da226..52ae5d2954 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -57,7 +57,9 @@ void Camera2D::_update_scroll() { void Camera2D::set_zoom(const Vector2 &p_zoom) { zoom = p_zoom; + Point2 old_smoothed_camera_pos = smoothed_camera_pos; _update_scroll(); + smoothed_camera_pos = old_smoothed_camera_pos; }; Vector2 Camera2D::get_zoom() const { -- cgit v1.2.3 From 4e0511a8a0cb294d330f6fde0640365ae3173ab5 Mon Sep 17 00:00:00 2001 From: Brickcaster Date: Sat, 24 Oct 2015 21:47:48 -0400 Subject: Fix for negative coords. Regarding issue #2665 int() of negative numbers rounds up. Needed to add a condition to account for negative values. Thanks to Romulox_x for providing this solution. --- scene/2d/tile_map.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scene/2d') diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 418ee192b2..167b637bdc 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1031,13 +1031,12 @@ Vector2 TileMap::world_to_map(const Vector2& p_pos) const{ switch(half_offset) { case HALF_OFFSET_X: { - if (int(ret.y)&1) { - + if ( ret.y > 0 ? int(ret.y)&1 : (int(ret.y)-1)&1 ) { ret.x-=0.5; } } break; case HALF_OFFSET_Y: { - if (int(ret.x)&1) { + if ( ret.x > 0 ? int(ret.x)&1 : (int(ret.x)-1)&1) { ret.y-=0.5; } } break; -- cgit v1.2.3 From 399b1b047498d154440f5cda4a5ceb08ea3de68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 1 Nov 2015 20:53:26 +0100 Subject: Cosmetic fixes to SCons buildsystem - Removed trailing spaces - Made sure all indentation is done using tabs (fixes #39) - Potentially fixed an identation issue for openssl check --- scene/2d/SCsub | 2 -- 1 file changed, 2 deletions(-) (limited to 'scene/2d') diff --git a/scene/2d/SCsub b/scene/2d/SCsub index 055d2f2474..bbe59b3054 100644 --- a/scene/2d/SCsub +++ b/scene/2d/SCsub @@ -3,5 +3,3 @@ Import('env') env.add_source_files(env.scene_sources,"*.cpp") Export('env') - - -- cgit v1.2.3 From 1d7e9c4ba52250db3b0b0fd732e44074252045d2 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 11 Nov 2015 17:39:06 -0300 Subject: -fixes to animatedsprite used with atlas --- scene/2d/animated_sprite.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scene/2d') diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index 342b86b4c1..458246671c 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -165,7 +165,8 @@ void AnimatedSprite::_notification(int p_what) { if (vflip) dst_rect.size.y=-dst_rect.size.y; - texture->draw_rect(ci,dst_rect,false,modulate); + //texture->draw_rect(ci,dst_rect,false,modulate); + texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size()),modulate); // VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; -- cgit v1.2.3