multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.38k stars 424 forks source link

Allocated vehicles don't reflect lights #2515

Open Inder00 opened 2 years ago

Inder00 commented 2 years ago

Describe the bug

Lights on an allocated vehicles behave in an abnormal/unpredictable manner.

To reproduce

Steps to reproduce the behaviour:

  1. Download PoC zip package
  2. Start script
  3. Type /vltest
  4. Drive thru vehicles with another vehicle with lights on
  5. Have the eyes open PoC: vehlight_test.zip

Expected behaviour

Lights should behave as on the base/replacement vehicle

Screenshots

https://streamable.com/b181di

Version

Server doesn’t matter Latest stable client version 1.5.9-21048

Additional context

Fernando-A-Rocha commented 2 years ago

Tested & confirmed bug on client v1.5.9-release-21048 so this bug has been around for several versions

PlatinMTA commented 2 years ago

Yeah I have also noticed this on my server.

myusernamewo commented 2 years ago

Also a vehicle structure bug.

See the comparison of the normal vehicle with the allocated vehicle: image

Lpsd commented 2 years ago

@stgskr Does this happen with the reproduction resource included in the original post (without changes)?

If not, please open a separate issue with reproducible steps.

pedrohenryz commented 2 years ago

This doesn't just happen on vehicles, but also on maps. When the object is replaced only by engineReplace it will receive the light projection on the ground, but when you map an object it no longer receives the light projections.

In this image, the object was replaced with engineReplaceModel but it was not mapped with the map editor, it remains in the position of the replaced object: https://prnt.sc/26eryp1

Here is an original game object but its position has been changed by the map editor: https://prnt.sc/26es1ar

Here the vehicle is on a copy of the street below that was created with the map editor, the original street below receives the lighting but the street above that was created does not: https://prnt.sc/26es4iu

The vehicle is on an object that was just replaced and on top it has a native object of the game, in this case both receive the projections since none were changed with the map editor: https://prnt.sc/26es6gz

This can happen because when the object is created/moved/modified with the map editor it loses its projection props or because new axes are added to the model in the X/Y case, while the original models only have Z rotation.

lopezloo commented 2 years ago

@svartefekter

This doesn't just happen on vehicles, but also on maps. When the object is replaced only by engineReplace it will receive the light projection on the ground, but when you map an object it no longer receives the light projections.

It's seperate issue. See #450.

Xenius97 commented 2 years ago

Can't reproduce, maybe your models have bad collisions. I've tested multiple times, we're using many requested vehicle models and no problem. Videos: https://streamable.com/0mlpdm https://streamable.com/ur58w3

Xenius97 commented 2 years ago

Also a vehicle structure bug.

See the comparison of the normal vehicle with the allocated vehicle:

This is because by default vehicle spawns without variants, if you update variant it will show like in default game.

Fernando-A-Rocha commented 2 years ago

Also a vehicle structure bug.

See the comparison of the normal vehicle with the allocated vehicle:

This is because by default vehicle spawns without variants, if you update variant it will show like in default game.

Yep I can confirm this. Not a bug. Just NRG variant needs changing.

Xenius97 commented 2 years ago

Tested on FCR-900: https://streamable.com/jh1kl3

Xenius97 commented 2 years ago

Tested light bug @Inder00 with your script but no problems, maybe your model has bad collisions. https://streamable.com/ikovg1