Forked from tomlooman/ASMutator_WeaponReplacement.cpp
Created
November 14, 2017 10:01
-
-
Save shelllee/4426d0ba7b83e8a856537c44fc563bdd to your computer and use it in GitHub Desktop.
Test Gist: ASMutator_WeaponReplacement
This file contains hidden or 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