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 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 This issue is difficult to make compatible. type: session fix The fix for this issues is persistent across a session. labels Feb 13, 2021
@AmProsius AmProsius added provided fix This issue has a fix provided in the comments. opinionated This issue or this issues' fix is opinionated and not predefined by the scripts. validation: required This issue needs validation from one of the validators. labels Feb 13, 2021
@szapp
Copy link
Collaborator

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

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 This issue requires analyzing and/or modifying the bytecode of script functions. 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 March 29, 2021 15:59
@szapp
Copy link
Collaborator

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 March 30, 2021 15:35
@szapp szapp marked this pull request as ready for review March 30, 2021 15:53
@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 March 31, 2021 10:11
AmProsius added a commit that referenced this pull request Apr 11, 2021
AmProsius added a commit that referenced this pull request Apr 11, 2021
szapp added a commit that referenced this pull request Apr 20, 2021
@szapp szapp removed the validation: required This issue needs validation from one of the validators. 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 This issue is difficult to make compatible. impl: modify/analyze script func This issue requires analyzing and/or modifying the bytecode of script functions. opinionated This issue or this issues' fix is opinionated and not predefined by the scripts. provided fix This issue has a fix provided in the comments. type: session fix The fix for this issues is persistent across a session.
Projects
Fix templates
Modify NPC function
v1.1.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants