diff --git a/src/acs/call-funcs.cpp b/src/acs/call-funcs.cpp index 54fc987bd..6987f65c9 100644 --- a/src/acs/call-funcs.cpp +++ b/src/acs/call-funcs.cpp @@ -1727,6 +1727,7 @@ bool CallFunc_AddBot(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word botStyle_e style = BOT_STYLE_NORMAL; UINT8 newplayernum = 0; + bool success = false; (void)argC; @@ -1751,8 +1752,8 @@ bool CallFunc_AddBot(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word style = BOT_STYLE_NORMAL; } - K_AddBot(skin, difficulty, style, &newplayernum); - thread->dataStk.push(newplayernum); + success = K_AddBot(skin, difficulty, style, &newplayernum); + thread->dataStk.push(success ? newplayernum : -1); return false; }