diff --git a/Source/Nakatomi/EnemyAIController.cpp b/Source/Nakatomi/EnemyAIController.cpp index 411525b..bc0440d 100644 --- a/Source/Nakatomi/EnemyAIController.cpp +++ b/Source/Nakatomi/EnemyAIController.cpp @@ -76,6 +76,11 @@ void AEnemyAIController::OnDeath(FDamageInfo info) } enemy->SetLifeSpan(10.0f); + + auto weaponPickup = GetWorld()->SpawnActor(); + weaponPickup->SetActorLocation(enemy->GetActorLocation()); + weaponPickup->SetWeapon(enemy->DefaultWeaponInventory[enemy->GetCurrentInventorySlot()]); + weaponPickup->SetWeaponProperties(*enemy->CurrentWeapon->GetWeaponProperties()); } void AEnemyAIController::OnPerceptionUpdated(const TArray& actors)