- fixed: non-damaging attacks should not cause infighting, unless some relevant pain flags are being set.

This commit is contained in:
Christoph Oelckers 2016-12-25 19:19:49 +01:00 committed by Rachael Alexanderson
parent 80228562b3
commit 470a96d3b2
2 changed files with 2 additions and 2 deletions

View file

@ -1577,7 +1577,7 @@ static bool C_HandleKey (event_t *ev, FCommandBuffer &buffer)
static TArray<char> command;
const size_t length = buffer.Text.Len();
command.Resize(length + 1);
command.Resize(unsigned(length + 1));
memcpy(&command[0], buffer.Text.GetChars(), length);
command[length] = '\0';

View file

@ -1545,7 +1545,7 @@ dopain:
target->SetState (target->SeeState);
}
}
else if (source != target->target && target->OkayToSwitchTarget (source))
else if ((damage > 0 || fakedPain) && source != target->target && target->OkayToSwitchTarget (source))
{
// Target actor is not intent on another actor,
// so make him chase after source