Open B1ack-Wh1te opened 2 weeks ago
You don't actually need to start a separate callback for rendering the interior of the hunter. Fixing it is much simpler - you just need to disable the flag at the door atomic:
Do you know if this is how Hydra does it? As I remember Hydra was unaffected.
Do you know if this is how Hydra does it? As I remember Hydra was unaffected.
These flags for atomics are set in the CVehicleModelInfo::SetVehicleComponentFlags function. Specifically the flag we are interested in (VEHICLE_ATOMIC_LEFT) is set at address 0x4C7C9D. Before that it compares other flags that the game takes from ms_vehicleDescs. If we look at what values the left door component of helicopters (heliIds) takes, we see the following:
{ .pName = “door_lf_dummy”, .hierId = CAR_DOOR_LF, .flags = VEHICLE_CRUSH | VEHICLE_DOOR | VEHICLE_DONTCULL | VEHICLE_LEFT | VEHICLE_FRONTDOOR }
As you can see, it is because of the VEHICLE_LEFT flag that the game assigns the VEHICLE_ATOMIC_LEFT flag to the atomics of this component. Regarding Hydra. Let's see what values the left door component of planes (planeIds) takes:
{ .pName = “door_lf_dummy”, .hierId = CAR_DOOR_LF, .flags = VEHICLE_CRUSH | VEHICLE_ALPHA | VEHICLE_DOOR | VEHICLE_DONTCULL }
As you can see, the VEHICLE_LEFT flag is missing. Therefore, the VEHICLE_ATOMIC_LEFT flag is not assigned to the atomics of this component.
So I am not 100% sure this is related but the Sparrow has similar transparency issues...
On PS2, the window is always visible.
While on PC it can go invisible while pointing at the water or grass...
Initially I thought it would be a model issue but even when using the PS2 Sparrow/Sea Sparrow model & texture, the bug remains. I think the Hydra and Hunter have a similar issue but it's a lot harder to see since they're not as open as the Sparrow.
Your fix for returning the alpha of the blades along with the Hunter interior fix breaks it if the transparent blades end up above the cockpit. You don't actually need to start a separate callback for rendering the interior of the hunter. Fixing it is much simpler - you just need to disable the flag at the door atomic:
Because of this CVisibilityPlugins::GetDotProductWithCameraVector will return a different value and the interior of the hunter will always be visible, since it no longer considers the left door.
But, it still doesn't fix things like. Bullet's rear window that stops showing the engine at a certain camera rotation:
Blista Compact's rear window at a certain camera rotation:
And other such vehicles problems.