--------------------------------------------------------------------------------------------------------------------------
| 323 | |
| 324 | //-------------------------------------------------------------------------------------------------------------------------- |
| 325 | AActor* UCogSampleFunctionLibrary_Gameplay::GetInstigator(const AActor* Actor) |
| 326 | { |
| 327 | if (Actor == nullptr) |
| 328 | { |
| 329 | return nullptr; |
| 330 | } |
| 331 | |
| 332 | AActor* Instigator = Actor->GetInstigator(); |
| 333 | if (Instigator != nullptr) |
| 334 | { |
| 335 | return Instigator; |
| 336 | } |
| 337 | |
| 338 | //------------------------------------------------- |
| 339 | // The game state is the default Instigator |
| 340 | //------------------------------------------------- |
| 341 | UWorld* World = Actor->GetWorld(); |
| 342 | if (World != nullptr) |
| 343 | { |
| 344 | return World->GetGameState(); |
| 345 | } |
| 346 | |
| 347 | return nullptr; |
| 348 | } |
| 349 | |
| 350 | //-------------------------------------------------------------------------------------------------------------------------- |
| 351 | int32 UCogSampleFunctionLibrary_Gameplay::GetProgressionLevel(const AActor* Actor) |
no test coverage detected