feat(pets): play as your pet in any room, from the pet chooser

A switch in the pet chooser (the settings menu's own On/Off switch, at
the top left of the pet's picture) puts the pet that is out in the
avatar's place, for everyone, as at a Play-As-Your-Pet party: the pet
at the party's size where the avatar stands, turning as it walks, its
name on the name bar, chat balloons and emotes over it, the pet in the
HUD. Hidden at the party itself.

- kept as user var 9008 (9007 is the performance profile), so it holds
  through rooms and logins and is kept for the next pet when the pet is
  put away. the server tells the room by user communication type 13,
  also to players coming in later.
- WorldPet and AvatarWorldView ask the avatar's own form instead of the
  room-wide party test; a pet that cannot come into the room leaves the
  avatar shown.
- the type-13 handler read a variable it never set, so every client took
  every message for "off" and nobody else saw the form.
- the action menu's pet button does the pet's trick again (5c9b2e0 had
  made it the switch, which only hid the avatar).

Flying pets keep to the ground's walls (the party lets them over).
buildVersion 74.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
BurrowdevandClaude Opus 5.5 committed 2026-10-20 15:25:35 +03:00
1 parent 2344270291
commit 096ceafea7
12 files changed
+627 -67

No files matched your search

+9
View File
@@ -608,6 +608,14 @@ package
return settingOf(9006) != 1;
}
// the pet chooser's "play as your pet" switch (gui.PetInventory): the
// pet that is out stands in for the avatar in any room. user var 9008,
// which the server also reads to show the pet form to everyone.
public static function petFormOn() : Boolean
{
return settingOf(9008) == 1;
}
// an item's picture version, or null for none or with them hidden
private static function artOf(param1:String, param2:int) : String
{
@@ -1542,6 +1550,7 @@ package
// 9007 Performance profile: 1 Low-end, 2 High, unset Balanced. A
// profile changes only optional rendering work, never the
// game's native 24 FPS (which would slow its animations).
// 9008 Play as your pet (gui.PetInventory, lib/pets.js): 1 on.
private static var _smoothTimer:Timer;