Oculus crash fix

Master nullptr check
This commit is contained in:
Bobblybook
2024-11-01 17:47:51 +11:00
parent 9ca93855fe
commit fb2391d4ce

View File

@@ -15,6 +15,8 @@ float MountingDrakeMultiplier::GetValue(Action* action)
// It seems like this is due to moving/other actions being processed during the 0.5 secs.
// If we suppress everything, they seem to mount properly. A bit of a ham-fisted solution but it works
Player* master = botAI->GetMaster();
if (!master) { return 1.0f; }
if (bot->GetMapId() != OCULUS_MAP_ID || !master->GetVehicleBase() || bot->GetVehicleBase()) { return 1.0f; }
if (!dynamic_cast<MountDrakeAction*>(action))