Skip compute_object_light if overridden by bright players
This commit is contained in:
parent
cc80af87e8
commit
4c5d4a36e5
|
@ -362,38 +362,30 @@ static void draw_polygon_object(const vobjptridx_t obj)
|
||||||
engine_glow_value[1] = -1; //element 0 is for engine glow, 1 for headlight
|
engine_glow_value[1] = -1; //element 0 is for engine glow, 1 for headlight
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
light = compute_object_light(obj,nullptr);
|
|
||||||
|
|
||||||
// If option set for bright players in netgame, brighten them!
|
// If option set for bright players in netgame, brighten them!
|
||||||
if ((Game_mode & GM_MULTI) && (obj->type == OBJ_PLAYER))
|
light = unlikely(Netgame.BrightPlayers && (Game_mode & GM_MULTI) && obj->type == OBJ_PLAYER)
|
||||||
if (Netgame.BrightPlayers)
|
? g3s_lrgb{F1_0 * 2, F1_0 * 2, F1_0 * 2}
|
||||||
light.r = light.g = light.b = F1_0*2;
|
: compute_object_light(obj, nullptr);
|
||||||
|
|
||||||
#if defined(DXX_BUILD_DESCENT_II)
|
#if defined(DXX_BUILD_DESCENT_II)
|
||||||
//make robots brighter according to robot glow field
|
//make robots brighter according to robot glow field
|
||||||
if (obj->type == OBJ_ROBOT)
|
if (obj->type == OBJ_ROBOT)
|
||||||
{
|
{
|
||||||
light.r += (Robot_info[get_robot_id(obj)].glow<<12); //convert 4:4 to 16:16
|
const auto glow = Robot_info[get_robot_id(obj)].glow<<12;
|
||||||
light.g += (Robot_info[get_robot_id(obj)].glow<<12); //convert 4:4 to 16:16
|
light.r += glow; //convert 4:4 to 16:16
|
||||||
light.b += (Robot_info[get_robot_id(obj)].glow<<12); //convert 4:4 to 16:16
|
light.g += glow; //convert 4:4 to 16:16
|
||||||
|
light.b += glow; //convert 4:4 to 16:16
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj->type == OBJ_WEAPON)
|
if ((obj->type == OBJ_WEAPON &&
|
||||||
{
|
get_weapon_id(obj) == FLARE_ID) ||
|
||||||
if (get_weapon_id(obj) == FLARE_ID)
|
obj->type == OBJ_MARKER
|
||||||
|
)
|
||||||
{
|
{
|
||||||
light.r += F1_0*2;
|
light.r += F1_0*2;
|
||||||
light.g += F1_0*2;
|
light.g += F1_0*2;
|
||||||
light.b += F1_0*2;
|
light.b += F1_0*2;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (obj->type == OBJ_MARKER)
|
|
||||||
{
|
|
||||||
light.r += F1_0*2;
|
|
||||||
light.g += F1_0*2;
|
|
||||||
light.b += F1_0*2;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
push_interpolation_method imsave(1, Linear_tmap_polygon_objects);
|
push_interpolation_method imsave(1, Linear_tmap_polygon_objects);
|
||||||
|
|
Loading…
Reference in a new issue