fix looting bug

This commit is contained in:
Milxnor
2023-05-21 10:54:43 -04:00
parent a2d621560a
commit a0f427b491
9 changed files with 46 additions and 16 deletions

View File

@@ -6,6 +6,11 @@
bool ABuildingContainer::SpawnLoot(AFortPawn* Pawn)
{
if (!Pawn)
return false;
this->ForceNetUpdate();
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
FVector LocationToSpawnLoot = this->GetActorLocation() + this->GetActorRightVector() * 70.f + this->GetActorUpVector() * 50.f;
@@ -36,5 +41,11 @@ bool ABuildingContainer::SpawnLoot(AFortPawn* Pawn)
auto NewPickup = AFortPickup::SpawnPickup(CreateData);
}
if (!this->IsDestroyed())
{
this->ForceNetUpdate();
// a buncha other stuff
}
return true;
}