Skip foliage creation if client

Hello all! I am trying to modify the engine so the skip the foliage creation if the player is not the host. I use the foliage tool to quickly build trees, but when the map loads, the server converts the foliage trees/rocks to actors so players can harvest them for wood/rocks, and then destroys the foliage instance. As you can understand, loading the foliage in clients is useless, so I thought maybe I can find a workaround. I digged into the engine and found a function called “LoadMap” in FileHelpers.cpp, but I can’t figure out how it works. Any help would be great!

Well that was a bad approach, and I finally found a workaround. If anyone’s interested, I made a simple actor and made an event that replaced foliage with blueprints, so no need to happen in runtime.