Fix undefined access to ai_info of non-robots
Only robots have ctype.ai_info. Skip the sniper special case for objects that are not robots.
This commit is contained in:
parent
118ba7698a
commit
e4afb78124
|
@ -438,6 +438,8 @@ static void draw_polygon_object(const vobjptridx_t obj)
|
|||
alt_textures = multi_player_textures[ati];
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
if (obj->type == OBJ_ROBOT)
|
||||
{
|
||||
// Snipers get bright when they fire.
|
||||
ai_local *ailp = &obj->ctype.ai_info.ail;
|
||||
if (ailp->next_fire < F1_0/8) {
|
||||
|
@ -448,6 +450,7 @@ static void draw_polygon_object(const vobjptridx_t obj)
|
|||
light.b = 2*light.b + F1_0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const auto is_weapon_with_inner_model = (obj->type == OBJ_WEAPON && Weapon_info[get_weapon_id(obj)].model_num_inner > -1);
|
||||
|
|
Loading…
Reference in a new issue