The 0 and 1 business is part of it. But it's not uniformly buggered, and the multifarious interconnections between the month variables scattered about through a number of classes make for a headache for me to keep track of as they propagate.
A couple years ago I did obtain a partial fix that was OK for quick missions. But there were remaining issues that needed dealing with in order for the date to be correct in all instances.
Below is the result of a search for "month" among all classes. The crucial classes are:
PlMission.class
EffClouds.class
LandConf.class
Landscape.class
Mission.class
GUIBriefingGeneric.class
And relying on the correct date is Sun.class and Atmosphere.class
Search "month" (78 hits in 10 files)
com\maddox\il2\builder\PlMission.java (31 hits)
Line 1352: gwindowdialogclient.addLabel(new GWindowLabel(gwindowdialogclient, 1.0F, 5F, f - 1.0F, 1.3F, Plugin.i18n("Month"), null));
Line 1353: gwindowdialogclient.addControl(wMonth = new GWindowComboControl(gwindowdialogclient, f, 5F, 5F) {
Line 1358: getMonth();
Line 1379: wMonth.setEditable(false);
Line 1380: wMonth.hideList();
Line 1381: wMonth.list = new ArrayList(Arrays.asList(_monthKey));
Line 1381: wMonth.list = new ArrayList(Arrays.asList(_monthKey));
Line 1451: wMonth.setSelected(month - 1, true, false);
Line 1451: wMonth.setSelected(month - 1, true, false);
Line 1599: public void getMonth()
Line 1601: month = Integer.parseInt(wMonth.getValue());
Line 1601: month = Integer.parseInt(wMonth.getValue());
Line 1602: if(month != Mission.curMonth())
Line 1602: if(month != Mission.curMonth())
Line 1604: Mission.setMonth(month);
Line 1604: Mission.setMonth(month);
Line 1605: World.land().setMonth(month);
Line 1605: World.land().setMonth(month);
Line 1681: GWindowComboControl wMonth;
Line 1828: month = sectfile.get("SEASON", "Month", World.land().config.month, 1, 12);
Line 1828: month = sectfile.get("SEASON", "Month", World.land().config.month, 1, 12);
Line 1828: month = sectfile.get("SEASON", "Month", World.land().config.month, 1, 12);
Line 1830: Mission.setDate(year, month, day);
Line 1831: World.land().setMonth(month);
Line 1831: World.land().setMonth(month);
Line 1909: sectfile.lineAdd(j, "Month", "" + month);
Line 1909: sectfile.lineAdd(j, "Month", "" + month);
Line 2649: month = World.land().config.month;
Line 2649: month = World.land().config.month;
Line 2977: private int month;
Line 2991: private String _monthKey[] = {
com\maddox\il2\engine\Config.java (1 hit)
Line 691: public static final int EXPIRED_MONTH = 11;
com\maddox\il2\engine\EffClouds.java (1 hit)
Line 61: int j = Engine.land().config.month;
com\maddox\il2\engine\LandConf.java (6 hits)
Line 22: month = 6;
Line 28: public int getDefaultMonth(String s)
Line 31: return inifile.get("WORLDPOS", "MONTH", 6);
Line 49: month = inifile.get("WORLDPOS", "MONTH", 6);
Line 49: month = inifile.get("WORLDPOS", "MONTH", 6);
Line 109: public int month;
com\maddox\il2\engine\Landscape.java (11 hits)
Line 43: public void setMonth(int i)
Line 45: month = i;
Line 476: LoadMap(MapName, null, false, month, day);
Line 484: LoadMap(s, ai, flag, config.month, 15);
Line 490: month = i;
Line 505: World.Sun().setAstronomic(config.declin, month, day, World.getTimeofDay(), 0.0F);
Line 507: setAstronomic(config.declin, month, day, World.getTimeofDay(), World.Sun().moonPhase);
Line 531: float f1 = (float)Math.toRadians((config.month * 30 + 15) - 80);
Line 562: sun.setAstronomic(config.declin, month, day, World.getTimeofDay(), f);
Line 563: setAstronomic(config.declin, month, day, World.getTimeofDay(), sun.moonPhase);
Line 799: private int month;
com\maddox\il2\engine\MoonPhase.java (1 hit)
Line 197: private static final double SYN_MONTH = 29.530588680000001D;
com\maddox\il2\fm\AircraftState.java (1 hit)
Line 1789: int j = Mission.curMonth();
com\maddox\il2\fm\Atmosphere.java (12 hits)
Line 61: int i = Engine.land().config.month;
Line 111: i = Mission.curMonth();
Line 294: i = Mission.curMonth();
Line 469: i = Mission.curMonth();
Line 648: i = Mission.curMonth();
Line 835: i = Mission.curMonth();
Line 1018: i = Mission.curMonth();
Line 1197: i = Mission.curMonth();
Line 1384: i = Mission.curMonth();
Line 1574: i = Mission.curMonth();
Line 1720: System.out.println("Month = " + Mission.curMonth() + " , Hour = " + (int)Math.floor(World.getTimeofDay()));
Line 1720: System.out.println("Month = " + Mission.curMonth() + " , Hour = " + (int)Math.floor(World.getTimeofDay()));
com\maddox\il2\game\Mission.java (13 hits)
Line 482: public static int curMonth()
Line 484: return curMonth;
Line 495: curMonth = 0;
Line 999: int i1 = sectfile.get("SEASON", "Month", World.land().config.getDefaultMonth("maps/" + s), 1, 12);
Line 999: int i1 = sectfile.get("SEASON", "Month", World.land().config.getDefaultMonth("maps/" + s), 1, 12);
Line 1101: setMonth(j);
Line 1114: public static void setMonth(int i)
Line 1120: curMonth = i;
Line 3608: int k = curMonth();
Line 3617: int l1 = World.land().config.getDefaultMonth("maps/" + s);
Line 3619: int l = sectfile.get("SEASON", "Month", l1, 1, 12);
Line 3632: int i2 = World.land().config.getDefaultMonth("maps/" + s1);
Line 3673: private static int curMonth = 0;
com\maddox\il2\gui\GUIBriefingGeneric.java (1 hit)
Line 2037: Main.cur().currentMissionFile.lineAdd(i1, "Month", "" + k);