WARNINGS
THIS IS MY FIRST MOD IT IS VERY LIKELY TO HAVE ERRORS
I didn´t test the mod in multiplayer and I don´t think my code will work in multiplayer.
Description
My mod adds weight to the inventory so if the weight increased the player will be more slow and if the weight decreased it will be more faster.
"Technical Side"
My mod adds a variable (weight) to every localplayer, that is calculated through a diccionary (ItemIdToWeight) where each item ID has a weight. This variable affects to the walk speed, run speed, crouch speed and swim speed by increasing it, if the player has decreased his weight or by deacrising it, if the player increased his weight. This does this through a formula: Max(0, 1 - (PlayerInventoryWeight - DefaultInventoryWeight) / MaxiumInventoryWeight) * SpeedMultiplier * DefaultSpeed
评论
还没有评论。提问、技巧和 bug 反馈都可以写在这里。
有东西不能用?分享你的日志,并把链接粘贴到评论中。
登录后发表评论