View Issue Details

IDProjectCategoryView StatusLast Update
0007194Multi Theft Auto : San AndreasClientpublic2012-07-22 11:11
ReporterLeetWoovieAssigned Toccw 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.3.1Fixed in Version1.3.1 
Summary0007194: processLineOfSight "light" value returns incorrectly
Description

I've been messing with process line of sight and the light value is very odd. I can't get it to return values that make sense. Most of the time it returns 0. From what I've read, it should only return 0 inside Madd Dogg's mansion. You can also take the line and put the starting end inside another player's model, and the value returned will be way different than the one of your player.

Steps To Reproduce

local gx, gy = guiGetScreenSize()
function onRender()
local x, y, z = getElementPosition ( getLocalPlayer() )
hit, hx, hy, hz, he, nx, ny, nz, mat, light = processLineOfSight ( x + 1.5, y, z, x - 1.5, y, z, false, false, true, false )
dxDrawLine3D ( x + 1.5, y , z, x - 1.5, y, z, tocolor( 255, 0, 0, 255 ), 2 )
local white = tocolor ( light, light, light, 255 )
dxDrawText ( light, ( gx - 128 ), ( gy - ( (gy / 2 ) - 100 ) ), gx, gy - ( (gy / 2 ) - 128 ), tocolor ( 255, 255, 255, 255 ), 1, "default", "center", "center", false, false, false )
end
addEventHandler ( "onClientRender", getRootElement(), onRender )

TagsNo tags attached.

Activities

LeetWoovie

2012-07-19 08:47

viewer   ~~0017095

I should have noted that I've only tested this with peds. Other objects may work fine.

Issue History

Date Modified Username Field Change