openmultiplayer / openmultiplayer/open.mp
SetSpawnInfo and SetPlayerTeam no player damage allowed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 641
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
If SetSpawnInfo is used with team 0 (i assume other ids work as long as they are the same), and then SetPlayerTeam is used to set to NO_TEAM in order for damage to work, server still consider players in same team and does not apply damage. Also GetPlayerTeam returns NO_TEAM as it should.
To Reproduce
Steps to reproduce the behavior:
- SetSpawnInfo for 2 players, make sure team is same.
- SetPlayerTeam to NO_TEAM for both players
- GetPlayerTeam to make sure its still NO_TEAM (should be).
- Punch/shoot each other, damage is not applied (It should be since both polayers are NO_TEAM)
Expected behavior
Team argument from SetSpawnInfo should be influenced/modified by Get/SetPlayerTeam and be one and the same.
Players in same teams can not damage each other, except for for players that have NO_TEAM, they can damage each other and other teams.
Screenshots and/or logs
If applicable, add screenshots and/or log output to help explain your problem.
Release version
RC2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with SetSpawnInfo, SetPlayerTeam, GetPlayerTeam, and player damage interactions described in the issue. Trace where spawn-team values, current player teams, and same-team damage checks are handled; done means NO_TEAM players can damage each other and other teams while GetPlayerTeam remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100