Skip to content
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

Add Entity::ListensTo(message_t message). #26

Open
Viech opened this issue Apr 17, 2015 · 0 comments
Open

Add Entity::ListensTo(message_t message). #26

Viech opened this issue Apr 17, 2015 · 0 comments

Comments

@Viech
Copy link
Member

Viech commented Apr 17, 2015

An Entity::ListensTo(message_t message) method would be nice to check if a message would be handled without actually sending the message. An usage example would be missiles which should bounce exactly when they can't damage the target that they hit. Right now I'm checking for the presence of a HealthComponent to achieve this but this would break when other entities without a HealthComponent would want to react to the damage that the missile could do. So just like HasComponents, this can be used to find out certain characterstics of the entity at hand.

Viech referenced this issue in Unvanquished/Unvanquished Apr 17, 2015
The remainders of gentity_t.health and takedamage mark spots for refactoring
non-buildable, non-client entities that have a notion of health.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant