lakhnish Posted August 10, 2018 Share Posted August 10, 2018 I added the component moisture to mobs so that they have a wetness meter. While I don't notice performance issues unless it hits about 200+ mobs, other users may not have as beefy a cpu as me. I've tried reading and understanding moisture.lua, but I don't see what part of it is causing lag when lots of mobs gain that component. In base-game, only players and Dragonfly have inst:AddComponent("moisture"). I noticed that there was a moisture_replica.lua, which imo leads me to believe that the developers were aware of this issue and that was there workaround for mobs to get wet when it rains. I don't have a reason to believe that my code is the issue since it is just simply two separate for loops, one that checks what mobs the user wants enabled, the other to do inst:AddComponent("moisture") to mobs, though if there is something that I don't know, I'd appreciate it. Attached is modmain.lua, modinfo.lua, moisture.lua, and moisture_replica.lua modinfo.lua modmain.lua moisture.lua moisture_replica.lua 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