[Scummvm-cvs-logs] CVS: residual costume.cpp,1.40,1.41

Erich Edgar Hoover compholio at users.sourceforge.net
Thu Jan 5 22:34:01 CET 2006


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14771

Modified Files:
	costume.cpp 
Log Message:
Fix regression bug with parent costume component inheritance

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- costume.cpp	5 Jan 2006 12:01:14 -0000	1.40
+++ costume.cpp	6 Jan 2006 06:33:28 -0000	1.41
@@ -325,11 +325,10 @@
 
 MainModelComponent::MainModelComponent(Costume::Component *parent, int parentID, const char *filename, Costume::Component *prevComponent, tag32 tag) :
 		ModelComponent(parent, parentID, filename, prevComponent, tag), _hierShared(false) {
-	_obj = NULL;
 	if (parentID == -2 && prevComponent != NULL) {
 		MainModelComponent *mmc = dynamic_cast<MainModelComponent *>(prevComponent);
 		
-		if (mmc != NULL) {
+		if (mmc != NULL && mmc->_filename == filename) {
 			_obj = mmc->_obj;
 			_hier = mmc->_hier;
 			_hierShared = true;





More information about the Scummvm-git-logs mailing list