Allow limiting NPC conversations to settings controllers
Also cleans up the network menu a little bit.
This commit is contained in:
parent
3fba33204c
commit
311e1d09be
4 changed files with 17 additions and 21 deletions
|
|
@ -114,6 +114,8 @@ static FRandom pr_crunch("DoCrunch");
|
|||
TArray<spechit_t> spechit;
|
||||
TArray<spechit_t> portalhit;
|
||||
|
||||
EXTERN_CVAR(Bool, net_limitconversations)
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// P_ShouldPassThroughPlayer
|
||||
|
|
@ -5733,11 +5735,17 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, HasConversation, HasConversation)
|
|||
ACTION_RETURN_BOOL(HasConversation(self));
|
||||
}
|
||||
|
||||
static int NativeStartConversation(AActor *self, AActor *player, bool faceTalker, bool saveAngle)
|
||||
int NativeStartConversation(AActor *self, AActor *player, bool faceTalker, bool saveAngle)
|
||||
{
|
||||
if (!CanTalk(self))
|
||||
return false;
|
||||
|
||||
if (netgame && net_limitconversations && player->player != nullptr && player->player->mo == player && !player->player->settings_controller)
|
||||
{
|
||||
Printf("Only settings controllers can start conversations with NPCs\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
self->ConversationAnimation(0);
|
||||
P_StartConversation(self, player, faceTalker, saveAngle);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue