mirror of https://github.com/AxioDL/metaforce.git
CFluidPlaneCPU: Early exit in CTurbulence constructor
Allows unindenting code.
This commit is contained in:
parent
dc32bee499
commit
75494a501a
|
@ -25,7 +25,10 @@ CFluidPlaneCPU::CTurbulence::CTurbulence(float speed, float distance, float freq
|
|||
, x1c_amplitudeMin(amplitudeMin)
|
||||
, x2c_ooTurbSpeed(1.f / x0_speed)
|
||||
, x30_ooTurbDistance(1.f / x4_distance) {
|
||||
if (x18_amplitudeMax != 0.f || x1c_amplitudeMin != 0.f) {
|
||||
if (x18_amplitudeMax == 0.f && x1c_amplitudeMin == 0.f) {
|
||||
return;
|
||||
}
|
||||
|
||||
x24_tableCount = kTableSize;
|
||||
x28_heightSelPitch = x24_tableCount;
|
||||
x20_table.reset(new float[x24_tableCount]);
|
||||
|
@ -46,7 +49,6 @@ CFluidPlaneCPU::CTurbulence::CTurbulence(float speed, float distance, float freq
|
|||
|
||||
x34_hasTurbulence = true;
|
||||
}
|
||||
}
|
||||
|
||||
CFluidPlaneCPU::CFluidPlaneCPU(CAssetId texPattern1, CAssetId texPattern2, CAssetId texColor, CAssetId bumpMap,
|
||||
CAssetId envMap, CAssetId envBumpMap, CAssetId lightMap, float unitsPerLightmapTexel,
|
||||
|
|
Loading…
Reference in New Issue