# HG changeset patch # User jwt@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1215364386 0 # Node ID ab09325f901eb901b7f91c8899b7b93ff8f2dea9 # Parent 983c0af2a1e1ad66ea85688daf452d00f5ea6e74 Camera was attached to instance on a different layer, resulting in strange scrolling. Fixed it, and added a check to prevent this happening again (attach-to-other-layer fails and logs a warning). diff -r 983c0af2a1e1 -r ab09325f901e clients/rio_de_hola/maps/shrine.xml --- a/clients/rio_de_hola/maps/shrine.xml Sun Jul 06 10:12:17 2008 +0000 +++ b/clients/rio_de_hola/maps/shrine.xml Sun Jul 06 17:13:06 2008 +0000 @@ -6106,7 +6106,7 @@ - + diff -r 983c0af2a1e1 -r ab09325f901e engine/core/view/camera.cpp --- a/engine/core/view/camera.cpp Sun Jul 06 10:12:17 2008 +0000 +++ b/engine/core/view/camera.cpp Sun Jul 06 17:13:06 2008 +0000 @@ -343,6 +343,11 @@ } void Camera::attach(Instance *instance) { + // fail if the layers aren't the same + if (m_location.getLayer()->getId() != instance->getLocation().getLayer()->getId()) { + FL_WARN(_log, "Tried to attach camera to instance on different layer."); + return ; + } m_attachedto = instance; } diff -r 983c0af2a1e1 -r ab09325f901e engine/extensions/loaders.py --- a/engine/extensions/loaders.py Sun Jul 06 10:12:17 2008 +0000 +++ b/engine/extensions/loaders.py Sun Jul 06 17:13:06 2008 +0000 @@ -21,9 +21,11 @@ res = object_loader.loadResource(fife.ResourceLocation(path)) print 'imported object file ' + path except WrongFileType: - print 'ignored non-object file ' + path + pass +# print 'ignored non-object file ' + path except NameClash: - print 'ignored already loaded file ' + path + pass +# print 'ignored already loaded file ' + path return res def loadImportDir(path, engine):