Skip to content

Commit

Permalink
Remove player check from tool init for scripts too
Browse files Browse the repository at this point in the history
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@11586 8aca7d54-2c30-db11-9de9-000461428c89
  • Loading branch information
prissi committed Jan 8, 2025
1 parent 0756edf commit cf52784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/simutrans/script/api/api_command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ SQInteger param<call_tool_init>::push(HSQUIRRELVM vm, call_tool_init v)
// must be scenario - set flag
tool->flags |= tool_t::WFL_NO_CHK;
}
#if 0
// sanity check
if (player == NULL) {
return sq_raise_error(vm, "Called tool with player == null");
}
#endif
// check if calling suspendable tools is blocked
if (!v.no_block) {
if (const char* blocker = env_t::networkmode ? sq_get_suspend_blocker(vm) : NULL) {
Expand Down

0 comments on commit cf52784

Please sign in to comment.