MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / DoVehicleFlareDiscard

Function DoVehicleFlareDiscard

TombEngine/Objects/Utils/VehicleHelpers.cpp:283–295  ·  view source on GitHub ↗

TODO: Allow flares on every vehicle and see how that works. Boats already allowed them originally.

Source from the content-addressed store, hash-verified

281
282 // TODO: Allow flares on every vehicle and see how that works. Boats already allowed them originally.
283 void DoVehicleFlareDiscard(ItemInfo* laraItem)
284 {
285 auto* lara = GetLaraInfo(laraItem);
286
287 if (lara->Control.Weapon.GunType == LaraWeaponType::Flare)
288 {
289 CreateFlare(*laraItem, ID_FLARE_ITEM, false);
290 UndrawFlareMeshes(*laraItem);
291 lara->Control.Weapon.GunType = LaraWeaponType::None;
292 lara->Control.Weapon.RequestGunType = LaraWeaponType::None;
293 lara->Flare.ControlLeft = false;
294 }
295 }
296
297 // TODO: This is a copy-pase of the player version, but I may need a different method for vehicles.
298 short ModulateVehicleTurnRate(short turnRate, short accelRate, short minTurnRate, short maxTurnRate, float axisCoeff)

Callers 8

DoSkidooMountFunction · 0.85
BigGunCollisionFunction · 0.85
DoQuadBikeMountFunction · 0.85
DoUPVMountFunction · 0.85
DoKayakMountFunction · 0.85
DoMinecartMountFunction · 0.85
DoMotorbikeMountFunction · 0.85
DoJeepMountFunction · 0.85

Calls 2

CreateFlareFunction · 0.85
UndrawFlareMeshesFunction · 0.85

Tested by

no test coverage detected