mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-25 12:58:06 -08:00
Update Otomo Entity when Swapping Otomos
This commit is contained in:
@@ -232,7 +232,7 @@ function this.update_my_otomos()
|
|||||||
|
|
||||||
local myself_id = players.myself.id;
|
local myself_id = players.myself.id;
|
||||||
local otomo = this.otomo_list[myself_id];
|
local otomo = this.otomo_list[myself_id];
|
||||||
if otomo == nil then
|
if otomo == nil or name ~= otomo.name then
|
||||||
otomo = this.new(0, name, level, players.types.my_otomo);
|
otomo = this.new(0, name, level, players.types.my_otomo);
|
||||||
this.otomo_list[myself_id] = otomo;
|
this.otomo_list[myself_id] = otomo;
|
||||||
end
|
end
|
||||||
@@ -255,7 +255,7 @@ function this.update_my_otomos()
|
|||||||
-- the secondary otomo is actually the 4th one!
|
-- the secondary otomo is actually the 4th one!
|
||||||
local otomo = this.otomo_list[this.my_second_otomo_id];
|
local otomo = this.otomo_list[this.my_second_otomo_id];
|
||||||
|
|
||||||
if otomo == nil then
|
if otomo == nil or name ~= otomo.name then
|
||||||
otomo = this.new(this.my_second_otomo_id, name, level, players.types.my_otomo);
|
otomo = this.new(this.my_second_otomo_id, name, level, players.types.my_otomo);
|
||||||
this.otomo_list[this.my_second_otomo_id] = otomo;
|
this.otomo_list[this.my_second_otomo_id] = otomo;
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user