Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Display all 10 user flares in multiplayer. #2729

Merged
merged 6 commits into from
Apr 7, 2021

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Apr 6, 2021

Continued from #2690
image
Testing vehicle:
netflare-agoras.zip

goes by hand with RigsOfRods/ror-server#109

closes #2664

tritonas00 and others added 4 commits April 5, 2021 20:00
The 'u' flares code was simplified and made similar to code for other flare types.

Control numbers clamped to range 1-10, see short explanation RigsOfRods#2551 (comment) or detailed explanation: RigsOfRods#2664 (comment)

CODECHANGES:
* m_custom_light_toggle_countdown removed, using classic `getEventBoolValueBounce()` - same effect, same delay
* disabled `controltoggle_status` in individual flares - replaced by `m_custom_lights`

fixes RigsOfRods#2664
see also #32
@ohlidalp ohlidalp requested a review from tritonas00 April 7, 2021 10:46
@ohlidalp ohlidalp marked this pull request as ready for review April 7, 2021 10:46
@ohlidalp ohlidalp requested a review from Zentro April 7, 2021 10:57
@tritonas00
Copy link
Collaborator

tritonas00 commented Apr 7, 2021

Now tatra custom lights don't open at all, and log spams:

AngelScript: invalid custom-light ID -1, allowed range is 0-9

--> #2551 (comment)

https://forum.rigsofrods.org/resources/tatra-t813-dakar.145/
ctrl 1 2 3 control the custom lights (master branch):
kk

@ohlidalp
Copy link
Member Author

ohlidalp commented Apr 7, 2021

@tritonas00 I can't reproduce it. Flares seem to work perfectly. I have a freshly downloaded tatra ZIP from your link.
image

@WillyB1337
Copy link
Collaborator

WillyB1337 commented Apr 7, 2021

Have you pushed this update @only-a-ptr?
ohlidalp@9e5ef23
There's no commit of that yet.

@tritonas00
Copy link
Collaborator

tritonas00 commented Apr 7, 2021

Found the issue:

I had
kk
It works with
kk

It should work in single player, with the first option though, like master branch

Network works fine:
kk

👍

@Zentro
Copy link
Member

Zentro commented Apr 7, 2021

image

Works as expected here.

@ohlidalp ohlidalp merged commit 48c0bf5 into RigsOfRods:master Apr 7, 2021
@ohlidalp ohlidalp deleted the net-flares branch April 7, 2021 18:24
@tritonas00
Copy link
Collaborator

Eeeh

kk

produces the

AngelScript: invalid custom-light ID -1, allowed range is 0-9

Master didn't had that issue, It was a bug in master?

@ohlidalp
Copy link
Member Author

ohlidalp commented Apr 7, 2021

With what vehicle? Open the .truck and paste the flares here please. Meanwhile I'll test it.

@tritonas00
Copy link
Collaborator

With the tatra

flares2
;RefNode,X,Y,OffsetX, OffsetY, OffsetZ, Type, ControlNumber, BlinkDelay, size MaterialName
;front
 201, 202, 206, 0.300, 0.179, 1.250, u,  1, 0, 1.5 t813_flare_brights/SOLID/TEX/t813_brights.png
 201, 202, 206, 0.300, 0.200, 0.750, f, -1, 0, 2.9 t813_flare_poslight/SOLID/TEX/t813_poslight.png
 201, 202, 206, 0.665, 0.169, 1.450, u,  2, 0, 2.0 t813_flare_brights/SOLID/TEX/t813_brights.png

 204, 205, 209, 0.333, 0.169, 1.450, u,  2, 0, 2.0 t813_flare_brights/SOLID/TEX/t813_brights.png
 204, 205, 209, 0.700, 0.209, 0.750, f, -1, 0, 2.9 t813_flare_poslight/SOLID/TEX/t813_poslight.png
 204, 205, 209, 0.700, 0.179, 1.250, u,  1, 0, 1.5 t813_flare_brights/SOLID/TEX/t813_brights.png

 123, 124, 134, 0.057, 0.000, 2.750, u,  3, 0, 2.2 t813_flare_brights/SOLID/TEX/t813_brights.png
 125, 127, 135, 0.974, 0.000, 2.750, u,  3, 0, 2.2 t813_flare_brights/SOLID/TEX/t813_brights.png
;rear
 229, 228, 224, 0.759, 0.660, 0.020, b, -1, 0, 1.5 t813_brakelights.png/SOLID/TEX/t813_brakelights.png
 233, 232, 227, 0.241, 0.660, 0.020, b, -1, 0, 1.5 t813_brakelights.png/SOLID/TEX/t813_brakelights.png

 233, 232, 227, 0.714,-1.493, 0.000, u,  4, 0, 3   t813_brakelights.png/SOLID/TEX/t813_brakelights.png

 233, 232, 227, 0.586, 1.720, 1.520, R, -1, 0, 1.5 t813_flare_brights/SOLID/TEX/t813_brights.png

 129, 130, 125, 1.000, 0.000, 0.000, l, -1,-1,-1 tracks/trans
 128, 129, 123, 0.000, 0.000, 0.000, r, -1,-1,-1 tracks/trans

@ohlidalp
Copy link
Member Author

ohlidalp commented Apr 7, 2021

You're right, reproduced.

To explain: with "Lights" set to "only cur. vehicle main lights", the spawner left the controlnumber on default value -1. My new simplified code uses that value to update flare states by calling getCustomLightVisible(). The confusing bit is that the "Lights" setting only affects light sources (environment illumination), not the visible flares.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to see user controlled flares in multiplayer
4 participants