forked from rosebudai/OpenRCT2-Web
This commit is contained in:
1 parent
8492d408de
commit
fcd16cb00a
6 files changed
+24
-1
No files matched your search
@@ -29,6 +29,7 @@
|
||||
#include <openrct2/audio/Audio.h>
|
||||
#include <openrct2/core/FlagHolder.hpp>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/network/NetworkAction.h>
|
||||
#include <openrct2/object/FootpathObject.h>
|
||||
#include <openrct2/object/FootpathRailingsObject.h>
|
||||
#include <openrct2/object/FootpathSurfaceObject.h>
|
||||
@@ -532,6 +533,18 @@ namespace OpenRCT2::Ui::Windows
|
||||
? WidgetType::imgBtn
|
||||
: WidgetType::empty;
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
bool canDrag = true;
|
||||
if (Network::GetMode() == Network::Mode::client)
|
||||
{
|
||||
canDrag = Network::CanPerformAction(Network::GetCurrentPlayerGroupIndex(), Network::Permission::dragPathArea);
|
||||
}
|
||||
if (canDrag)
|
||||
disabledWidgets &= ~(1uLL << WIDX_CONSTRUCT_DRAG_AREA);
|
||||
else
|
||||
disabledWidgets |= (1uLL << WIDX_CONSTRUCT_DRAG_AREA);
|
||||
#endif
|
||||
|
||||
if (gFootpathSelection.LegacyPath == kObjectEntryIndexNull)
|
||||
{
|
||||
widgets[WIDX_RAILINGS_TYPE].type = WidgetType::flatBtn;
|
||||
|
||||
Reference in new issue
Block a user