edit src/sim/makefile and remove -DNO_AIRCRASH from DEFINES to enable it
$win.col1.w1.f1.disasters.m add command\
-label {Meltdown}\
-command "UIDisaster $win \"sim MakeMeltdown\" \"have a nuclear meltdown?\""
$win.col1.w1.f1.disasters.m add command\
-label {Meltdown}\
-command "UIDisaster $win \"sim MakeMeltdown\" \"have a nuclear meltdown?\""
+ if {[sim HasAirCrash]} {
+ $win.col1.w1.f1.disasters.m add command\
+ -label {Air Crash}\
+ -command "UIDisaster $win \"sim MakeAirCrash\" \"crash an airplane?\""
+ }
$win.col1.w1.f1.disasters.m add command\
-label {Tornado}\
-command "UIDisaster $win \"sim MakeTornado\" \"spin up a tornado?\""
$win.col1.w1.f1.disasters.m add command\
-label {Tornado}\
-command "UIDisaster $win \"sim MakeTornado\" \"spin up a tornado?\""
#OPTFLAGS = -g
#DEFINES = -DIS_LINUX -DCAM -DNET
#OPTFLAGS = -g
#DEFINES = -DIS_LINUX -DCAM -DNET
+DEFINES = -DIS_LINUX -DNO_AIRCRASH
CFLAGS = $(OPTFLAGS) $(DEFINES)
CFLAGS = $(OPTFLAGS) $(DEFINES)
MakeFlood();
break;
case 4:
MakeFlood();
break;
case 4:
break;
case 5:
MakeTornado();
break;
case 5:
MakeTornado();
SIMCMD_CALL(StopBulldozer)
SIMCMD_CALL(MakeFire)
SIMCMD_CALL(MakeFlood)
SIMCMD_CALL(StopBulldozer)
SIMCMD_CALL(MakeFire)
SIMCMD_CALL(MakeFlood)
+SIMCMD_CALL(MakeAirCrash)
SIMCMD_CALL(MakeTornado)
SIMCMD_CALL(MakeEarthquake)
SIMCMD_CALL(MakeMonster)
SIMCMD_CALL(MakeTornado)
SIMCMD_CALL(MakeEarthquake)
SIMCMD_CALL(MakeMonster)
+int SimCmdHasAirCrash(ARGS)
+{
+ int aircrash = 0;
+
+ if (argc != 2) {
+ return (TCL_ERROR);
+ }
+
+#ifndef NO_AIRCRASH
+ aircrash = 1;
+#endif
+
+ sprintf(interp->result, "%d", aircrash);
+ return (TCL_OK);
+}
+
/************************************************************************/
/************************************************************************/
SIM_CMD(StopBulldozer);
SIM_CMD(MakeFire);
SIM_CMD(MakeFlood);
SIM_CMD(StopBulldozer);
SIM_CMD(MakeFire);
SIM_CMD(MakeFlood);
SIM_CMD(MakeTornado);
SIM_CMD(MakeEarthquake);
SIM_CMD(MakeMonster);
SIM_CMD(MakeTornado);
SIM_CMD(MakeEarthquake);
SIM_CMD(MakeMonster);
SIM_CMD(NeedRest);
SIM_CMD(MultiPlayerMode);
SIM_CMD(SugarMode);
SIM_CMD(NeedRest);
SIM_CMD(MultiPlayerMode);
SIM_CMD(SugarMode);
+MakeAirCrash(void)
+{
+#ifndef NO_AIRCRASH
+ if (GetSprite(AIR) == NULL) {
+ short x, y;
+
+ x = Rand(WORLD_X - 20) + 10;
+ y = Rand(WORLD_Y - 10) + 5;
+
+ GeneratePlane(x, y);
+ }
+
+ ExplodeSprite(GetSprite(AIR));
+#endif
+}
+
+
MakeTornado(void)
{
short x, y;
MakeTornado(void)
{
short x, y;