-
-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instant Teleporter Option & Performance to AutoFuel #752
base: development
Are you sure you want to change the base?
Instant Teleporter Option & Performance to AutoFuel #752
Conversation
…ange teleporters, otherwise it will take whatever time it takes to load into the area but it will remove the hardcoded 8 second minimum load time.
@IFoundTheLight I'm actually not using V+ anymore, sorry |
IMHO, you should probably ping the maintainers. I'm just an observer. |
Trying to apply a change for fixing lag and auto fuel.
Updated Image and Player teleport Disable 8 Second Timer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR!
This looks pretty good, only a small thing to change.
Another important part, revert the change on the Valheim Plus logo, it shouldn't be altered in any way.
You can credit yourself by adding your name to the Credits in the README.md
file.
if (threshold > 0 && InventoryAssistant.GetItemAmountInItemList(InventoryAssistant.GetNearbyChestItemsByContainerList(nearbyChests), itemConversion.m_to.m_itemData) >= threshold) return; | ||
} | ||
if (threshold > 0 && InventoryAssistant.GetItemAmountInItemList( | ||
InventoryAssistant.GetNearbyChestItems(__instance.gameObject, autoFuelRange, !ignorePrivateAreaCheck), itemConversion.m_to.m_itemData) >= threshold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should move the InventoryAssistant.GetNearbyChestItems
call out of the foreach loop to avoid calling multiple time this function.
This function calls InventoryAssistant.GetNearbyChests
which uses Physics.OverlapSphere
. This is a function that has an heavy impact on performance and should only be run once for a given __instance.gameObject
.
Added the teleporter shortener to https://github.com/Grantapher/ValheimPlus/releases/tag/0.9.9.15-alpha6 |
This should allow the users to enable instant teleporting for short range teleporters, otherwise it will take whatever time it takes to load into the area but it will remove the hardcoded 8 second minimum load time.