mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 13:56:38 +00:00 
			
		
		
		
	Merge pull request #2737 from Capostrophic/property
Correct drawable property apply order (bug #5313)
This commit is contained in:
		
						commit
						648256969d
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		|  | @ -206,6 +206,7 @@ | |||
|     Bug #5278: Console command Show doesn't fall back to global variable after local var not found | ||||
|     Bug #5300: NPCs don't switch from torch to shield when starting combat | ||||
|     Bug #5308: World map copying makes save loading much slower | ||||
|     Bug #5313: Node properties of identical type are not applied in the correct order | ||||
|     Feature #1774: Handle AvoidNode | ||||
|     Feature #2229: Improve pathfinding AI | ||||
|     Feature #3025: Analogue gamepad movement controls | ||||
|  |  | |||
|  | @ -63,6 +63,8 @@ namespace | |||
|     // Collect all properties affecting the given drawable that should be handled on drawable basis rather than on the node hierarchy above it.
 | ||||
|     void collectDrawableProperties(const Nif::Node* nifNode, std::vector<const Nif::Property*>& out) | ||||
|     { | ||||
|         if (nifNode->parent) | ||||
|             collectDrawableProperties(nifNode->parent, out); | ||||
|         const Nif::PropertyList& props = nifNode->props; | ||||
|         for (size_t i = 0; i <props.length();++i) | ||||
|         { | ||||
|  | @ -81,8 +83,6 @@ namespace | |||
|                 } | ||||
|             } | ||||
|         } | ||||
|         if (nifNode->parent) | ||||
|             collectDrawableProperties(nifNode->parent, out); | ||||
|     } | ||||
| 
 | ||||
|     // NodeCallback used to have a node always oriented towards the camera. The node can have translation and scale
 | ||||
|  | @ -1719,9 +1719,8 @@ namespace NifOsg | |||
| 
 | ||||
|             int lightmode = 1; | ||||
| 
 | ||||
|             for (std::vector<const Nif::Property*>::const_reverse_iterator it = properties.rbegin(); it != properties.rend(); ++it) | ||||
|             for (const Nif::Property* property : properties) | ||||
|             { | ||||
|                 const Nif::Property* property = *it; | ||||
|                 switch (property->recType) | ||||
|                 { | ||||
|                 case Nif::RC_NiSpecularProperty: | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue