Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor(api-v3): remove redundant call and arg inPed.PedGroup#1631

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@Tivertoni
Copy link
Contributor

@TivertoniTivertoni commentedOct 28, 2025
edited by kagikn
Loading

The previous implementation made two native calls:

IS_PED_IN_GROUP (via IsInGroup)

GET_PED_GROUP_INDEX

The first call is redundant because GET_PED_GROUP_INDEX already returns -1 when the is not in any group.

In addition, the second argument passed to GET_PED_GROUP_INDEX is unnecessary and has been removed.

Note by kagikn: The screenshot of the implementation code ofGET_PED_GROUP_INDEX is deleted as it exposed excessive part of code.

@Tivertoni
Copy link
ContributorAuthor

Accidentally pushed changes from other branch into here, I reverted them.

@kagikn
Copy link
Member

Good catches, I was the one that created the flaws in116d61e. I wish I realized the second argument ofGET_PED_GROUP_INDEX is redundant since even AB's Native DB it doesn't say it has the second argument iirc, not only alloc8or's.

The first call is redundant because <c>GET_PED_GROUP_INDEX</c> already returns <c>-1</c> when the <see cref="Ped"/> is not in any group.

I had to use an inline code or a code block to reveal hidden HTML element tags, but it looks like you can't use all decorative HTML tags if there's any supported ones. Use the Markdown syntax.

@kagiknkagikn changed the titlerefactor(api-v3): refactor Ped.PedGrouprefactor(api-v3): remove redundant call and arg inPed.PedGroupOct 28, 2025
@kagiknkagikn merged commitc4491f2 intoscripthookvdotnet:mainOct 28, 2025
2 checks passed
@kagikn
Copy link
Member

Changed the title "refactor(api-v3): refactor Ped.PedGroup" because it doesn't say any of what the commit achieves other than refactoringPedGroup. People have to see the descriptions or the diffs of commits to understand what or why they change if the titles don't say what they achieve.feat: <some feature names> could be justified because people can guess that's pure feature additions, though.

Also enclosed the property name with backticks as usual since GitHub supports highlighting with inline codes in titles of commits, issues, and pull requests. alexguirre did this several times when committing toSollumz, and some people use this feature when committing toRust's codebase.

@TivertoniTivertoni deleted the Simplify-Ped.PedGroup branchNovember 1, 2025 15:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Tivertoni@kagikn

[8]ページ先頭

©2009-2025 Movatter.jp