The AIVehicle spec controls when the AI turns on and off its lights. These values are hardcoded to 6 and 19: turn on at 7PM and off at 6AM.
This however is not always correct: there are g_currentMission.environment.nightStart and g_currentMission.environment.nightEnd that hold the values for the actual mission.
For example, in Seasons, we updated these values. These values are used to determine if the street lights need to be turned on.
I suggest to change
Code: Select all
local needLights = (dayMinutes > (19*60) or dayMinutes < (6*60));
Code: Select all
local needLights = (dayMinutes > g_currentMission.environment.nightStart or dayMinutes < g_currentMission.environment.nightEnd)
See https://gdn.giants-software.com/documen ... pdate46152
- PC/Mac/PS4/XB1: All
- Vehicle/Tool/Model/Object: Any AI
- Issue: AI lights do not adhere to builtin values but are statically coded
- Single- or Multiplayer: Both
- Steps to reproduce: Make a mod that changes the configuration of nightEnd/nightStart, and AI does not comply (e.g., use Seasons).