(svn r23360) -Codechange: move AIInstance to ScriptInstance, making it reusable by other script API instances

This commit is contained in:
truebrain
2011-11-29 23:21:33 +00:00
parent 6f874962cd
commit a3768b109b
22 changed files with 918 additions and 811 deletions

View File

@@ -29,7 +29,7 @@
/* static */ ScriptGroup::GroupID ScriptGroup::CreateGroup(ScriptVehicle::VehicleType vehicle_type)
{
if (!ScriptObject::DoCommand(0, (::VehicleType)vehicle_type, 0, CMD_CREATE_GROUP, NULL, &AIInstance::DoCommandReturnGroupID)) return GROUP_INVALID;
if (!ScriptObject::DoCommand(0, (::VehicleType)vehicle_type, 0, CMD_CREATE_GROUP, NULL, &ScriptInstance::DoCommandReturnGroupID)) return GROUP_INVALID;
/* In case of test-mode, we return GroupID 0 */
return (ScriptGroup::GroupID)0;