OpenClonk Bugtracker - OpenClonk
View Issue Details
0002048OpenClonkEngine - C4Scriptpublic2018-12-11 13:022018-12-11 13:02
ReporterMarky 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002048: Find_ID() does ignore objects under unknown circumstances.
DescriptionThe following script caused the problem - the object is not in a separate layer or something:

public func Get(object to)
{
    AssertDefinitionContext();

    // Works only the second time the player aims, which is really weird...
    // the cursor object exists, and can be found via Find_ActionTarget()
    // but Find_ID ignores it
    //
    // return FindObject(Find_ID(this), Find_ActionTarget(to));
    for (var attached in FindObjects(Find_ActionTarget(to)))
    {
        if (attached->GetID() == this)
        {
            return attached;
        }
    }
    return nil;
}

TagsNo tags attached.
Attached Files

There are no notes attached to this issue.

Issue History
2018-12-11 13:02MarkyNew Issue