Skip to content

Commit

Permalink
Use Name instead of GetName()
Browse files Browse the repository at this point in the history
  • Loading branch information
chirpxiv committed Jan 18, 2023
1 parent b7e1698 commit 93cbd18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Ktisis/Structs/Actor/Actor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public struct Actor {
[FieldOffset(0xC40)] public ActorGaze Gaze; // Update in ActorHooks.cs as well

public unsafe string? GetName() {
var ptr = GameObject.GetName();
return ptr == null ? null : Marshal.PtrToStringUTF8((IntPtr)ptr);
fixed (byte* ptr = GameObject.Name) {
return ptr == null ? null : Marshal.PtrToStringUTF8((IntPtr)ptr);
}
}

public string GetNameOr(string fallback) {
Expand Down

0 comments on commit 93cbd18

Please sign in to comment.