Created
September 2, 2015 16:46
-
-
Save tomlooman/16860f6d47d3d2e54505 to your computer and use it in GitHub Desktop.
Test Gist: ASMutator_WeaponReplacement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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