justalemon/SimplePassive

Emissives can be seen through vehicles

Yufai opened this issue · 6 comments

Yufai commented

Any emissive such as lights or any markers can be seen through the vehicle. I tried set simplepassive_alpha 255, but it doesn't appear to have an effect.

Screenshot (183)
Screenshot (184)
Screenshot (185)

Does this happens with SimplePassive disabled?

Yufai commented

Screenshot (203)
Screenshot (204)

No it does not

// Set the alpha of the player vehicle to maximum if is present
if (Game.Player.Character.CurrentVehicle != null)
{
API.SetEntityAlpha(Game.Player.Character.CurrentVehicle.Handle, 255, 0);
}

Rather than setting the alpha to 255, you could use RESET_ENTITY_ALPHA. Resetting the alpha does resolve the problem.

A convar to disable the alpha effect entirely would be appreciated aswell though.

I'm going to try to use RESET_ENTITY_ALPHA and see what happens.

I'm also going to add a convar that completely disables the alpha changes, so the alpha of the entities will not be changed.

ec71028 uses RESET_ENTITY_ALPHA instead of SET_ENTITY_ALPHA to set the visibility of the entities to the maximum.

Can you see if this fixes your problem? You can download a test build from https://ci.appveyor.com/project/justalemon/simplepassive/builds/33188713/artifacts.

The 6 lights on the center would be visible thru entities.

emmissive

That is no longer the case:

tow

(Sorry about the low quality pics, my PC is trash)