-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(extra-natives-rdr3): prevent local entities to be converted to networked objects #3227
base: master
Are you sure you want to change the base?
fix(extra-natives-rdr3): prevent local entities to be converted to networked objects #3227
Conversation
Seems weird to modify this behaviour, it's the same o V. Why not use itemsets or at least implement getgamepool? |
@slashkeyvalue it behaves differently, more detailed explanation in issue #2833 By the way, it was mentioned by PR author, surprised how did you miss it. Especially take a look on this comment: #2833 (comment) |
I see, maybe it makes more sense to override GET_CLOSEST_OBJECT_OF_TYPE and patch it to actually use the "dontNetworkObject" argument? instead of outright disabling the functionality as someone might be already be relying on that for some reason |
This parameter might make sense if it worked properly, but as mentioned in the issue, the object only becomes networked to the host and remains invisible to other players. I highly doubt anyone is relying on this 'broken' behavior. If someone wants to fix this behavior as well, you're more than welcome to do so. However, that would be more like adding a 'feature.' The more important priority here is to address the actual issue, where people use this native function without being aware of its consequences. |
Well, a proper fix would be to use the parameter correctly and not just disable a feature of the native, and you don't need to be rude like this lol. If @DaniGP17 wants to do it, he will, that's all. |
That was the main idea I had but I had some problems reading the parameters of this native |
It's a highly questionable feature that seems more like a bug. If no one is available to fix it, then disabling it would be the better option - that's my point. Though I agree, the ideal solution would be to fix it.
I don't see where I was being rude - I wasn’t trying to force anyone to do something. My point was to support this PR and get it accepted as quickly as possible. |
No one is using this native for that specific reason entities become invisible to other clients after using this native and the network pool still increases, so no worries in breaking compat, those who use it are not aware of this issue hence why this fix is needed the way is made. an example is here #2833 (comment) to allow current behaviour then this issue will need to be fixed to make sense. but since you have natives to register entities as networked I dont think overriding or creating a new native is necessary, specially when fivem has the same native, which for those that do fivem and want to do redm will def confuse them. I think current implementation is needed and is stream lined with gtav. |
maybe @dalekenium-cfx could help u?, he did cools things on RedM |
This native with actual behavior can broken entier net object pool, since it convert every closest object found in networked entity. Workaround is to use ItemSet, but it's not same amount of natives called. For me we don't need to keep current behavior, there is no use case for it. |
It's easy to make a object networked. |
Goal of this PR
Prevent the native
GET_CLOSEST_OBJECT_OF_TYPE
from converting a non-networked object to networked, this causes that when using this native many times it converts unwanted objects to networked and causes the synchronized object pool to fill up quickly.How is this PR achieving the goal
Removing instructions that check if the object is already networked.
This PR applies to the following area(s)
RedM, Natives
Successfully tested on
Game builds: 1491
Platforms: Windows
Checklist
Fixes issues
fixes #2833