Use sub-tic accuracy for smooth sine quakes

- Converting the wave speed back to floats, since I'm using sin() instead
  of the finesine table now.
- Pre-shift the quake intensities to avoid extra shifting in GetModIntensity.
- Loading old saves will shift the intensities to fixed point but will not
  convert the fixed wave speeds to floats. The chances of this
  being in a savegame where the speeds are non-zero is pretty much nil,
  and int and floating point 0 are bitwise identical (not counting -0.0).
This commit is contained in:
Randy Heit 2015-03-02 19:17:24 -06:00
commit 156d1e61fd
4 changed files with 26 additions and 28 deletions

View file

@ -4428,9 +4428,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_QuakeEx)
ACTION_PARAM_INT(tremrad, 5);
ACTION_PARAM_SOUND(sound, 6);
ACTION_PARAM_INT(flags, 7);
ACTION_PARAM_FIXED(mulWaveX, 8);
ACTION_PARAM_FIXED(mulWaveY, 9);
ACTION_PARAM_FIXED(mulWaveZ, 10);
ACTION_PARAM_DOUBLE(mulWaveX, 8);
ACTION_PARAM_DOUBLE(mulWaveY, 9);
ACTION_PARAM_DOUBLE(mulWaveZ, 10);
P_StartQuakeXYZ(self, 0, intensityX, intensityY, intensityZ, duration, damrad, tremrad, sound, flags, mulWaveX, mulWaveY, mulWaveZ);
}