src/misc_cmd.cpp
branchNewGRF_ports
changeset 6871 5a9dc001e1ad
parent 6870 ca3fd1fbe311
child 6872 1c4a4a609f85
equal deleted inserted replaced
6870:ca3fd1fbe311 6871:5a9dc001e1ad
   111 				break;
   111 				break;
   112 
   112 
   113 			default:
   113 			default:
   114 				break;
   114 				break;
   115 		}
   115 		}
       
   116 		ResetVehicleColorMap();
   116 		MarkWholeScreenDirty();
   117 		MarkWholeScreenDirty();
   117 	}
   118 	}
   118 	return CommandCost();
   119 	return CommandCost();
   119 }
   120 }
   120 
   121 
   378 {
   379 {
   379 	if (p1 != (uint32)-1L && ((int32)p1 >= GAME_DIFFICULTY_NUM || (int32)p1 < 0)) return CMD_ERROR;
   380 	if (p1 != (uint32)-1L && ((int32)p1 >= GAME_DIFFICULTY_NUM || (int32)p1 < 0)) return CMD_ERROR;
   380 
   381 
   381 	if (flags & DC_EXEC) {
   382 	if (flags & DC_EXEC) {
   382 		if (p1 != (uint32)-1L) {
   383 		if (p1 != (uint32)-1L) {
   383 			((int*)&_opt_ptr->diff)[p1] = p2;
   384 			((GDType*)&_opt_ptr->diff)[p1] = p2;
   384 			_opt_ptr->diff_level = 3; // custom difficulty level
   385 			_opt_ptr->diff_level = 3; // custom difficulty level
   385 		} else {
   386 		} else {
   386 			_opt_ptr->diff_level = p2;
   387 			_opt_ptr->diff_level = p2;
   387 		}
   388 		}
   388 
   389