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

Ignore punches with no damage in the actionstream #2405

Closed
wants to merge 1 commit into from
Closed

Ignore punches with no damage in the actionstream #2405

wants to merge 1 commit into from

Conversation

SmallJoker
Copy link
Member

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.

@nerzhul
Copy link
Member

nerzhul commented Feb 28, 2015

Please fix the build

@SmallJoker
Copy link
Member Author

No commit can be too small to not contain any mistake.

Fixed it.

@SmallJoker
Copy link
Member Author

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 "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

@nerzhul
Copy link
Member

nerzhul commented Mar 16, 2015

Place fix the spaces

@SmallJoker
Copy link
Member Author

Fixed spaces.

if ( puncher != 0 )
punchername = puncher->getDescription();
if (result.damage > 0) {
if (puncher != 0)
Copy link
Contributor

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

@est31
Copy link
Contributor

est31 commented Jun 14, 2015

bb5f830

@est31 est31 closed this Jun 14, 2015
@SmallJoker SmallJoker deleted the remove_spam branch October 9, 2015 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants