mirror of https://github.com/OpenTTD/OpenTTD
(svn r1377) -Fix: only a server can rename a town in a MP game
parent
29d2f6ed6c
commit
2af42f48b9
|
@ -8,6 +8,7 @@
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
#include "network.h"
|
||||||
|
|
||||||
static const Widget _town_authority_widgets[] = {
|
static const Widget _town_authority_widgets[] = {
|
||||||
{ WWT_TEXTBTN, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
{ WWT_TEXTBTN, RESIZE_NONE, 13, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
||||||
|
@ -227,6 +228,9 @@ static void TownViewWndProc(Window *w, WindowEvent *e)
|
||||||
|
|
||||||
switch(e->event) {
|
switch(e->event) {
|
||||||
case WE_PAINT:
|
case WE_PAINT:
|
||||||
|
// disable renaming town in network games if you are not the server
|
||||||
|
if (_networking && !_network_server) SETBIT(w->disabled_state, 8);
|
||||||
|
|
||||||
SetDParam(0, t->index);
|
SetDParam(0, t->index);
|
||||||
DrawWindowWidgets(w);
|
DrawWindowWidgets(w);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue