mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- added MF8_DONTFACETALKER flag which prevents NPCs from facing the player in conversations.
This commit is contained in:
parent
051521a898
commit
6d0b172762
3 changed files with 12 additions and 5 deletions
|
@ -402,6 +402,7 @@ enum ActorFlag8
|
||||||
MF8_FRIGHTENING = 0x00000001, // for those moments when halloween just won't do
|
MF8_FRIGHTENING = 0x00000001, // for those moments when halloween just won't do
|
||||||
MF8_INSCROLLSEC = 0x00000002, // actor is partially inside a scrolling sector
|
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_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 ---
|
// --- mobj.renderflags ---
|
||||||
|
|
|
@ -813,7 +813,8 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
||||||
npc->target = pc;
|
npc->target = pc;
|
||||||
if (facetalker)
|
if (facetalker)
|
||||||
{
|
{
|
||||||
A_FaceTarget (npc);
|
if (!(npc->flags8 & MF8_DONTFACETALKER))
|
||||||
|
A_FaceTarget (npc);
|
||||||
pc->Angles.Yaw = pc->AngleTo(npc);
|
pc->Angles.Yaw = pc->AngleTo(npc);
|
||||||
}
|
}
|
||||||
if ((npc->flags & MF_FRIENDLY) || (npc->flags4 & MF4_NOHATEPLAYERS))
|
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)
|
if (reply == NULL)
|
||||||
{
|
{
|
||||||
// The default reply was selected
|
// The default reply was selected
|
||||||
npc->Angles.Yaw = player->ConversationNPCAngle;
|
if (!(npc->flags8 & MF8_DONTFACETALKER))
|
||||||
|
npc->Angles.Yaw = player->ConversationNPCAngle;
|
||||||
npc->flags5 &= ~MF5_INCONVERSATION;
|
npc->flags5 &= ~MF5_INCONVERSATION;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -952,7 +954,8 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
|
||||||
TerminalResponse(reply->QuickNo);
|
TerminalResponse(reply->QuickNo);
|
||||||
}
|
}
|
||||||
npc->ConversationAnimation(2);
|
npc->ConversationAnimation(2);
|
||||||
npc->Angles.Yaw = player->ConversationNPCAngle;
|
if (!(npc->flags8 & MF8_DONTFACETALKER))
|
||||||
|
npc->Angles.Yaw = player->ConversationNPCAngle;
|
||||||
npc->flags5 &= ~MF5_INCONVERSATION;
|
npc->flags5 &= ~MF5_INCONVERSATION;
|
||||||
return;
|
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
|
// [CW] Set these to NULL because we're not using to them
|
||||||
// anymore. However, this can interfere with slideshows
|
// 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);
|
assert(netcode == DEM_CONVNULL || netcode == DEM_CONVCLOSE);
|
||||||
if (player->ConversationNPC != NULL)
|
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;
|
player->ConversationNPC->flags5 &= ~MF5_INCONVERSATION;
|
||||||
}
|
}
|
||||||
if (netcode == DEM_CONVNULL)
|
if (netcode == DEM_CONVNULL)
|
||||||
|
|
|
@ -317,6 +317,7 @@ static FFlagDef ActorFlagDefs[]=
|
||||||
|
|
||||||
DEFINE_FLAG(MF8, FRIGHTENING, AActor, flags8),
|
DEFINE_FLAG(MF8, FRIGHTENING, AActor, flags8),
|
||||||
DEFINE_FLAG(MF8, BLOCKASPLAYER, AActor, flags8),
|
DEFINE_FLAG(MF8, BLOCKASPLAYER, AActor, flags8),
|
||||||
|
DEFINE_FLAG(MF8, DONTFACETALKER, AActor, flags8),
|
||||||
|
|
||||||
// Effect flags
|
// Effect flags
|
||||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||||
|
|
Loading…
Reference in a new issue