gzdoom/src/g_shared/a_quake.cpp

341 lines
9.4 KiB
C++
Raw Normal View History

#include "templates.h"
#include "doomtype.h"
#include "doomstat.h"
#include "p_local.h"
#include "actor.h"
#include "m_bbox.h"
#include "m_random.h"
#include "s_sound.h"
#include "a_sharedglobal.h"
#include "statnums.h"
#include "farchive.h"
static FRandom pr_quake ("Quake");
IMPLEMENT_POINTY_CLASS (DEarthquake)
DECLARE_POINTER (m_Spot)
END_POINTERS
//==========================================================================
//
// DEarthquake :: DEarthquake private constructor
//
//==========================================================================
DEarthquake::DEarthquake()
: DThinker(STAT_EARTHQUAKE)
{
}
//==========================================================================
//
// DEarthquake :: DEarthquake public constructor
//
//==========================================================================
DEarthquake::DEarthquake (AActor *center, int intensityX, int intensityY, int intensityZ, int duration,
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
int damrad, int tremrad, FSoundID quakesound, int flags,
double waveSpeedX, double waveSpeedY, double waveSpeedZ)
: DThinker(STAT_EARTHQUAKE)
{
m_QuakeSFX = quakesound;
m_Spot = center;
// Radii are specified in tile units (64 pixels)
m_DamageRadius = damrad << FRACBITS;
m_TremorRadius = tremrad << FRACBITS;
m_IntensityX = intensityX << FRACBITS;
m_IntensityY = intensityY << FRACBITS;
m_IntensityZ = intensityZ << FRACBITS;
m_CountdownStart = duration;
m_Countdown = duration;
m_Flags = flags;
m_WaveSpeedX = (float)waveSpeedX;
m_WaveSpeedY = (float)waveSpeedY;
m_WaveSpeedZ = (float)waveSpeedZ;
}
//==========================================================================
//
// DEarthquake :: Serialize
//
//==========================================================================
void DEarthquake::Serialize (FArchive &arc)
{
Super::Serialize (arc);
arc << m_Spot << m_IntensityX << m_Countdown
<< m_TremorRadius << m_DamageRadius
<< m_QuakeSFX;
if (SaveVersion < 4519)
{
m_IntensityY = m_IntensityX;
m_IntensityZ = 0;
m_Flags = 0;
}
2015-02-20 15:50:03 +00:00
else
{
arc << m_IntensityY << m_IntensityZ << m_Flags;
}
2015-02-20 07:41:59 +00:00
if (SaveVersion < 4520)
2015-02-20 15:50:03 +00:00
{
2015-02-20 07:41:59 +00:00
m_CountdownStart = 0;
2015-02-20 15:50:03 +00:00
}
else
{
2015-02-20 15:50:03 +00:00
arc << m_CountdownStart;
}
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
if (SaveVersion < 4521)
{
m_WaveSpeedX = m_WaveSpeedY = m_WaveSpeedZ = 0;
m_IntensityX <<= FRACBITS;
m_IntensityY <<= FRACBITS;
m_IntensityZ <<= FRACBITS;
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
}
else
{
arc << m_WaveSpeedX << m_WaveSpeedY << m_WaveSpeedZ;
}
}
//==========================================================================
//
// DEarthquake :: Tick
//
// Deals damage to any players near the earthquake and makes sure it's
// making noise.
//
//==========================================================================
void DEarthquake::Tick ()
{
int i;
if (m_Spot == NULL)
{
Destroy ();
return;
}
if (!S_IsActorPlayingSomething (m_Spot, CHAN_BODY, m_QuakeSFX))
{
S_Sound (m_Spot, CHAN_BODY | CHAN_LOOP, m_QuakeSFX, 1, ATTN_NORM);
}
if (m_DamageRadius > 0)
{
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && !(players[i].cheats & CF_NOCLIP))
{
AActor *victim = players[i].mo;
fixed_t dist;
dist = m_Spot->AproxDistance (victim, true);
// Check if in damage radius
2016-01-19 12:26:05 +00:00
if (dist < m_DamageRadius && victim->Z() <= victim->floorz)
{
if (pr_quake() < 50)
{
P_DamageMobj (victim, NULL, NULL, pr_quake.HitDice (1), NAME_None);
}
// Thrust player around
angle_t an = victim->angle + ANGLE_1*pr_quake();
if (m_IntensityX == m_IntensityY)
{ // Thrust in a circle
P_ThrustMobj (victim, an, m_IntensityX << (FRACBITS-1));
}
else
{ // Thrust in an ellipse
an >>= ANGLETOFINESHIFT;
// So this is actually completely wrong, but it ought to be good
// enough. Otherwise, I'd have to use tangents and square roots.
victim->velx += FixedMul(m_IntensityX << (FRACBITS-1), finecosine[an]);
victim->vely += FixedMul(m_IntensityY << (FRACBITS-1), finesine[an]);
}
}
}
}
}
if (--m_Countdown == 0)
{
if (S_IsActorPlayingSomething(m_Spot, CHAN_BODY, m_QuakeSFX))
{
S_StopSound(m_Spot, CHAN_BODY);
}
Destroy();
}
}
fixed_t DEarthquake::GetModWave(double waveMultiplier) const
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
{
//QF_WAVE converts intensity into amplitude and unlocks a new property, the wave length.
//This is, in short, waves per second (full cycles, mind you, from 0 to 360.)
//Named waveMultiplier because that's as the name implies: adds more waves per second.
double time = m_Countdown - FIXED2DBL(r_TicFrac);
return FLOAT2FIXED(sin(waveMultiplier * time * (M_PI * 2 / TICRATE)));
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
}
//==========================================================================
//
// DEarthquake :: GetModIntensity
//
// Given a base intensity, modify it according to the quake's flags.
//
//==========================================================================
fixed_t DEarthquake::GetModIntensity(fixed_t intensity) const
{
assert(m_CountdownStart >= m_Countdown);
intensity += intensity; // always doubled
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
if (m_Flags & (QF_SCALEDOWN | QF_SCALEUP))
{
int scalar;
if ((m_Flags & (QF_SCALEDOWN | QF_SCALEUP)) == (QF_SCALEDOWN | QF_SCALEUP))
{
scalar = (m_Flags & QF_MAX) ? MAX(m_Countdown, m_CountdownStart - m_Countdown)
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
: MIN(m_Countdown, m_CountdownStart - m_Countdown);
if (m_Flags & QF_FULLINTENSITY)
{
scalar *= 2;
}
}
else if (m_Flags & QF_SCALEDOWN)
{
scalar = m_Countdown;
}
else // QF_SCALEUP
{
scalar = m_CountdownStart - m_Countdown;
}
assert(m_CountdownStart > 0);
intensity = Scale(intensity, scalar, m_CountdownStart);
2015-03-02 03:40:03 +00:00
}
return intensity;
}
//==========================================================================
//
// DEarthquake::StaticGetQuakeIntensity
//
// Searches for all quakes near the victim and returns their combined
// intensity.
//
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
// Pre: jiggers was pre-zeroed by the caller.
//
//==========================================================================
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
int DEarthquake::StaticGetQuakeIntensities(AActor *victim, FQuakeJiggers &jiggers)
{
if (victim->player != NULL && (victim->player->cheats & CF_NOCLIP))
{
return 0;
}
TThinkerIterator<DEarthquake> iterator(STAT_EARTHQUAKE);
DEarthquake *quake;
int count = 0;
while ( (quake = iterator.Next()) != NULL)
{
if (quake->m_Spot != NULL)
{
fixed_t dist = quake->m_Spot->AproxDistance (victim, true);
if (dist < quake->m_TremorRadius)
{
++count;
fixed_t x = quake->GetModIntensity(quake->m_IntensityX);
fixed_t y = quake->GetModIntensity(quake->m_IntensityY);
fixed_t z = quake->GetModIntensity(quake->m_IntensityZ);
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
if (!(quake->m_Flags & QF_WAVE))
{
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
if (quake->m_Flags & QF_RELATIVE)
{
jiggers.RelIntensityX = MAX(x, jiggers.RelIntensityX);
jiggers.RelIntensityY = MAX(y, jiggers.RelIntensityY);
jiggers.RelIntensityZ = MAX(z, jiggers.RelIntensityZ);
}
else
{
jiggers.IntensityX = MAX(x, jiggers.IntensityX);
jiggers.IntensityY = MAX(y, jiggers.IntensityY);
jiggers.IntensityZ = MAX(z, jiggers.IntensityZ);
}
2015-02-20 03:42:32 +00:00
}
else
{
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
fixed_t mx = FixedMul(x, quake->GetModWave(quake->m_WaveSpeedX));
fixed_t my = FixedMul(y, quake->GetModWave(quake->m_WaveSpeedY));
fixed_t mz = FixedMul(z, quake->GetModWave(quake->m_WaveSpeedZ));
// [RH] This only gives effect to the last sine quake. I would
// prefer if some way was found to make multiples coexist
// peacefully, but just summing them together is undesirable
// because they could cancel each other out depending on their
// relative phases.
if (quake->m_Flags & QF_RELATIVE)
{
jiggers.RelOffsetX = mx;
jiggers.RelOffsetY = my;
jiggers.RelOffsetZ = mz;
}
else
{
jiggers.OffsetX = mx;
jiggers.OffsetY = my;
jiggers.OffsetZ = mz;
}
2015-02-20 03:42:32 +00:00
}
}
}
}
return count;
}
//==========================================================================
//
// P_StartQuake
//
//==========================================================================
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
bool P_StartQuakeXYZ(AActor *activator, int tid, int intensityX, int intensityY, int intensityZ, int duration,
int damrad, int tremrad, FSoundID quakesfx, int flags,
double waveSpeedX, double waveSpeedY, double waveSpeedZ)
{
AActor *center;
bool res = false;
if (intensityX) intensityX = clamp(intensityX, 1, 9);
if (intensityY) intensityY = clamp(intensityY, 1, 9);
if (intensityZ) intensityZ = clamp(intensityZ, 1, 9);
if (tid == 0)
{
if (activator != NULL)
{
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
new DEarthquake(activator, intensityX, intensityY, intensityZ, duration, damrad, tremrad,
quakesfx, flags, waveSpeedX, waveSpeedY, waveSpeedZ);
return true;
}
}
else
{
FActorIterator iterator (tid);
while ( (center = iterator.Next ()) )
{
res = true;
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
new DEarthquake(center, intensityX, intensityY, intensityZ, duration, damrad, tremrad,
quakesfx, flags, waveSpeedX, waveSpeedY, waveSpeedZ);
}
}
return res;
}
bool P_StartQuake(AActor *activator, int tid, int intensity, int duration, int damrad, int tremrad, FSoundID quakesfx)
{ //Maintains original behavior by passing 0 to intensityZ, and flags.
Added QF_SINE - Squashed commit of the following: commit bc45fe3263d34ef5f746f524687999c19bf7b779 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:51:05 2015 -0600 wave scale -> wave speed commit ff96388b128c724c1198757bfa52f1935a263356 Author: Randy Heit <rheit@users.noreply.github.com> Date: Sun Mar 1 18:45:32 2015 -0600 More sine quake fixes commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6 Merge: 719dfbe 5456074 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:37:22 2015 -0600 Added QF_WAVE to A_QuakeEx. - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.) - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE. - Intensity X/Y/Z property becomes the amplitude of the wave. - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions. - Uses the youngest quake's time for positioning. commit 54560741581e8d15cc7060e8e068cf85e9a4b432 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 20:21:19 2015 -0600 Recommitted recommended changes by Randi, with some modifications. Now, we should be finished! commit 6f4473013411686d88fc185bdc1cc58b1035b0f1 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:52:57 2015 -0600 Finish this revert. commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066 Author: MajorCooke <paul.growney22@gmail.com> Date: Sat Feb 28 12:46:02 2015 -0600 Reverted back to what was working. commit da9de56a67efda08036e481fd5fccd5392ce6810 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:53:20 2015 -0600 Forgot this bit, for testing. commit c5093d9bb97caf8478cefc32abc56a036feeea58 Author: MajorCooke <paul.growney22@gmail.com> Date: Thu Feb 26 18:52:46 2015 -0600 Some more progress, but... - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress. - Left in the commented code on purpose so Randi can test it. commit 7e526405d2127cbb279f66008c8f8e55a5d497f3 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:50:42 2015 -0600 - Use newest waveform timer, not oldest. commit 1356443609dbc6c7f46e081d0846816dc0836124 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 17:32:09 2015 -0600 - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too. commit d95796c94c70cd0229d4a6d30f69e3a7568b9588 Author: MajorCooke <paul.growney22@gmail.com> Date: Wed Feb 25 16:46:21 2015 -0600 - Last hurdle. Now just need to figure out how to properly scale up and down. commit 4bc3458e689155ce72c09776604d9eb4fa73d8be Author: MajorCooke <paul.growney22@gmail.com> Date: Tue Feb 24 23:18:03 2015 -0600 - Fixed the quakes being unstackable. commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af Author: MajorCooke <paul.growney22@gmail.com> Date: Mon Feb 23 23:48:34 2015 -0600 QF_WAVE renamed from SINE. - Lots of ground covered, but still more to go. - Still need to figure out how to make the camera properly shudder. commit 427e4893193470bbf45415ffec70a0b69b8cccfd Author: MajorCooke <paul.growney22@gmail.com> Date: Sun Feb 22 16:52:30 2015 -0600 - Begin the groundworks for QF_SINE. - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-02 00:53:34 +00:00
return P_StartQuakeXYZ(activator, tid, intensity, intensity, 0, duration, damrad, tremrad, quakesfx, 0, 0, 0, 0);
}