Initial work on spawning tangibles from Luprex

This commit is contained in:
2023-09-06 23:25:37 -04:00
parent 1482e5e43f
commit 4b3f36d7e7
6 changed files with 93 additions and 20 deletions

View File

@@ -5,9 +5,18 @@
using AActorPtr = AActor*;
FTangibleManager::FTangibleManager() {
World = nullptr;
ClassTangibleActor = nullptr;
Actor = 0;
Near = IdList();
}
void FTangibleManager::Init(UWorld *world, UClass* tanact) {
World = world;
ClassTangibleActor = tanact;
Actor = 0;
Near = IdList();
}
AActorPtr FTangibleManager::GetTangible(int64 id) {
@@ -23,8 +32,8 @@ AActorPtr FTangibleManager::GetTangible(int64 id) {
AActorPtr FTangibleManager::MakeTangible(int64 id) {
AActorPtr& p = IdToActor.FindOrAdd(id);
if (p == nullptr) {
FVector location;
FRotator rotation;
FVector location(0,0,0);
FRotator rotation(0, 0, 0);
FActorSpawnParameters params;
p = World->SpawnActor(ClassTangibleActor, &location, &rotation, params);
check(p != nullptr);
@@ -36,4 +45,3 @@ AActorPtr FTangibleManager::MakeTangible(int64 id) {
void FTangibleManager::DeleteTangible(int64 id) {
// IMPLEMENT ME
}