fix rollup-to-parent code to only roll up to entity parents

This commit is contained in:
Seth Alves 2017-09-25 19:07:40 -07:00
parent 5da5b24894
commit 0b60928dd3

View file

@ -294,8 +294,9 @@ ensureDynamic = function (entityID) {
};
findGroupParent = function (controllerData, targetProps) {
while (targetProps.parentID && targetProps.parentID !== NULL_UUID && targetProps.parentID !== AVATAR_SELF_ID) {
// XXX use controllerData.nearbyEntityPropertiesByID ?
while (targetProps.parentID &&
targetProps.parentID !== NULL_UUID &&
Entities.getNestableType(targetProps.parentID) == "entity") {
var parentProps = Entities.getEntityProperties(targetProps.parentID, DISPATCHER_PROPERTIES);
if (!parentProps) {
break;