refined 'AddInfantry' function, simplified for most called cases .

This commit is contained in:
Zero Fanker 2024-12-11 23:43:12 -05:00
parent 602550eb6a
commit 718423eef0
4 changed files with 11 additions and 9 deletions

View file

@ -2350,7 +2350,7 @@ void CUserScriptsDlg::OnOK()
id.flag4 = GetParam(data, 12);
id.flag5 = GetParam(data, 13);
if (Map->AddInfantry(&id, NULL, NULL, NULL, lastInfantryDeleted) == FALSE) {
if (Map->AddInfantry(&id, lastInfantryDeleted, NULL, NULL, NULL) == FALSE) {
report += "AddInfantry failed\r\n";
} else {
report += "Infantry added\r\n";