Fixed plunger pullback speed in 3DPB mode.

Issue #193
This commit is contained in:
Muzychenko Andrey 2023-10-18 08:37:54 +03:00
parent 6a30ccbef1
commit 75d2d98a46
3 changed files with 14 additions and 8 deletions

View File

@ -24,15 +24,21 @@ TPlunger::TPlunger(TPinballTable* table, int groupIndex) : TCollisionComponent(t
HardHitSoundId = visual.Kicker.HardHitSoundId;
Threshold = 1000000000.0;
// In FT, default max pullback is 50.
if (pb::FullTiltMode)
MaxPullback = 50;
else
MaxPullback = 100;
// FT:MaxPullback = 50; 3DPB: MaxPullback = 100, PullbackIncrement is floored.
if (pb::FullTiltMode)
{
MaxPullback = 50;
PullbackIncrement = MaxPullback / (ListBitmap->size() * 8.0f);
}
else
{
MaxPullback = 100;
PullbackIncrement = std::floor(MaxPullback / (ListBitmap->size() * 8.0f));
}
Elasticity = 0.5f;
Smoothness = 0.5f;
PullbackIncrement = MaxPullback / (ListBitmap->size() * 8.0f);
PullbackDelay = 0.025f;
float* floatArr = loader::query_float_attribute(groupIndex, 0, 601);
table->PlungerPosition = {floatArr[0], floatArr[1]};

View File

@ -66,7 +66,7 @@ class winmain
using TimePoint = std::chrono::time_point<Clock>;
public:
static constexpr const char* Version = "2.1.0";
static constexpr const char* Version = "2.1.1 DEV";
static bool single_step;
static SDL_Window* MainWindow;
static SDL_Renderer* Renderer;

View File

@ -39,7 +39,7 @@ cd ..
cmake .
cmake --build .
sw_version='2.1.0'
sw_version='2.1.1'
mkdir -p SpaceCadetPinball.app/Contents/MacOS
mkdir -p SpaceCadetPinball.app/Contents/Resources