Add clientside p2m functions to Starfall - #74
Conversation
|
Any reason this hasn't been merged yet? I'd love to be able to use custom materials with p2m. |
It was not addressed by the previous maintainer and we have inherited many of their repositories with limited manpower and knowledge of the code bases. We have generally not addressed prior PRs/issues, preferring to focus on newly submitted ones. I can try my hand at reviewing this though. |
|
I would kindly ask PR authors to resubmit their PRs after verifying that their solutions still work. This specific PR should be fine though. |
LengthenedGradient
left a comment
There was a problem hiding this comment.
Generally seems to work fine. Just fix the e2 functions and it should be good.
| end | ||
| e2function vector entity:p2mGetPos(index) | ||
| if not checkvalid(self, this, nil, index, nil) then | ||
| return {0,0,0} |
There was a problem hiding this comment.
This should be changed to return Vector(0,0,0).
Similarly for the other {0,0,0} in surrounding lines.
Otherwise E2 complains about unpacking issues.
|
On second thought, I am concerned about the possibility of users being able to set what other clients see. Could you make the setters only work for the owner? |
All the functions I'm looking at already check the "entities.setRenderProperty" permission, which clients can freely change or revoke if it is a problem for them for any reason. Is that not enough? |
|
Wait, do you mean "only the SF's owner should be able to modify the settings of any P2M sents on their own client," or do you mean "the SF's owner should only be allowed to modify their own P2M sents, on any client"? |
I wasn't familiar with this permission. If that's what it does, I think that's enough. |
I meant the SF's owner should not be able to change how others view their P2M sents. For instance I could imagine this being used to make your builds appear invisible to certain people but visible to others. |
Adds clientside set/get functions to Starfall for most of the basic p2m operations, and adds shared-realm getters for position and angle for both Starfall and E2.