Skip to content

Conversation

@TovarischPootis
Copy link
Contributor

The issue is that upon item entity spawn, the entity is always set to watermelon as a default. Then, in ENT:setItem, that code is run again, this time with the proper item model. Most of the time that's fine, however some models have funky physics that dont update, causing the model to stay with the watermelon physics, and not not traceable. Here we just set the correct model right away, avoiding that issue

The issue is that upon item entity spawn, the entity is always set to watermelon as a default. Then, in ENT:setItem, that code is run again, this time with the proper item model. Most of the time that's fine, however some models have funky physics that dont update, causing the model to stay with the watermelon physics, and not not traceable. Here we just set the correct model right away, avoiding that issue

self:PhysicsInit(SOLID_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetModel(model)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are setting the model twice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three times actually

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed

@zoephix zoephix merged commit 1df4cf3 into NutScript:1.2-wip Feb 14, 2021
zoephix added a commit that referenced this pull request Feb 14, 2021
TovarischPootis added a commit that referenced this pull request Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants