Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Maple2.Server.Game.Model.ActorStateComponent;

public partial class MovementState {
private long emoteLimitTick;
private bool dontIdleOnStateEnd;

private void EmoteStateUpdate(long tickCount, long tickDelta) {
if (tickCount >= emoteLimitTick && emoteLimitTick != 0) {
Expand All @@ -23,6 +24,10 @@ public void StateEmoteEvent(string keyName) {

emoteActionTask?.Completed();

if (dontIdleOnStateEnd) {
return;
}

Idle();

break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ protected override void TaskResumed() {

private void Standby(NpcTask task, IActor? target, bool isIdle, string sequence) {
Idle(sequence);
dontIdleOnStateEnd = isIdle;

if (target is null) {
return;
Expand Down
2 changes: 1 addition & 1 deletion Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public override void Update(long tickCount) {

playersListeningToDebug = playersListeningToDebugNow;

if (SendControl) {
if (SendControl && !IsDead) {
SequenceCounter++;
Field.BroadcastNpcControl(this);
SendControl = false;
Expand Down
Loading