ericw-tools icon indicating copy to clipboard operation
ericw-tools copied to clipboard

Invalid spotlight on models with _phong 1

Open danpla opened this issue 8 years ago • 4 comments

tyrutils-ericw v0.15.10 on Linux x64

Here is a screenshot: spasm0000

It's a func_detail entity containing a cuboid with a "rounded" side and _phong 1.

An example map from the screenshot:

// Game: Quake
// Format: Standard
// entity 0
{
"classname" "worldspawn"
"wad" "Q.wad"
"light" "20"
// brush 0
{
( 192 192 -32 ) ( 192 192 -64 ) ( 192 -192 -64 ) wmet3_3 -0 -0 -0 1 1
( -192 192 -32 ) ( -192 -192 -32 ) ( -192 -192 -64 ) wmet3_3 -0 -0 -0 1 1
( -192 192 -64 ) ( 192 192 -64 ) ( 192 192 -32 ) wmet3_3 -0 -0 -0 1 1
( -192 -192 -64 ) ( -192 -192 -32 ) ( 192 -192 -32 ) wmet3_3 -0 -0 -0 1 1
( 192 -192 -32 ) ( -192 -192 -32 ) ( -192 192 -32 ) wmet3_3 -0 -0 -0 1 1
( 192 -192 -64 ) ( 192 192 -64 ) ( -192 192 -64 ) wmet3_3 -0 -0 -0 1 1
}
// brush 1
{
( 192 192 384 ) ( 192 192 352 ) ( 192 -192 352 ) wmet3_3 -0 -0 -0 1 1
( -192 192 384 ) ( -192 -192 384 ) ( -192 -192 352 ) wmet3_3 -0 -0 -0 1 1
( -192 192 352 ) ( 192 192 352 ) ( 192 192 384 ) wmet3_3 -0 -0 -0 1 1
( -192 -192 352 ) ( -192 -192 384 ) ( 192 -192 384 ) wmet3_3 -0 -0 -0 1 1
( 192 -192 384 ) ( -192 -192 384 ) ( -192 192 384 ) wmet3_3 -0 -0 -0 1 1
( 192 -192 352 ) ( 192 192 352 ) ( -192 192 352 ) wmet3_3 -0 -0 -0 1 1
}
// brush 2
{
( 224 -192 352 ) ( 224 192 352 ) ( 224 192 -32 ) wmet3_3 -0 0 90 1 -1
( 192 -192 352 ) ( 192 -192 -32 ) ( 192 192 -32 ) wmet3_3 -0 0 90 1 -1
( 224 192 -32 ) ( 224 192 352 ) ( 192 192 352 ) wmet3_3 -0 -0 90 1 1
( 224 -192 -32 ) ( 192 -192 -32 ) ( 192 -192 352 ) wmet3_3 -0 -0 90 1 1
( 192 192 352 ) ( 224 192 352 ) ( 224 -192 352 ) wmet3_3 -0 -0 90 1 1
( 192 192 -32 ) ( 192 -192 -32 ) ( 224 -192 -32 ) wmet3_3 -0 -0 90 1 1
}
// brush 3
{
( -192 -192 352 ) ( -192 192 352 ) ( -192 192 -32 ) wmet3_3 -0 -0 90 1 -1
( -224 -192 352 ) ( -224 -192 -32 ) ( -224 192 -32 ) wmet3_3 -0 -0 90 1 -1
( -192 192 -32 ) ( -192 192 352 ) ( -224 192 352 ) wmet3_3 0.999985 0 90 1 1
( -192 -192 -32 ) ( -224 -192 -32 ) ( -224 -192 352 ) wmet3_3 0.999985 0 90 1 1
( -224 192 352 ) ( -192 192 352 ) ( -192 -192 352 ) wmet3_3 -0 -0 90 1 1
( -224 192 -32 ) ( -224 -192 -32 ) ( -192 -192 -32 ) wmet3_3 -0 -0 90 1 1
}
// brush 4
{
( 192 192 -32 ) ( 192 192 352 ) ( 192 224 352 ) wmet3_3 -0 -0 89.9999 1 -1
( -192 192 -32 ) ( -192 224 -32 ) ( -192 224 352 ) wmet3_3 -0 -0 89.9999 1 -1
( -192 224 352 ) ( -192 224 -32 ) ( 192 224 -32 ) wmet3_3 -0 -0 90 1 -1
( -192 192 352 ) ( 192 192 352 ) ( 192 192 -32 ) wmet3_3 -0 -0 90 1 -1
( 192 224 352 ) ( 192 192 352 ) ( -192 192 352 ) wmet3_3 -0 -0 -0 1 1
( 192 224 -32 ) ( -192 224 -32 ) ( -192 192 -32 ) wmet3_3 -0 -0 -0 1 1
}
// brush 5
{
( 192 -224 -32 ) ( 192 -224 352 ) ( 192 -192 352 ) wmet3_3 -0 -0 89.9999 1 -1
( -192 -224 -32 ) ( -192 -192 -32 ) ( -192 -192 352 ) wmet3_3 -0 -0 89.9999 1 -1
( -192 -192 352 ) ( -192 -192 -32 ) ( 192 -192 -32 ) wmet3_3 -0 -0.999992 90 1 -1
( -192 -224 352 ) ( 192 -224 352 ) ( 192 -224 -32 ) wmet3_3 -0 -0.999992 90 1 -1
( 192 -192 352 ) ( 192 -224 352 ) ( -192 -224 352 ) wmet3_3 -0 -0 -0 1 1
( 192 -192 -32 ) ( -192 -192 -32 ) ( -192 -224 -32 ) wmet3_3 -0 -0 -0 1 1
}
}
// entity 1
{
"classname" "info_null"
"origin" "56 -8 88"
"angle" "-0"
"targetname" "light_point"
}
// entity 2
{
"classname" "light"
"origin" "56 -8 104"
"angle" "90"
"target" "light_point"
"delay" "2"
"light" "500"
}
// entity 3
{
"classname" "info_player_start"
"origin" "-112 -16 -8"
"angle" "-0"
}
// entity 4
{
"classname" "light"
"origin" "104 -8 104"
"angle" "-0"
"light" "500"
}
// entity 5
{
"classname" "func_detail"
"_phong" "1"
// brush 0
{
( 92 124 112 ) ( 80 128 112 ) ( 80 128 -32 ) wmet3_3 -0 -48 -0 1 1
( 96 112 -32 ) ( 96 112 112 ) ( 92 124 112 ) wmet3_3 -16 -48 -0 1 1
( 96 -128 112 ) ( 96 112 112 ) ( 96 112 -32 ) wmet3_3 -16 -48 -0 1 1
( 68 124 -32 ) ( 68 124 112 ) ( 64 112 112 ) wmet3_3 -16 -48 -0 1 1
( 80 128 -32 ) ( 80 128 112 ) ( 68 124 112 ) wmet3_3 -0 -48 -0 1 1
( 64 -128 -32 ) ( 64 112 -32 ) ( 64 112 112 ) wmet3_3 -16 -48 -0 1 1
( 96 -128 112 ) ( 96 -128 -32 ) ( 64 -128 -32 ) wmet3_3 -0 -48 -0 1 1
( 92 124 112 ) ( 96 112 112 ) ( 96 -128 112 ) wmet3_3 -0 16 -0 1 1
( 96 -128 -32 ) ( 96 112 -32 ) ( 92 124 -32 ) wmet3_3 -0 16 -0 1 1
}
}

danpla avatar Sep 09 '17 16:09 danpla

Thanks for the report. It seems this bug was introduced in 53743ddf0e7100aaf6ceb90a54e2980bd5661dd3 , although I am confused by that.

f54abd9a2c705daf17eae5efe4954e7d4d9c6d12: spasm0002 spasm0003 spasm0006

53743ddf0e7100aaf6ceb90a54e2980bd5661dd3: spasm0005 spasm0004 spasm0007

ericwa avatar Sep 16 '17 19:09 ericwa

Ok - should be fixed by 26c5f65f4eb97ba5730443002196ec0a4aed8941

ericwa avatar Sep 16 '17 23:09 ericwa

Thanks!

danpla avatar Sep 17 '17 09:09 danpla

Unfortunately had to revert this patch because it caused another issue: https://github.com/ericwa/tyrutils-ericw/issues/181

ericwa avatar Oct 01 '17 04:10 ericwa