-
-
Notifications
You must be signed in to change notification settings - Fork 630
Closed
Labels
Description
There's a few methods in there which don't use native functions, but access memory to change stuff. One of those is setting a headlight damage status:
void Vehicle::LeftHeadLightBroken::set(bool value) {
unsigned char *const address = reinterpret_cast<unsigned char *>(Native::MemoryAccess::GetAddressOfEntity(Handle));
if (address == nullptr) {
return;
}
const unsigned char mask = 1 << 0;
if (value) {
*(address + 1916) |= mask;
}
else {
*(address + 1916) &= ~mask;
}
}Now, I get the basic gist of it, but how did you discover this specific offset of 1916 bytes(?) to damage the headlights? Is there any other documentation available for what I think is a Vehicle struct? Specifically, I want to find out what damages the wheels such that the suspension lowers.