Make sure some mods are loaded last

This commit is contained in:
Björn Dahlgren 2014-06-29 13:13:13 +02:00
parent bbb9e0a57b
commit 7e18315fdc

View File

@ -23,7 +23,18 @@ Server.prototype.armaServerPath = function() {
};
Server.prototype.makeModsParameter = function() {
return '-mod=' + this.mods.join(';');
var mods = this.mods;
["@a3mp", "@a3mp_ap", "@agm"].forEach(function (modToMoveLast) {
if (mods.indexOf(modToMoveLast) > -1) {
mods = mods.filter(function (mod) {
return mod != modToMoveLast;
});
mods.push(modToMoveLast);
}
});
return '-mod=' + mods.join(';');
};
Server.prototype.makePortParameter = function() {