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
Ignore punches with no damage in the actionstream #2405
Conversation
Please fix the build |
No commit can be too small to not contain any mistake. Fixed it. |
Rebased and fixed the conflicts. |
// create message and add to list | ||
ActiveObjectMessage aom(getId(), true, str); | ||
m_messages_out.push(aom); | ||
actionstream<<getDescription()<<" punched by " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces
Place fix the spaces |
Fixed spaces. |
if ( puncher != 0 ) | ||
punchername = puncher->getDescription(); | ||
if (result.damage > 0) { | ||
if (puncher != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::string punchername = puncher ? puncher->getDescription() : "nil";
and remove line 448
If you do not like the ternary operation I'd still suggest removing line 448 and having here
std::string punchername;
if (puncher == NULL)
punchername = "nil";
else
punchername = puncher->getDescription();
If you don't, for some bizarre reason (heh), want to do either of those changes then the line has to at least be changed from if (puncher != 0)
to if (puncher != NULL)
, or even better simply if (puncher)
Edit: other than that, this should be merged
Punches with no damage do not get written in the actionstream anymore; they are just useless in the actionstream because nothing has changed.
This is a trivial change.