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.41k stars 438 forks source link

Objects with alpha below 141 are invisible #425

Open qaisjp opened 6 years ago

qaisjp commented 6 years ago

Describe the bug Devan_LT said:

setElementAlpha on objects with the alpha set to 140 or less will cause the object to be invisible.

To Reproduce Steps to reproduce the behavior:

run o = Object(1337, me.position)
run -- walk out of obj, look at obj
run o.alpha = 140 -- obj now invisible

Expected behavior It should not be invisible.

Additional context TheGTA said:

The problem was that MTA did not adjust render states (ALPHAREF stayed 100). I fixed this alpha issue for vehicles and objects, currently eir fork only, by rewriting RenderEntity.

From https://bugs.mtasa.com/view.php?id=5623

Fernando-A-Rocha commented 2 years ago

Still happens: invisible: crun setElementAlpha(createObject(1336,getElementPosition(localPlayer)), 140) visible transparent: crun setElementAlpha(createObject(1336,getElementPosition(localPlayer)), 141)