Adds position and entity selectors as command arguments#327
Conversation
turns out sending the "teleport player" packet is helpful
Sweattypalms
left a comment
There was a problem hiding this comment.
Why edition = "2024" only for some crates and 2021 for rest?
And what's the plan with the @p selector? Merge broken or remove?
And why MORE_GLOBAL_STATE? Sounds like a stupid bandage solution.
| let Ok(mut tracker) = query.get_mut(eid) else { | ||
| continue; | ||
| }; | ||
| tracker.waiting_for_confirm = false; |
There was a problem hiding this comment.
Why ignore teleport_id from client? Malicious client could send fake confirmations.
There was a problem hiding this comment.
Sending malicious confirmations doesn't really do anything, the vanilla server doesn't even handle them.
Sweattypalms
left a comment
There was a problem hiding this comment.
Doesn't address the crate's edition inconsistency.
And are you sure the tilda parsing is valid?
I remembered what it was, if-let chains are a 2024 edition thing, but 2024 edition also changes some temporary lifetimes stuff which makes other code much less readable, have a look at #322 to see what i mean |
Adds position and entities as command args so you can now kill your friends.
Description
Adding entities as command args lets you target players and entities with you commands, and the position arg lets you take in a position that can either be absolute or relative to another given position, usually the player running the command.
Motivation and Context
I want to murder my friends :)
How has this been tested?
Units tests added for parsing and resolving, teleports tested with multiple players in game
Screenshots (if appropriate):
Types of changes
Checklist: