mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
fix(avatars): switching animals no longer copies the new one over the old
Since3423df1the server followed an animal switch ("as") with that animal's "ad" and full "il". The client swaps animals partway through the transform animation: at "hideAvatar" it copies the in-world avatar into the switcher slot being left, then loads the new animal onto the in-world one. The extra "ad" arrived before that frame, had no request waiting for it, and so was applied to the in-world avatar, and the "il" then matched it too. The slot got a copy of the new animal, the old one was gone from the switcher, and the other slots drew blank until the next login. This reverts3423df1. A newly bought animal's editor not opening until the next login comes back with it and needs a fix that goes through the client's own "ad" request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
6b707fbc1d
commit
494f252c5b
3 files changed
+7
-13
No files matched your search
@@ -347,10 +347,6 @@ const run = async () => {
|
||||
assert.deepStrictEqual(switched.slice(2, 4).concat(switched.slice(4, 8)), ["1", String(aliceId), aa[3], aa[4], "-1", "4"]);
|
||||
assert.strictEqual(switched[11], "15136|15224|15299");
|
||||
assert.strictEqual((await c.nextXt("as")).length, switched.length + 7);
|
||||
// The switch is followed by the animal's data and its full item list, so
|
||||
// that the editor can open on the new animal (lib/avatars.js "as").
|
||||
assert.strictEqual((await a.nextXt("ad"))[2], "Alice");
|
||||
assert.strictEqual((await a.nextXt("il"))[2], "0");
|
||||
a.xt("al", denId, "Alice");
|
||||
assert.deepStrictEqual((await a.nextXt("al")).slice(5, 7), ["2", aa[3]]);
|
||||
a.xt("ak", denId, aa[3]); // cannot remove the animal in use
|
||||
|
||||
Reference in new issue
Block a user