Ticket #2460: headquarters.js.patch

File headquarters.js.patch, 652 bytes (added by Teiresias, 10 years ago)

Patch to solve aegis startup problem when no units are present

  • binaries/data/mods/public/simulation/ai/aegis/headquarters.js

     
    287287
    288288    // default template and size
    289289    var template = gameState.applyCiv("units/{civ}_support_female_citizen");
    290     var size = Math.min(5, Math.ceil(numTotal / 10));
     290    var size = Math.min(5, Math.max(Math.ceil(numTotal / 10), 1));
    291291
    292292    // Choose whether we want soldiers instead.
    293293    // TODO: we might want to adjust our female ratio.