UserData : setUserData(someKey,null) now properly removes the user data from the map.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9670 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
a04d5dde01
commit
206a6b74f3
@ -1215,7 +1215,9 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab
|
||||
userData = new HashMap<String, Savable>();
|
||||
}
|
||||
|
||||
if (data instanceof Savable) {
|
||||
if(data == null){
|
||||
userData.remove(key);
|
||||
}else if (data instanceof Savable) {
|
||||
userData.put(key, (Savable) data);
|
||||
} else {
|
||||
userData.put(key, new UserData(UserData.getObjectType(data), data));
|
||||
|
Loading…
x
Reference in New Issue
Block a user