multitheftauto / amx

MTA AMX compatibility layer.
zlib License
31 stars 8 forks source link

Great fixes, there's an issue though, when entering interiors pickups don't show #45

Closed colistro123 closed 4 years ago

colistro123 commented 4 years ago

In regard to the following commit: https://github.com/multitheftauto/amx/commit/38ea6880d7150ee346079c674005138b8903f7b2

When entering interiors, pickups don't seem to show, they're invisible as in non-existent, I can't even pick them up which should fire OnPlayerPickUpDynamicPickup or so. I believe this is also the same for objects. That's all, thanks.

qaisjp commented 4 years ago

Do pickups in SA-MP appear in every dimension? If so, you can use setElementDimension(pickup, -1)

colistro123 commented 4 years ago

Yeah, I believe this may be a dimension issue, thanks @qaisjp

qaisjp commented 4 years ago

Oh, oops. I mean setElementInterior. No such setElementInterior(Ele, -1) exists btw

theSpool commented 4 years ago

Are pickups in MTA "sensitive" to interiors as well?

setElementDimension with dimension -1 should only works on objects according to the wiki and the code, so that's going to be a problem, and the functionality is not there with . At this rate it might be simpler to implement some stuff entirely clientside, with events being broadcasted to the server.

Does this actually have something to do with #44? This seems this is actually just an issue with the natives itself rather than AMX.

colistro123 commented 4 years ago

I just tested this and to be more precise, I noticed that pickups show on interior id 0, but not on any other interiors. VWs/dimensions don't seem to be a problem though. I think the problem here is that there's no setElementInterior -1 to set it to all interiors perhaps, since the streamer well, obviously destroys and creates pickups to make them 'stream'.

https://github.com/samp-incognito/samp-streamer-plugin/blob/420a601401f25de824594173c923d2856ac1f6cd/src/streamer.cpp#L1124

My point is, maybe MTA shows the pickups on interior 0 by default and not all interiors.

Update: Also found this which has certain calls to GetElementInterior and Dimension: https://github.com/multitheftauto/mtasa-blue/blob/19d089503e3dd868bab51a053738331130718dd8/Client/mods/deathmatch/logic/CClientPickup.cpp#L146

colistro123 commented 4 years ago

Resolved in https://github.com/multitheftauto/amx/commit/a48cd925256b968f742b406a139c506ca8ade464

Thanks to @qaisjp for the workaround idea.