Skip to content

Instantly share code, notes, and snippets.

@tomlooman
Created September 2, 2015 16:46
Show Gist options
  • Save tomlooman/16860f6d47d3d2e54505 to your computer and use it in GitHub Desktop.
Save tomlooman/16860f6d47d3d2e54505 to your computer and use it in GitHub Desktop.
Test Gist: ASMutator_WeaponReplacement
bool ASMutator_WeaponReplacement::CheckRelevance_Implementation(AActor* Other)
{
ASWeaponPickup* WeaponPickup = Cast<ASWeaponPickup>(Other);
if (WeaponPickup)
{
for (int32 i = 0; i < WeaponsToReplace.Num(); i++)
{
const FReplacementInfo& Info = WeaponsToReplace[i];
if (Info.FromWeapon == WeaponPickup->WeaponClass)
{
WeaponPickup->WeaponClass = Info.ToWeapon;
}
}
}
return Super::CheckRelevance_Implementation(Other);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment