Skip to content

Commit

Permalink
Remove parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurtron committed Dec 24, 2024
1 parent 5d5657e commit 65ac9d5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rts/Lua/LuaUnsyncedCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2187,7 +2187,6 @@ int LuaUnsyncedCtrl::SetUnitNoMinimap(lua_State* L)
* @function Spring.SetUnitNoSelect
* @number unitID
* @bool unitNoSelect whether unit can be selected or not
* @bool [opt]doGroups also remove from groups
* @treturn nil
*/
int LuaUnsyncedCtrl::SetUnitNoSelect(lua_State* L)
Expand All @@ -2207,12 +2206,9 @@ int LuaUnsyncedCtrl::SetUnitNoSelect(lua_State* L)
selectedUnitsHandler.RemoveUnit(unit);
}

// also remove from groups if requested
bool doGroups = luaL_optboolean(L, 3, false);
if (doGroups)
unit->SetGroup(nullptr);
// also remove from selection group
unit->SetGroup(nullptr);
}

return 0;
}

Expand Down

0 comments on commit 65ac9d5

Please sign in to comment.