| 668 | //============================================================================ |
| 669 | |
| 670 | void 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 | // |
no test coverage detected