Allow boats flymode to be overridden by local db

This commit is contained in:
Noudess
2021-01-11 10:58:08 -05:00
parent 0f5a7e1317
commit eb24e333d7
2 changed files with 5 additions and 4 deletions
+5
View File
@@ -230,9 +230,14 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
adventure_template_id = npc_type_data->adventure_template;
flymode = iflymode;
// If server has set a flymode in db honor it over all else.
// If server has not set a flymde in db, and this is a boat - force floating.
if (npc_type_data->flymode >= 0) {
flymode = static_cast<GravityBehavior>(npc_type_data->flymode);
}
else if (IsBoat()) {
flymode = GravityBehavior::Floating;
}
guard_anim = eaStanding;
roambox_distance = 0;