Skip to content

Commit 9128e4d

Browse files
committed
Add Object:IsClassNative
1 parent f9db647 commit 9128e4d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • X2WOTCCommunityHighlander/Src/Core/Classes

X2WOTCCommunityHighlander/Src/Core/Classes/Object.uc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,17 @@ native final function bool IsPointInBox( const out Vector Point, const out Box T
24012401

24022402
native final function bool LineBoxIntersection(Box BBox, Vector Start, Vector End, Vector Direction, Vector OneOverDirection, out Vector HitLocation);
24032403

2404+
// Issue #XYZ Start
2405+
// Must be called on a `Class` instance, i.e. if you have an X2AbilityTargetStyle and
2406+
// want to know whether it's native, check `TargetStyle.class.IsNative()`
2407+
final function bool IsNative()
2408+
{
2409+
// This is the flag the UC VM uses to mark a class as native
2410+
return (self.ObjectFlags.B & (1 << 26)) != 0;
2411+
}
2412+
// Issue #XYZ END
2413+
2414+
24042415
defaultproperties
24052416
{
24062417
}

0 commit comments

Comments
 (0)