(svn r23622) -Add: a set of events to trigger in a GameScript

This commit is contained in:
truebrain
2011-12-19 20:59:36 +00:00
parent e7cd301d3c
commit 77b7366c29
15 changed files with 310 additions and 13 deletions

View File

@@ -29,6 +29,7 @@
#include "cheat_type.h"
#include "company_base.h"
#include "ai/ai.hpp"
#include "game/game.hpp"
#include "company_func.h"
#include "effectvehicle_func.h"
#include "station_base.h"
@@ -1160,6 +1161,7 @@ static void CrashAirplane(Aircraft *v)
}
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, st == NULL ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, st == NULL ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
AddVehicleNewsItem(newsitem,
NS_ACCIDENT,
@@ -1225,6 +1227,7 @@ static void AircraftEntersTerminal(Aircraft *v)
st->index
);
AI::NewEvent(v->owner, new ScriptEventStationFirstVehicle(st->index, v->index));
Game::NewEvent(new ScriptEventStationFirstVehicle(st->index, v->index));
}
v->BeginLoading();