Fix: make script goals work with the whole range of ClientIDs

This commit is contained in:
Rubidium
2023-01-31 16:59:58 +01:00
committed by rubidium42
parent 67e1d1ad89
commit 31869501ee
4 changed files with 6 additions and 6 deletions

View File

@@ -224,9 +224,11 @@ CommandCost CmdSetGoalCompleted(DoCommandFlag flags, GoalID goal, bool completed
* @param text Text of the question.
* @return the cost of this operation or an error
*/
CommandCost CmdGoalQuestion(DoCommandFlag flags, uint16 uniqueid, uint16 target, bool is_client, uint32 button_mask, GoalQuestionType type, const std::string &text)
CommandCost CmdGoalQuestion(DoCommandFlag flags, uint16 uniqueid, uint32 target, bool is_client, uint32 button_mask, GoalQuestionType type, const std::string &text)
{
static_assert(sizeof(uint32) >= sizeof(CompanyID));
CompanyID company = (CompanyID)target;
static_assert(sizeof(uint32) >= sizeof(ClientID));
ClientID client = (ClientID)target;
static_assert(GOAL_QUESTION_BUTTON_COUNT < 29);