mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
fix looting bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user