Author Message

amilmand

00
Posts: 259

Location: ---
Occupation:
Age:
V$:
#151506   2018-11-21 08:21          
Maybe, crash it with this: LINK
And tell me the faulting module(it should be d3d9.dll if its the slrr_gi.exe we may manage) and offset (if windows doesnt tell you off the bat in the error message try: LINK)

RedCarDriver:
I was afraid it was going to be impossible to read the car's flags well enough to tell whether or not the headlights (or indicators, etc) are on
I missed this somehow well this is not entirely true you can check for whether the car thinks its night time (this is the same flag that gets checked by the lights) and check for the rpm if its >0 if so the lights are most probably on, there is also a flag for the indicators (but of course for that to actually get flipped the cruse mode needs to be on) and all this is read only as the game overwrites changes.
Code would look along the lines:
int flags = RawEdit.getI(GameLogic.player.car.chassis.getIndexedAddr(Chassis.IndexedData_Flags));
float rpm = GameLogic.player.car.chassis.getIndexedData(Chassis.IndexedData_RPM);
if((flags & 0x8) != 0 && rpm > 1)
{
  //lights are most probably on
}
if((flags & 0x10000) != 0)
{
  //left indicator blinking (mind you this is true for the whole time its in the blinking state not just when its actually lit)
}
if((flags & 0x20000) != 0)
{
  /right indicator
}

But really you dont even need this, you can check for the steering with
getIndexedData(Chassis.IndexedData_CurrentSteering1) (the game does the same for the built in method)
for the indicators, (even enforce them when cruise mode is inactive).
And the current game time also can be acquired (the game checks for (currentTime < 75600 && currentTime >= 21600)) along with the rpm.
(and again the whole shabang for brake lights, IndexedData_BreakStrength, or clucth lights (if that is a thing) IndexedData_ClutchStrength ooor nitro lights IndexedData_NitroStrength and alot others)