View Issue Details

IDProjectCategoryView StatusLast Update
0001326The Dark ModCodingpublic14.12.2022 07:35
ReporterIshtvan Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status feedbackResolutionopen 
Summary0001326: Bug With idEntity::GetTeamChildren
DescriptionI was logging some stuff and saw weird behavior of GetTeamChildren, like it was returning 2 children for the Builder's Pauldron, which should be at the end of its team tree.

We have only tested GetTeamChildren before when it is called on the bindmaster. It could be GetTeamChildren does not work correctly when called on a child and in fact returns things going up the team chain instead of going down it.

I don't have time to look into it extensively right now.
TagsNo tags attached.

Relationships

related to 0005409 resolvedstgatilov Unbinding entity B in C->B->A bind hierarchy broken 

Activities

nbohr1more

nbohr1more

05.10.2021 01:40

developer   ~0014397

Confirmed long ago that there is a bug here:


void idEntity::GetTeamChildren( idList<idEntity *> *list )
{
    // ishtvan: TODO: I think this is WRONG and can go up and across the team hierarchy when called on bind children
    // It only works as advertised when called on bindmasters.
    // grayman - ABSOLUTELY!!! This routine can wrongly tell you that your brothers and sisters are your children.

    idEntity *NextEnt = NULL;
    
    list->Clear();
    for( NextEnt = GetNextTeamEntity(); NextEnt != NULL; NextEnt = NextEnt->GetNextTeamEntity() )
    {
        if( NextEnt != this )
            list->Append( NextEnt );
    }
}
nbohr1more

nbohr1more

14.12.2022 03:12

developer   ~0015561

@stgatilov

Even though this code was not changed, the "teamChain" code associated to GetNextTeamEntity was refactored in 0005409
to avoid bugs like this.

Shall we mark this closed in 2.09?
stgatilov

stgatilov

14.12.2022 07:35

administrator   ~0015563

I think this still works the same way: considers the whole team as a group and returns its tail in whatever order.
That's by design, I suppose.

Maybe add assert that it is called only for team roots?

Issue History

Date Modified Username Field Change
06.10.2008 05:45 Ishtvan New Issue
05.10.2021 01:40 nbohr1more Note Added: 0014397
05.10.2021 01:40 nbohr1more Summary Possible Bug With idEntity::GetTeamChildren => Bug With idEntity::GetTeamChildren
14.12.2022 03:07 nbohr1more Relationship added related to 0005409
14.12.2022 03:10 nbohr1more Status new => feedback
14.12.2022 03:12 nbohr1more Note Added: 0015561
14.12.2022 07:35 stgatilov Note Added: 0015563