Closed UndeadNappist closed 2 years ago
Reached the upper limits of what I know what I'm doing. I know I have to insert
// Decay smashed NPC/unowned vehicles.
for (!((veh->in_veh) || (veh->in_room && ROOM_FLAGGED(veh->in_room, ROOM_GARAGE))) && (VEH_FLAGGED(veh, VFLAG_LOOTWRECK)) ) {
if(GET_VEH_TIMER(veh) < 6) {
GET_VEH_TIMER(veh)++;
} else {
veh->flags.RemoveBit(VFLAG_LOOTWRECK);
extract_veh(veh);
}
}
somewhere into a loop for vehicles, but I have no idea where that goes.
Doesn't want to read the new var out of veh_data either.
I have no idea where or how to call the process_vehicle_decay() without crashing everything. Logic is based off how SPECIAL(paint) command works.
Adds WIP vehicle decay, including underlying logic for certain safety checks.
In dblist.cpp, the logic for decaying vehicle needs to be moved to where the handler is for timers on characters (wherever that is).
VEH_FLAGS logic is still a bit of a mystery to me, will do later.