Skip to content

Commit

Permalink
Move PlayerVentEvent call to applicable RPC's
Browse files Browse the repository at this point in the history
  • Loading branch information
miniduikboot committed Apr 2, 2021
1 parent 7fd68e3 commit 441d9c3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ public override async ValueTask<bool> HandleRpcAsync(ClientPlayer sender, Client
{
case RpcCalls.EnterVent:
Rpc19EnterVent.Deserialize(reader, out ventId);
await _eventManager.CallAsync(new PlayerVentEvent(_game, sender, _playerControl, (VentLocation)ventId, true));
break;

case RpcCalls.ExitVent:
Rpc19EnterVent.Deserialize(reader, out ventId);
await _eventManager.CallAsync(new PlayerVentEvent(_game, sender, _playerControl, (VentLocation)ventId, false));
break;

case RpcCalls.ClimbLadder:
Rpc31ClimbLadder.Deserialize(reader, out byte ladderId, out byte lastClimbLadderSid);
return true;
break;

default:
return await UnregisteredCall(call, sender);
}

await _eventManager.CallAsync(new PlayerVentEvent(_game, sender, _playerControl, (VentLocation)ventId, call == RpcCalls.EnterVent));

return true;
}
}
Expand Down

0 comments on commit 441d9c3

Please sign in to comment.