MCPcopy Create free account
hub / github.com/ZDoom/gzdoom / P_ConversationCommand

Function P_ConversationCommand

src/p_conversation.cpp:670–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668//============================================================================
669
670void P_ConversationCommand (int netcode, int pnum, uint8_t **stream)
671{
672 player_t *player = &players[pnum];
673
674 // The conversation menus are normally closed by the menu code, but that
675 // doesn't happen during demo playback, so we need to do it here.
676 if (demoplayback && CurrentMenu != NULL && CurrentMenu->IsKindOf("ConversationMenu"))
677 {
678 CurrentMenu->Close();
679 }
680 if (netcode == DEM_CONVREPLY)
681 {
682 int nodenum = ReadInt16(stream);
683 int replynum = ReadInt8(stream);
684 HandleReply(player, pnum == consoleplayer, nodenum, replynum);
685 }
686 else
687 {
688 assert(netcode == DEM_CONVNULL || netcode == DEM_CONVCLOSE);
689 if (player->ConversationNPC != NULL)
690 {
691 if (!(player->ConversationNPC->flags8 & MF8_DONTFACETALKER))
692 player->ConversationNPC->Angles.Yaw = player->ConversationNPCAngle;
693 player->ConversationNPC->flags5 &= ~MF5_INCONVERSATION;
694 }
695 if (netcode == DEM_CONVNULL)
696 {
697 ClearConversationStuff(player);
698 }
699 }
700}
701
702//============================================================================
703//

Callers 1

Net_DoCommandFunction · 0.85

Calls 6

ReadInt16Function · 0.85
ReadInt8Function · 0.85
HandleReplyFunction · 0.85
ClearConversationStuffFunction · 0.85
IsKindOfMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected