# HG changeset patch # User Wuzzy # Date 1547085001 -3600 # Node ID 181509fe1ae8e68d3eb700f62373587857bf3fce # Parent 65780bd056c1e73cdd7c8041c14cd90dd5f06046 Fix player team ignoring custom team control scheme in campaign/missions diff -r 65780bd056c1 -r 181509fe1ae8 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Thu Jan 10 00:41:31 2019 +0100 +++ b/hedgewars/uScript.pas Thu Jan 10 02:50:01 2019 +0100 @@ -2347,7 +2347,7 @@ ParseCommand('fort ' + MissionTeam^.FortName, true, true); ParseCommand('voicepack ' + MissionTeam^.Voicepack^.name, true, true); ParseCommand('flag ' + MissionTeam^.Flag, true, true); - CurrentTeam^.Binds:= DefaultBinds; + CurrentTeam^.Binds:= MissionTeam^.Binds; // push real team name and team index lua_pushstring(L, str2pchar(CurrentTeam^.TeamName)); lua_pushnumber(L, TeamsCount - 1); diff -r 65780bd056c1 -r 181509fe1ae8 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Thu Jan 10 00:41:31 2019 +0100 +++ b/hedgewars/uTeams.pas Thu Jan 10 02:50:01 2019 +0100 @@ -484,6 +484,7 @@ if checkFails(team <> nil, 'AddTeam: team = nil', true) then exit(nil); FillChar(team^, sizeof(TTeam), 0); team^.HedgehogsNumber:= 0; +team^.Binds:= DefaultBinds; CurrentTeam:= team; MissionTeam:= team; @@ -872,6 +873,7 @@ begin CurrentTeam^.TeamName:= ts; CurrentTeam^.PlayerHash:= s; + loadTeamBinds(ts); CurrentTeam^.voicepack:= AskForVoicepack('Default') end end