Skip to content

add playerIndex option to spawn command#2808

Merged
IntegratedQuantum merged 6 commits intoPixelGuys:masterfrom
Wunka:spawnTarget
Apr 19, 2026
Merged

add playerIndex option to spawn command#2808
IntegratedQuantum merged 6 commits intoPixelGuys:masterfrom
Wunka:spawnTarget

Conversation

@Wunka
Copy link
Copy Markdown
Contributor

@Wunka Wunka commented Apr 3, 2026

No description provided.

@Wunka Wunka moved this to Easy to Review in PRs to review Apr 3, 2026
Copy link
Copy Markdown
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix conflicts with the PR that added the world spawn setting.

Comment thread src/server/command/spawn.zig Outdated
@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Apr 18, 2026
Wunka and others added 2 commits April 18, 2026 12:54
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
@Wunka
Copy link
Copy Markdown
Contributor Author

Wunka commented Apr 18, 2026

fixed conflicts

Copy link
Copy Markdown
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It crashes when I type /spawn

@Wbjitscool
Copy link
Copy Markdown

That's not good

@Wunka
Copy link
Copy Markdown
Contributor Author

Wunka commented Apr 18, 2026

It crashes when I type /spawn

mhhh before userIndex[0] == '@' worked even on userIndex wich had length 0... this probably needs to be investigated if such an if exists somewhere else and could crash the game

@Wunka
Copy link
Copy Markdown
Contributor Author

Wunka commented Apr 18, 2026

Nope. I was wrong. I didn't work the entire time... wtf. but its now fixed.

Copy link
Copy Markdown
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/spawn @0 crashes now

@Wunka
Copy link
Copy Markdown
Contributor Author

Wunka commented Apr 19, 2026

I think I understand now completly where this came from.
When the iterator has no results instead of giving null it gives a string with len 0 as the first result. This brought both bugs, as both Target and the general spawn command didn't check this behavior

@IntegratedQuantum IntegratedQuantum merged commit e77d186 into PixelGuys:master Apr 19, 2026
1 check passed
codemob-dev pushed a commit to codemob-dev/Cubyz that referenced this pull request Apr 20, 2026
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants