micovery / ArmA3_Wasteland.Altis

A3Wasteland is a harsh survival sandbox mission for Arma 3 where two teams and independent players fight for survival. This is a collaboration between GoT, TPG, KoS, 404Games, and others.
GNU Affero General Public License v3.0
3 stars 14 forks source link

Static weapon disassemble #5

Closed codexGW closed 10 years ago

codexGW commented 10 years ago

I had a few static weapons saved and when I disassemble and reassemble them they will disappear from the game after about 30 seconds. They remain in the database and are reloaded after restart. Maybe with all the conflicts with battleye filters and this it would be best just to remove the disassemble action.

micovery commented 10 years ago

There is some code that detects when the weapon is disassembled, and then it automatically re-assembles it again.

See https://github.com/micovery/ArmA3_Wasteland.Altis/blob/Development_main/client/functions/firstSpawn.sqf#L53

However the event handler is not firing. From testing it seems that the event handler is only firing on the machine where the createVehicle command was executed.

This seems like a limitation, or bug with the Arma 3 engine itself. In this case, I believe the createVehicle is happening server side when you buy the static weapon from the gun store ... and thus the event handler never triggers.

micovery commented 10 years ago

I've reported this issue to AgentRev on the main repo ... so that he can decide how to fix this. Though from the looks of it, it appears that there is really no fix. Even if the vehicle was created client-side ... for some reason the event handler only triggers on the machine where createVehicle happened. So ... the reassembly logic would only work for the person who bought the static weapon.

I am closing this issue for now.