diff options
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index 1509b028c..69db0aeab 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -3468,23 +3468,21 @@ void InitializeSpriteSorter() * Scroll players main viewport. * @param flags type of operation * @param tile tile to center viewport on - * @param p1 ViewportScrollTarget of scroll target - * @param p2 company or client id depending on the target - * @param text unused + * @param target ViewportScrollTarget of scroll target + * @param ref company or client id depending on the target * @return the cost of this operation or an error */ -CommandCost CmdScrollViewport(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text) +CommandCost CmdScrollViewport(DoCommandFlag flags, TileIndex tile, ViewportScrollTarget target, uint32 ref) { if (_current_company != OWNER_DEITY) return CMD_ERROR; - ViewportScrollTarget target = (ViewportScrollTarget)p1; switch (target) { case VST_EVERYONE: break; case VST_COMPANY: - if (_local_company != (CompanyID)p2) return CommandCost(); + if (_local_company != (CompanyID)ref) return CommandCost(); break; case VST_CLIENT: - if (_network_own_client_id != (ClientID)p2) return CommandCost(); + if (_network_own_client_id != (ClientID)ref) return CommandCost(); break; default: return CMD_ERROR; |