public override void onRemove(GameBase obj) { for (int i = 0; i < this["numMountPoints"].AsInt(); i++) { if (obj.getMountNodeObject(i) == 0) { continue; } Player passenger = obj.getMountNodeObject(i).AsString(); //change to csharp ((TurretShapeData)passenger.getDataBlock()).call("doDismount", true.AsString()); } }
public override void onRemove(GameBase obj) { // if there are passengers/driver, kick them out for (int i = 0; i < ((VehicleData) obj.getDataBlock())["numMountPoints"].AsInt(); i++) { if (!((SimObject) obj.getMountNodeObject(i)).isMemberOfClass("Player")) continue; Player passenger = obj.getMountNodeObject(i); if (passenger != "0") { PlayerData passengerdatablock = passenger.getDataBlock(); passengerdatablock.doDismount(passenger); } } }
public override void onRemove(GameBase obj) { // if there are passengers/driver, kick them out for (int i = 0; i < ((VehicleData)obj.getDataBlock())["numMountPoints"].AsInt(); i++) { if (!((SimObject)obj.getMountNodeObject(i)).isMemberOfClass("Player")) { continue; } Player passenger = obj.getMountNodeObject(i); if (passenger != "0") { PlayerData passengerdatablock = passenger.getDataBlock(); passengerdatablock.doDismount(passenger); } } }
public override void onRemove(GameBase obj) { for (int i = 0; i < this["numMountPoints"].AsInt(); i++) { if (obj.getMountNodeObject(i) == 0) continue; Player passenger = obj.getMountNodeObject(i).AsString(); //change to csharp ((TurretShapeData) passenger.getDataBlock()).call("doDismount", true.AsString()); } }