Item cooldowns: tick them on the server client's path too
Review of #1933 (rdbtCVS): `Game::tick` returns through `tick_remote` whenever `remote` is set — every multiplayer session and the default single player — so the `tick_world` call that advanced the entries never ran there. A thrown pearl's slot stayed at full shade until the server's duration-0 packet arrived instead of fading over the second. `tick_remote_level` advances them now (Player.tick's ItemCooldowns.tick); the groups that end are dropped silently, as the client's plain ItemCooldowns does. Co-Authored-By: [CC] <deepseek-v4.1-flash> <noreply@deepseek.com>
This commit is contained in:
@@ -3170,6 +3170,12 @@ impl Game<'_> {
|
||||
fn tick_remote_level(&mut self) -> Result<()> {
|
||||
self.ticks += 1;
|
||||
self.track_experience_display();
|
||||
// Player.tick's ItemCooldowns.tick: this path replaces `tick_world`'s
|
||||
// for a server's client (multiplayer and the default single player),
|
||||
// so the entries advance here or the slot stays shaded until the
|
||||
// server says the entry ended. `onCooldownEnded` is the plain
|
||||
// ItemCooldowns' no-op on a client.
|
||||
self.cooldowns.tick();
|
||||
// Options.broadcastOptions: a changed render distance or Chat option
|
||||
// is sent again.
|
||||
let view = client_view_distance(self.settings.render_distance);
|
||||
|
||||
Reference in New Issue
Block a user