h4uja2 Posted April 30, 2016 Share Posted April 30, 2016 For example using this mod disables sounds of mobs if you are not the host. Any way to fix this? Here is the code: function AddMap(prefab) table.insert(Assets, Asset("IMAGE", "images/" .. prefab .. ".tex")) table.insert(Assets, Asset("ATLAS", "images/" .. prefab .. ".xml")) AddMinimapAtlas("images/" .. prefab .. ".xml") AddPrefabPostInit(prefab, function(inst) inst.entity:AddMiniMapEntity() inst.MiniMapEntity:SetIcon(prefab .. ".tex") end) end Link to comment Share on other sites More sharing options...
DarkXero Posted May 1, 2016 Share Posted May 1, 2016 12 hours ago, h4uja2 said: For example using this mod disables sounds of mobs if you are not the host. Alright, I took a look. Try out this mod. CompleteYourMapClientOnlyFix.zip Link to comment Share on other sites More sharing options...
h4uja2 Posted May 1, 2016 Author Share Posted May 1, 2016 (edited) Quote Try out this mod. CompleteYourMapClientOnlyFix.zip Thanks, works almost perfectly. Some non-mobs icons now missing. But this works perfectly for mobs, so I've just made two functions: one for mobs and second for non-mobs Edited May 1, 2016 by h4uja2 Link to comment Share on other sites More sharing options...
Muche Posted May 1, 2016 Share Posted May 1, 2016 @DarkXero, do you know why adding a MinimapEntity component to an entity only on client (or only on the server) affects SoundEmitter? Is there some hidden network synchonization issue? Does this apply to other components as well, e.g. Light)? Link to comment Share on other sites More sharing options...
Maris Posted May 1, 2016 Share Posted May 1, 2016 Probably you should check if MiniMapEntity already exists before adding another one. Link to comment Share on other sites More sharing options...
DarkXero Posted May 1, 2016 Share Posted May 1, 2016 2 hours ago, Maris said: Probably you should check if MiniMapEntity already exists before adding another one. Yes, but I tested it with beefalo only. They didn't have sounds. And they don't start with a MiniMapEntity already. 8 hours ago, Muche said: do you know why adding a MinimapEntity component to an entity only on client (or only on the server) affects SoundEmitter? Is there some hidden network synchonization issue? No, and yes. Despite what it looks like, MiniMapEntity has some networking. Make a server, enter it, and input something like: Remote: c_find("multiplayer_portal").MiniMapEntity:SetIcon("glommer.png") You will see that the change propagates to your client minimap. 8 hours ago, Muche said: Does this apply to other components as well, e.g. Light)? Light doesn't have any networking that breaks sounds, as far as I know. Which is why you can have lights on your side, but still get hit by Charlie in the server. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now