This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template matchingOverload(alias funcSymbol, Args...) | |
| { | |
| private template parametersMatch(alias funcSymbol, T...) | |
| { | |
| import std.traits : Parameters; | |
| enum parametersMatch = is(Parameters!funcSymbol == T); | |
| } | |
| static foreach(s; __traits(getOverloads, __traits(parent, funcSymbol), __traits(identifier, funcSymbol))) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static CVehicleModelInfoVarGlobal** gVehicleModelInfoVarGlobal = null; | |
| public static void TestVehicleKits() | |
| { | |
| var kitIndex = NativeFunction.Natives.GET_VEHICLE_MOD_KIT<int>(Game.LocalPlayer.Character.CurrentVehicle); | |
| if (gVehicleModelInfoVarGlobal == null) | |
| { | |
| var addr = Game.FindPattern("48 8B 0D ?? ?? ?? ?? 44 8B C6 8B D5 8B D8"); | |
| gVehicleModelInfoVarGlobal = (CVehicleModelInfoVarGlobal**)(addr + *(int*)(addr + 3) + 7); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ConsoleCommand] | |
| public static unsafe void TestTaskData() | |
| { | |
| // TODO: search for the pattern once only | |
| IntPtr addr = Game.FindPattern("48 8B 0D ?? ?? ?? ?? 4A 8B 04 C1 44 39 10 74 16"); | |
| addr += *(int*)(addr + 3) + 7; | |
| CTaskDataInfoManager* taskDataMgr = (CTaskDataInfoManager*)addr; | |
| for (int i = 0; i < taskDataMgr->aTaskData.Count; i++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from functools import cache | |
| def normalize_vecs(vecs): | |
| return vecs / np.linalg.norm(vecs, axis=1)[:, np.newaxis] | |
| @cache |
OlderNewer