Conversation
Co-Authored-By: commy2 <commy-2@gmx.de>
commy2
left a comment
There was a problem hiding this comment.
Tested and works in local hosted MP.
|
When does |
|
It only happens in SP, MP never returns 0 I believe. Addendum: Driver and non-existent turrets also return 0. And since the driver is the vehicle owner, |
|
In my testing it worked as expected, running on the owner of the vehicle when the turret was not crewed, despite this code block being bugged. I didn't test much with the driver turret [-1] though. I suppose this would benefit from a MP unit test script. |
|
Got to test this with one other player in local hosted MP, results were as expected. Tested it with a modified version of ZEN that uses the turret event to set the ammo on a vehicle. He placed a vehicle in Zeus, and I adjusted the ammo slider. These are the results I got:
These are the results that I expected. |
|
A change after I approved lies in how it handles non existing turrets I believe. What would the expected behavior be for non existing turrets? Before I approved the event would trigger nowhere. Now I think it falls back to vehicle locality, but I haven't tested. |
|
I think a silent fail would be a good solution, I'll work on implementing it. |
Co-Authored-By: jonpas <jonpas33@gmail.com>
When merged this pull request will:
Still a bit unsure whether TUEVENT is a good choice, but I couldn't think of something else.