-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: respawn #702
base: main
Are you sure you want to change the base?
feat: respawn #702
Conversation
Thanks for your work. :) I don't think we should bypass the distance check; instead we should set the player location properly before we send the respawn packet. bypassing the distance check is a big vulnerability. For instance:
|
@SanderMertens thoughts on vs not having |
5cdd9e3
to
0652059
Compare
Just rebased everything. @andrewgazelka what is the preferred way to get every player on a specific team? |
use could do world
.query::<&Team>()
.each_entity(|_, team|) {
if team != target continue
// ...
} inside of a system. see https://github.com/Indra-db/Flecs-Rust/tree/main/flecs_ecs/examples/flecs/queries
just do what you were doing then |
- want to have one crate per module so we can mix and match
d11fba3
to
c677af8
Compare
for event in event_queue.drain() { | ||
let client = event.client.entity_view(world); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code should match against event.status
to ensure it equals ClientStatusCommand::PerformRespawn
before proceeding with the respawn logic. Without this check, the code will attempt to respawn players who request stats, which is the other variant of ClientStatusCommand
.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
Screen.Recording.2024-12-18.at.9.34.50.AM.movstill appears a bit bugged :( also—"Respawn next to a teammate" can probably be done in a future PR. let's try to get this in. |
This was introduced by a5c2f89 I'll look at what caused that. hotbar.bug.mp4 |
hmmmmm yea in the future I want to invest more in testing infrastructure I think... like having a bot that can connect to the server and we can control it with functions. |
Current state:
Todo
When respawned, the client tries to teleport to its respawn location as defined by PlayerSpawnPositionS2c, but the server prevents this as it exceeds the maximum distance that the client is allowed to move in one tick. This doesn't matter for the Tag event as we'll have to teleport the player to another location anyway, but it could be an issue for other events, so we should have a way to bypass this distance check when it follows a respawn.