mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
Merge pull request #1180 from noudess/boat
Allow boats flymode to be overridden by local db
This commit is contained in:
commit
ca98ea9872
@ -1197,10 +1197,6 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
|||||||
else
|
else
|
||||||
ns->spawn.flymode = flymode;
|
ns->spawn.flymode = flymode;
|
||||||
|
|
||||||
if(IsBoat()) {
|
|
||||||
ns->spawn.flymode = GravityBehavior::Floating;
|
|
||||||
}
|
|
||||||
|
|
||||||
ns->spawn.lastName[0] = '\0';
|
ns->spawn.lastName[0] = '\0';
|
||||||
|
|
||||||
strn0cpy(ns->spawn.lastName, lastname, sizeof(ns->spawn.lastName));
|
strn0cpy(ns->spawn.lastName, lastname, sizeof(ns->spawn.lastName));
|
||||||
|
|||||||
@ -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;
|
adventure_template_id = npc_type_data->adventure_template;
|
||||||
flymode = iflymode;
|
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) {
|
if (npc_type_data->flymode >= 0) {
|
||||||
flymode = static_cast<GravityBehavior>(npc_type_data->flymode);
|
flymode = static_cast<GravityBehavior>(npc_type_data->flymode);
|
||||||
}
|
}
|
||||||
|
else if (IsBoat()) {
|
||||||
|
flymode = GravityBehavior::Floating;
|
||||||
|
}
|
||||||
|
|
||||||
guard_anim = eaStanding;
|
guard_anim = eaStanding;
|
||||||
roambox_distance = 0;
|
roambox_distance = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user