- Version bump to 2.1.4.
- Fixed: Friendlies would not turn to face you when you engaged them in conversation, nor would they reliably return to their original facing when you stopped talking to them. - Added deprecation warnings for the DontHurtShooter, ExplosionRadius, and ExplosionDamage actor "properties." They were considered deprecated before; now this is explicitly stated when they are used. The problem with them is that they are not really properties and do not behave like other properties and cannot be inherited, because they are really just an alternate way of specifying parameters for A_Explode. (Anything that currently prints a deprecation warning will be removed completely in 2.2.0, which will be the version where custom state labels make their debut.) SVN r272 (trunk)
This commit is contained in:
parent
f203219d24
commit
06681ec72d
8 changed files with 56 additions and 14 deletions
|
|
@ -79,6 +79,7 @@ static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses);
|
|||
static void DrawConversationMenu ();
|
||||
static void PickConversationReply ();
|
||||
static void CleanupConversationMenu ();
|
||||
static void ConversationMenuEscaped ();
|
||||
|
||||
static FStrifeDialogueNode *CurNode, *PrevNode;
|
||||
static brokenlines_t *DialogueLines;
|
||||
|
|
@ -602,8 +603,9 @@ CUSTOM_CVAR(Float, dlg_musicvolume, 1.0f, CVAR_ARCHIVE)
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
void P_StartConversation (AActor *npc, AActor *pc, bool facetalker)
|
||||
void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveangle)
|
||||
{
|
||||
AActor *oldtarget;
|
||||
FStrifeDialogueReply *reply;
|
||||
menuitem_t item;
|
||||
const char *toSay;
|
||||
|
|
@ -626,17 +628,22 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker)
|
|||
}
|
||||
|
||||
npc->reactiontime = 2;
|
||||
if (!(npc->flags & MF_FRIENDLY) && !(npc->flags4 & MF4_NOHATEPLAYERS))
|
||||
{
|
||||
npc->target = pc;
|
||||
}
|
||||
ConversationFaceTalker = facetalker;
|
||||
ConversationNPCAngle = npc->angle;
|
||||
if (saveangle)
|
||||
{
|
||||
ConversationNPCAngle = npc->angle;
|
||||
}
|
||||
oldtarget = npc->target;
|
||||
npc->target = pc;
|
||||
if (facetalker)
|
||||
{
|
||||
A_FaceTarget (npc);
|
||||
pc->angle = R_PointToAngle2 (pc->x, pc->y, npc->x, npc->y);
|
||||
}
|
||||
if ((npc->flags & MF_FRIENDLY) || (npc->flags4 & MF4_NOHATEPLAYERS))
|
||||
{
|
||||
npc->target = oldtarget;
|
||||
}
|
||||
|
||||
// Check if we should jump to another node
|
||||
while (CurNode->ItemCheck[0] != NULL)
|
||||
|
|
@ -662,7 +669,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker)
|
|||
|
||||
// Set up the menu
|
||||
ConversationMenu.PreDraw = DrawConversationMenu;
|
||||
ConversationMenu.EscapeHandler = CleanupConversationMenu;
|
||||
ConversationMenu.EscapeHandler = ConversationMenuEscaped;
|
||||
|
||||
// Format the speaker's message.
|
||||
toSay = CurNode->Dialogue;
|
||||
|
|
@ -747,7 +754,7 @@ void P_ResumeConversation ()
|
|||
{
|
||||
if (ConversationPC != NULL && ConversationNPC != NULL)
|
||||
{
|
||||
P_StartConversation (ConversationNPC, ConversationPC, ConversationFaceTalker);
|
||||
P_StartConversation (ConversationNPC, ConversationPC, ConversationFaceTalker, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -866,6 +873,7 @@ static void PickConversationReply ()
|
|||
CleanupConversationMenu ();
|
||||
if (reply == NULL)
|
||||
{
|
||||
ConversationNPC->angle = ConversationNPCAngle;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -880,6 +888,7 @@ static void PickConversationReply ()
|
|||
Printf ("%s\n", reply->QuickNo);
|
||||
}
|
||||
ConversationNPC->ConversationAnimation (2);
|
||||
ConversationNPC->angle = ConversationNPCAngle;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -967,7 +976,7 @@ static void PickConversationReply ()
|
|||
ConversationNPC->Conversation = StrifeDialogues[rootnode - reply->NextNode - 1];
|
||||
if (gameaction != ga_slideshow)
|
||||
{
|
||||
P_StartConversation (ConversationNPC, players[consoleplayer].mo, ConversationFaceTalker);
|
||||
P_StartConversation (ConversationNPC, players[consoleplayer].mo, ConversationFaceTalker, false);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
@ -1018,3 +1027,16 @@ void CleanupConversationMenu ()
|
|||
I_SetMusicVolume(1.f);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// ConversationMenuEscaped
|
||||
//
|
||||
// Called when the user presses escape to leave tho conversation menu.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void ConversationMenuEscaped ()
|
||||
{
|
||||
CleanupConversationMenu ();
|
||||
ConversationNPC->angle = ConversationNPCAngle;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue