mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat(client): any animation the client has, sent as "sja:<anim>,<flip>"
An action message "sja:<anim>,<flip>" plays animation <anim> (1 to 255) on the sender's avatar for everyone else, and holds it as their idle (AvatarWorldView.holdIdleAnim) until they walk or do another action, so the game's idle refreshes don't stand them back up. Not in minigames. A client without this finds no action by that name and ignores it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
9156c6e392
commit
d44612bd08
2 files changed
+24
No files matched your search
@@ -805,6 +805,16 @@ package avatar
|
||||
return false;
|
||||
}
|
||||
|
||||
// plays an animation and keeps it as this avatar's idle, so the client's
|
||||
// own idle refreshes don't put the avatar back to standing. Walking or
|
||||
// an action replaces it, as with any idle.
|
||||
public function holdIdleAnim(param1:int, param2:Boolean) : void
|
||||
{
|
||||
_lastIdleAnim = param1;
|
||||
_lastIdleFlip = param2;
|
||||
playAnim(param1,param2);
|
||||
}
|
||||
|
||||
public function getBaseIdle() : int
|
||||
{
|
||||
return _roomType == 1 ? 32 : 14;
|
||||
|
||||
@@ -777,6 +777,20 @@ package avatar
|
||||
_loc2_ = EmoticonUtility.stringForId(int(_loc2_));
|
||||
break;
|
||||
case 3:
|
||||
// "sja:<anim>,<flip>": an animation that is not one of
|
||||
// the emote-bar actions (any id the client has, 1-255),
|
||||
// sent as an action message by modded clients. The
|
||||
// normal client finds no action for it and drops it.
|
||||
if(_loc2_.indexOf("sja:") == 0)
|
||||
{
|
||||
_loc10_ = _loc2_.substr(4).split(",");
|
||||
_loc12_ = int(_loc10_[0]);
|
||||
if(_loc19_ != gMainFrame.server.userId && _loc12_ > 0 && _loc12_ <= 255 && !MinigameManager.inMinigame() && AvatarManager.avatarViewList[_loc19_])
|
||||
{
|
||||
AvatarManager.avatarViewList[_loc19_].holdIdleAnim(_loc12_,_loc10_[1] == "1");
|
||||
}
|
||||
return;
|
||||
}
|
||||
_loc5_ = _actionMgr.matchActionString(_loc2_);
|
||||
if(_loc5_)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user