Skip to content

Add a GameplayMessage system to resolve hard-coupling of the AttributeComponent and the GameMode #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rolandsarosy opened this issue Oct 17, 2024 · 0 comments

Comments

@rolandsarosy
Copy link
Owner

In CAttributeComponent.cpp:

	if (!IsAlive())
	{
		MulticastOnDeath(InstigatorActor);

		// I greatly dislike this hard-coupled nightmare of a statement, but this is what was done in class. TODO: Use something like a GameplayMessage or maybe a delegate of sorts here.
		GetWorld()->GetAuthGameMode<ACGameModeBase>()->OnActorKilled(GetOwner(), InstigatorActor);
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant