We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Npc constructor does
// vanilla behavior: equip best weapon and set non-zero damage type if(!isPlayer()) invent.autoEquipWeapons(*this);
with
bool Npc::isPlayer() const { return aiPolicy==Npc::ProcessPolicy::Player; }
But npc->setProcessPolicy(...) is only set after the constructor has finished, see
void World::createPlayer(std::string_view cls) { ... npcPlayer = wobj.insertPlayer(std::move(npc),waypoint); npcPlayer->setProcessPolicy(Npc::ProcessPolicy::Player); ... }
So right now all Npcs will not be recognized as player, but this works, because the player has an empty inventory at the beginning of the main games.
The text was updated successfully, but these errors were encountered:
Good find. I proposed a fix in #725.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The Npc constructor does
with
But npc->setProcessPolicy(...) is only set after the constructor has finished, see
So right now all Npcs will not be recognized as player, but this works, because the player has an empty inventory at the beginning of the main games.
The text was updated successfully, but these errors were encountered: