Fix light multiple creations

This commit is contained in:
Atlante45 2015-03-23 17:06:12 +01:00
parent 5fadcbe7d9
commit 66f954142a

View file

@ -97,7 +97,7 @@
if (!didEntityExist(this.lightID)) { if (!didEntityExist(this.lightID)) {
// Light now has an ID, so update it in userData // Light now has an ID, so update it in userData
this.lightID = Entities.identifyEntity(this.lightID); this.lightID = Entities.identifyEntity(this.lightID);
userData.lightID = this.lightID.id; userData.lightID = this.lightID;
updateUserData(this.entityID, userData); updateUserData(this.entityID, userData);
} }
return; return;
@ -113,7 +113,7 @@
print("Created new light entity"); print("Created new light entity");
// Update user data with new ID // Update user data with new ID
userData.lightID = this.lightID.id; userData.lightID = this.lightID;
updateUserData(this.entityID, userData); updateUserData(this.entityID, userData);
} }