Skip to content

Commit

Permalink
Fix UStruct's Script definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Shtoyan committed Nov 25, 2024
1 parent 9cb536a commit 429da71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Classes/UStruct.uc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ var UTextBuffer CppText;
var UField Children;
var int PropertiesSize;
var name FriendlyName;
// Swap if you need to modify the bytes at runtime
// var array<byte> Script;
var Unflect.Array Script;
// Swap if you need to modify the bytes at runtime (yes we need it - Shtoyan)
var array<byte> Script;
// var Unflect.Array Script;

var int TextPos;
var int Line;
Expand Down Expand Up @@ -37,6 +37,6 @@ final function static UStruct AsStruct(Object object)

reference.Object = object;
pointer = reference;

return dereferenced;
}
5 changes: 3 additions & 2 deletions Classes/Unflect.uc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ struct Object extends Pointer { var Object Object; };
const UnFunction = Class'UFunction';

final static function HookFunction(UFunction source, UFunction destination) {
local Unflect.Array script;

// local Unflect.Array script;
local array<byte> script;

// de-nativify
if ((source.FunctionFlags & FUNC_Native) != 0) {
source.FunctionFlags = source.FunctionFlags & ~FUNC_Native;
Expand Down
2 changes: 1 addition & 1 deletion Classes/UnflectCommandlet.uc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ event int Main(string parms)
{
Log("Function: " $ func @ "next Function: " $ func.Next);
Log(" flags:" @ func.FunctionFlags);
Log(" script size in memory:" @ func.Script.Num);
// Log(" script size in memory:" @ func.Script.Num);
Log(" friendlyname:" @ func.FriendlyName);
}
}
Expand Down

0 comments on commit 429da71

Please sign in to comment.