From 2ce55e54164eec6de759de3ca93bcb04a727f906 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 25 Dec 2016 19:19:49 +0100 Subject: [PATCH] - fixed: non-damaging attacks should not cause infighting, unless some relevant pain flags are being set. --- src/c_console.cpp | 2 +- src/p_interaction.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c_console.cpp b/src/c_console.cpp index 0a324eb8f..faeec0a68 100644 --- a/src/c_console.cpp +++ b/src/c_console.cpp @@ -1573,7 +1573,7 @@ static bool C_HandleKey (event_t *ev, FCommandBuffer &buffer) static TArray 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'; diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 9aa178e64..102142d38 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -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