Bugfix Telemetry Sending Invalid UUIDs
This commit is contained in:
parent
0e6c2d5d05
commit
6a26ae70b5
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="ASK" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RiderProjectSettingsUpdater">
|
||||
<option name="vcsConfiguration" value="2" />
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,141 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoGeneratedRunConfigurationManager">
|
||||
<projectFile>Intermediate/ProjectFiles/EndlessVendetta.vcxproj</projectFile>
|
||||
</component>
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BaseWeapons/Shotguns/BP_BaseShotgun.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BaseWeapons/Shotguns/BP_BaseShotgun.uasset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BaseWeapons/Snipers/BaseSniper.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/FirstPerson/Blueprints/BaseWeapons/Snipers/BaseSniper.uasset" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"customColor": "",
|
||||
"associatedIndex": 7
|
||||
}</component>
|
||||
<component name="ProjectId" id="2bp7o8dmlHZgRsYmVepgy7lbmpM" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"C++ Project.EndlessVendetta.executor": "Run",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"git-widget-placeholder": "weapon-equip-fixes",
|
||||
"ignore.virus.scanning.warn.message": "true",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
},
|
||||
"keyToStringList": {
|
||||
"rider.external.source.directories": [
|
||||
"C:\\Users\\mhara\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache",
|
||||
"C:\\Users\\mhara\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache",
|
||||
"C:\\Users\\mhara\\AppData\\Local\\Symbols\\src"
|
||||
]
|
||||
}
|
||||
}]]></component>
|
||||
<component name="RunManager">
|
||||
<configuration name="EndlessVendetta" type="CppProject" factoryName="C++ Project">
|
||||
<configuration_1>
|
||||
<option name="CONFIGURATION" value="DebugGame Editor" />
|
||||
<option name="PLATFORM" value="Win64" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/Intermediate/ProjectFiles/EndlessVendetta.vcxproj" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
</configuration_1>
|
||||
<configuration_2>
|
||||
<option name="CONFIGURATION" value="Shipping" />
|
||||
<option name="PLATFORM" value="Win64" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/Intermediate/ProjectFiles/EndlessVendetta.vcxproj" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
</configuration_2>
|
||||
<configuration_3>
|
||||
<option name="CONFIGURATION" value="DebugGame" />
|
||||
<option name="PLATFORM" value="Win64" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/Intermediate/ProjectFiles/EndlessVendetta.vcxproj" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
</configuration_3>
|
||||
<configuration_4>
|
||||
<option name="CONFIGURATION" value="Development Editor" />
|
||||
<option name="PLATFORM" value="Win64" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/Intermediate/ProjectFiles/EndlessVendetta.vcxproj" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
</configuration_4>
|
||||
<configuration_5>
|
||||
<option name="CONFIGURATION" value="Development" />
|
||||
<option name="PLATFORM" value="Win64" />
|
||||
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/Intermediate/ProjectFiles/EndlessVendetta.vcxproj" />
|
||||
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
|
||||
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
|
||||
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
|
||||
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
</configuration_5>
|
||||
<option name="DEFAULT_PROJECT_PATH" value="$PROJECT_DIR$/Intermediate/ProjectFiles/EndlessVendetta.vcxproj" />
|
||||
<method v="2">
|
||||
<option name="Build" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="" />
|
||||
<created>1706900339638</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1706900339638</updated>
|
||||
<workItem from="1706900342753" duration="2652000" />
|
||||
<workItem from="1706972179014" duration="11096000" />
|
||||
<workItem from="1707046474738" duration="8878000" />
|
||||
<workItem from="1707103463352" duration="6662000" />
|
||||
<workItem from="1707755232377" duration="4748000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||
</component>
|
||||
</project>
|
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=aba8233e_002D1c76_002D499a_002Db1de_002D7423eeed41c5/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Solution />
|
||||
</SessionState></s:String></wpf:ResourceDictionary>
|
@ -15,7 +15,6 @@ AEndlessVendettaGameMode::AEndlessVendettaGameMode() : Super()
|
||||
// set default pawn class to our Blueprinted character
|
||||
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnClassFinder(TEXT("/Game/FirstPerson/Blueprints/BP_FirstPersonCharacter"));
|
||||
DefaultPawnClass = PlayerPawnClassFinder.Class;
|
||||
|
||||
}
|
||||
|
||||
void AEndlessVendettaGameMode::KillAllEnemies()
|
||||
@ -43,21 +42,51 @@ void AEndlessVendettaGameMode::SetLocalAIAlertLevel(int NewAlertLevel)
|
||||
|
||||
void AEndlessVendettaGameMode::SendEvent(FString EventKey, FString EventData)
|
||||
{
|
||||
const FString EventID = FGuid::NewGuid().ToString();
|
||||
const FString EventID = GenerateUUID();
|
||||
const FString EventTime = FDateTime::Now().ToString();
|
||||
if (EventData.IsEmpty()) EventData = "None";
|
||||
const auto Request = FHttpModule::Get().CreateRequest();
|
||||
Request->SetURL(TelemetryURLEvents);
|
||||
Request->SetVerb("POST");
|
||||
Request->SetHeader("Content-Type", "application/json");
|
||||
Request->SetHeader("Accept", "application/json");
|
||||
Request->SetContentAsString("{\"SessionID\":\"" + SessionID + "\",\"PlayerGUID\":\"" + PlayerGUID + "\",\"EventID\":\"" + EventID + "\",\"Timestamp\":\"" + EventTime + "\",\"EventKey\":\"" + EventKey + "\",\"EventData\":\"" + EventData + "\"}");
|
||||
Request->OnProcessRequestComplete().BindLambda([](FHttpRequestPtr request, FHttpResponsePtr response, bool success)
|
||||
{
|
||||
GLog->Log("Telemetry Event Response: " + response->GetContentAsString());
|
||||
});
|
||||
Request->OnProcessRequestComplete().BindLambda([EventKey, EventData](FHttpRequestPtr request, FHttpResponsePtr response, bool success)
|
||||
{
|
||||
GLog->Log("Telemetry: " + response->GetContentAsString() + "\nEvent Key: " + EventKey + " Event Data: " + EventData);
|
||||
});
|
||||
Request->ProcessRequest();
|
||||
}
|
||||
|
||||
FString AEndlessVendettaGameMode::GenerateUUID()
|
||||
{
|
||||
uint8 RandomBytes[16];
|
||||
const FDateTime Now = FDateTime::UtcNow();
|
||||
const int64 TimeStamp = Now.ToUnixTimestamp();
|
||||
FPlatformMath::RandInit(TimeStamp);
|
||||
|
||||
for (int32 Index = 0; Index < 16; ++Index)
|
||||
{
|
||||
RandomBytes[Index] = FMath::Rand() % 256;
|
||||
}
|
||||
FMemory::Memswap(RandomBytes, &RandomBytes[8], 8);
|
||||
const uint32 ProcessID = FPlatformProcess::GetCurrentProcessId();
|
||||
FMemory::Memcpy(RandomBytes + 12, &ProcessID, sizeof(uint32));
|
||||
|
||||
// Set version (4) and variant (RFC4122) bits
|
||||
RandomBytes[6] = (RandomBytes[6] & 0x0F) | 0x40; // version 4
|
||||
RandomBytes[8] = (RandomBytes[8] & 0x3F) | 0x80; // variant RFC4122
|
||||
|
||||
FGuid UUID;
|
||||
FMemory::Memcpy(&UUID, RandomBytes, 16);
|
||||
FString UUIDString = UUID.ToString();
|
||||
UUIDString = UUIDString.Replace(TEXT("{"), TEXT(""));
|
||||
UUIDString = UUIDString.Replace(TEXT("}"), TEXT(""));
|
||||
UUIDString = UUIDString.Replace(TEXT("-"), TEXT(""));
|
||||
|
||||
return UUIDString;
|
||||
}
|
||||
|
||||
void AEndlessVendettaGameMode::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Telemetry")
|
||||
void SendEvent(FString EventKey, FString EventData);
|
||||
static FString GenerateUUID();
|
||||
|
||||
virtual void BeginPlay() override;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user