diff --git a/src/actor.h b/src/actor.h index e9d50e9a3..45a5db35b 100644 --- a/src/actor.h +++ b/src/actor.h @@ -402,6 +402,7 @@ enum ActorFlag8 MF8_FRIGHTENING = 0x00000001, // for those moments when halloween just won't do MF8_INSCROLLSEC = 0x00000002, // actor is partially inside a scrolling sector MF8_BLOCKASPLAYER = 0x00000004, // actor is blocked by player-blocking lines even if not a player + MF8_DONTFACETALKER = 0x00000008, // don't alter the angle to face the player in conversations }; // --- mobj.renderflags --- diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 6364835a0..cabb85edf 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -813,7 +813,8 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang npc->target = pc; if (facetalker) { - A_FaceTarget (npc); + if (!(npc->flags8 & MF8_DONTFACETALKER)) + A_FaceTarget (npc); pc->Angles.Yaw = pc->AngleTo(npc); } if ((npc->flags & MF_FRIENDLY) || (npc->flags4 & MF4_NOHATEPLAYERS)) @@ -936,7 +937,8 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply if (reply == NULL) { // The default reply was selected - npc->Angles.Yaw = player->ConversationNPCAngle; + if (!(npc->flags8 & MF8_DONTFACETALKER)) + npc->Angles.Yaw = player->ConversationNPCAngle; npc->flags5 &= ~MF5_INCONVERSATION; return; } @@ -952,7 +954,8 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply TerminalResponse(reply->QuickNo); } npc->ConversationAnimation(2); - npc->Angles.Yaw = player->ConversationNPCAngle; + if (!(npc->flags8 & MF8_DONTFACETALKER)) + npc->Angles.Yaw = player->ConversationNPCAngle; npc->flags5 &= ~MF5_INCONVERSATION; return; } @@ -1080,7 +1083,8 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply } } - npc->Angles.Yaw = player->ConversationNPCAngle; + if (!(npc->flags8 & MF8_DONTFACETALKER)) + npc->Angles.Yaw = player->ConversationNPCAngle; // [CW] Set these to NULL because we're not using to them // anymore. However, this can interfere with slideshows @@ -1129,7 +1133,8 @@ void P_ConversationCommand (int netcode, int pnum, uint8_t **stream) assert(netcode == DEM_CONVNULL || netcode == DEM_CONVCLOSE); if (player->ConversationNPC != NULL) { - player->ConversationNPC->Angles.Yaw = player->ConversationNPCAngle; + if (!(player->ConversationNPC->flags8 & MF8_DONTFACETALKER)) + player->ConversationNPC->Angles.Yaw = player->ConversationNPCAngle; player->ConversationNPC->flags5 &= ~MF5_INCONVERSATION; } if (netcode == DEM_CONVNULL) diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index 1416cbc7a..c0ef05e23 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -317,6 +317,7 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(MF8, FRIGHTENING, AActor, flags8), DEFINE_FLAG(MF8, BLOCKASPLAYER, AActor, flags8), + DEFINE_FLAG(MF8, DONTFACETALKER, AActor, flags8), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),