Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPCs are rude to the player even after defeating them #4

Merged
merged 4 commits into from Mar 31, 2021
Merged

Conversation

szapp
Copy link
Collaborator

@szapp szapp commented Mar 29, 2021

Describe the bug
NPCs confront the player when he is standing in their way even if he has defeated them before.

Expected behavior
NPCs no longer confront the player when he is standing in their way if he has defeated them before.

@AmProsius AmProsius added this to To Do in v1.0.0 Jan 18, 2021
@AmProsius AmProsius removed this from To Do in v1.0.0 Feb 9, 2021
@catalinstoian
Copy link

@catalinstoian catalinstoian commented Feb 13, 2021

else if (Npc_GetAttitude ( self, other) == ATT_ANGRY || Npc_GetAttitude ( self, other) == ATT_NEUTRAL )
&& C_AmIStronger(self, other)
&& !C_NpcIsGuard(self)
&& !C_NpcIsGuardArcher(self)
{
B_FullStop (self);
B_SmartTurnToNpc(self, other);
B_Say (self, other, "$OUTOFMYWAY");
AI_StartState (self,ZS_MoveNpcWait, 0, "");
return;
}

changed to

		else if	(Npc_GetAttitude ( self, other) == ATT_ANGRY || Npc_GetAttitude ( self, other) == ATT_NEUTRAL )
		&& 		C_AmIStronger(self, other)
		&& 		!C_NpcIsGuard(self)
		&& 		!C_NpcIsGuardArcher(self)
		&& 		self.aivar[AIV_WASDEFEATEDBYSC]==FALSE
		{
			B_FullStop 		(self);
			B_SmartTurnToNpc(self,	other);
			B_Say 			(self, other, "$OUTOFMYWAY");
			AI_StartState 	(self,ZS_MoveNpcWait, 0, "");	
			return;
		}

@szapp szapp added compatibility: difficult type: session fix labels Feb 13, 2021
@AmProsius AmProsius added provided fix opinionated validation: required labels Feb 13, 2021
@szapp
Copy link
Collaborator

@szapp szapp commented Feb 20, 2021

I suppose the label opinionated was added, because this is not really a bug but could still be regarded as an inconsistency. Looking at the code surrounding the suggested fix, I say we go forward with this “fix” as there are other circumstances in which the “move it!” comment is suppressed.

@AmProsius
Copy link
Owner Author

@AmProsius AmProsius commented Feb 20, 2021

Looking at the code surrounding the suggested fix, I say we go forward with this “fix” as there are other circumstances in which the “move it!” comment is suppressed.

I agree, that's why I left the issue open.

@AmProsius AmProsius added this to To Do in v1.1.0 via automation Mar 5, 2021
@AmProsius AmProsius added this to the v1.1.0 milestone Mar 5, 2021
@szapp szapp added this to NPC function in Fix templates Mar 17, 2021
@szapp szapp added the impl: modify/analyze script func label Mar 17, 2021
@szapp szapp self-assigned this Mar 17, 2021
@szapp szapp removed their assignment Mar 29, 2021
@szapp szapp requested a review from AmProsius Mar 29, 2021
@szapp
Copy link
Collaborator

@szapp szapp commented Mar 29, 2021

The test is manual: The PC is teleported right in front of Cronos. He is set to "defeated" and should react with "May I pass through here?" instead of "Step aside!".

@szapp szapp moved this from To Do to In Progress in v1.1.0 Mar 29, 2021
@szapp szapp marked this pull request as draft Mar 30, 2021
@szapp szapp marked this pull request as ready for review Mar 30, 2021
@AmProsius AmProsius merged commit 8dcd0e3 into master Mar 31, 2021
v1.1.0 automation moved this from In Progress to Done Mar 31, 2021
@AmProsius AmProsius deleted the bug004 branch Mar 31, 2021
AmProsius added a commit that referenced this issue Apr 11, 2021
szapp added a commit that referenced this issue Apr 20, 2021
@szapp szapp removed the validation: required label May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility: difficult impl: modify/analyze script func opinionated provided fix type: session fix
Projects
Fix templates
Modify NPC function
v1.1.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants