_Q_ Posted May 8, 2015 Share Posted May 8, 2015 (edited) I have set it up in wormhole marks mod so it would draw the new colored icons over the fog of war, but now it seems to be not working, and the wormhole you jump has the icon set up but it is not refreshing on the mini map until you return to the wormhole. function Wormhole_Marks:Mark() self.inst.MiniMapEntity:SetDrawOverFogOfWar(true) self.marked = true self:GetNumber() self.inst.MiniMapEntity:SetIcon("mark_"..self.wormhole_number..".tex") endIt was placed before and after setting the new icon, the result is the same all the time. The self.inst.MiniMapEntity:SetDrawOverFogOfWar(true) works as it should, its just that mini map just don't refresh on client side. Edited May 8, 2015 by _Q_ Link to comment Share on other sites More sharing options...
Sarcen Posted May 8, 2015 Share Posted May 8, 2015 Well, that kind of makes sense, prefabs are only send to clients if they are near them. So your client doesn't know about the wormhole existence until it gets close. I do not know if it is possible to make a prefab always relevant (if it has a transform) for all clients. But what I did with the global player icons is make a networked object (without a transform, making it always relevant) that stores its position. And a client side spawned dummy object (with transform and no network) that puts the icon on the map, then just disable the icon on the actual wormhole prefab itself. Link to comment Share on other sites More sharing options...
_Q_ Posted May 8, 2015 Author Share Posted May 8, 2015 Well, that kind of makes sense, prefabs are only send to clients if they are near them. So your client doesn't know about the wormhole existence until it gets close. I do not know if it is possible to make a prefab always relevant (if it has a transform) for all clients. But what I did with the global player icons is make a networked object (without a transform, making it always relevant) that stores its position. And a client side spawned dummy object (with transform and no network) that puts the icon on the map, then just disable the icon on the actual wormhole prefab itself. But the player is at the wormhole when the icon change occur.Its the entrance wormhole that don't refresh on mini map on clients, and its strange since it works like it should on server. Link to comment Share on other sites More sharing options...
Sarcen Posted May 8, 2015 Share Posted May 8, 2015 (edited) If that's the case then perhaps the map icon texture isn't networked. Haven't really looked into that. If that's the case you should just network "self.wormhole_number" and make it trigger Mark() on clients, or something similar... I'm still not sure whether or not the client knows all wormholes, I'd expect it doesn't. So It could also be that it IS networked but your client calls mark as well? and without knowledge of the other wormholes I guess the number is always 0 or something? Edited May 8, 2015 by Sarcen Link to comment Share on other sites More sharing options...
_Q_ Posted May 8, 2015 Author Share Posted May 8, 2015 (edited) If that's the case then perhaps the map icon texture isn't networked. Haven't really looked into that. If that's the case you should just network "self.wormhole_number" and make it trigger Mark() on clients, or something similar... I'm still not sure whether or not the client knows all wormholes, I'd expect it doesn't. So It could also be that it IS networked but your client calls mark as well? and without knowledge of the other wormholes I guess the number is always 0 or something?I have custom component to number them, it all works correctly, only the icon don't refresh on client mini map, if you go back to that entrance wormhole as client on foot it will display correctly, so its all working beside the mini map part on clients. Component that sets the icons is not networked, its just plain normal DS component style, maybe I should try and convert it more into DST style. But on the other hand some prefabs still use old DS style components without problems for clients. Edited May 8, 2015 by _Q_ Link to comment Share on other sites More sharing options...
Sarcen Posted May 8, 2015 Share Posted May 8, 2015 Like I said in my first post, Its because the wormhole doesn't exist on the client.The minimap icons that are out of range are cached icons not active prefab icons, those icons are completely unrelated to anything and will always go out of sync. 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