v1.3.08 - The Fat One

--------
Driftboost formula changed to:
49 + player->kartspeed*2;
(No longer factors weight from previous version)
Collision code now factors character weight for players.
Collision code now only plays the collision sound once, rather than per player.
Weight now factors into drifting's base value. A heavier character will drift more straight with no input and have less control.
Added a cheat check in SetPlayerSkinByNum(), to force speed and weight within the boundaries of 1 and 9.
Nerfed orange turbo to 50 frames, down from 60.
This commit is contained in:
ZTsukei 2017-04-18 21:04:54 -04:00
parent 1e576fb61f
commit 8dd47ef983
4 changed files with 43 additions and 20 deletions

View file

@ -143,16 +143,16 @@ extern FILE *logstream;
#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
#ifdef DEVELOP
#define VERSION 103 // Game version
#define SUBVERSION 7 // more precise version number
#define SUBVERSION 8 // more precise version number
#define VERSIONSTRING "Development EXE"
#define VERSIONSTRINGW "v1.3.07"
#define VERSIONSTRINGW "v1.3.08"
// most interface strings are ignored in development mode.
// we use comprevision and compbranch instead.
#else
#define VERSION 103 // Game version
#define SUBVERSION 7 // more precise version number
#define VERSIONSTRING "DevEXE v1.3.07"
#define VERSIONSTRINGW L"v1.3.07"
#define SUBVERSION 8 // more precise version number
#define VERSIONSTRING "DevEXE v1.3.08"
#define VERSIONSTRINGW L"v1.3.08"
// Hey! If you change this, add 1 to the MODVERSION below!
// Otherwise we can't force updates!
#endif

View file

@ -900,8 +900,12 @@ boolean K_IsTouching(mobj_t *mobj1, mobj_t *mobj2)
void K_SwapMomentum(mobj_t *mobj1, mobj_t *mobj2, boolean bounce)
{
fixed_t newx;
fixed_t newy;
if (mobj1 == NULL || mobj2 == NULL)
return;
fixed_t meanX = (mobj1->momx + mobj2->momx) / 2;
fixed_t meanY = (mobj1->momy + mobj2->momy) / 2;
fixed_t deltaV1 = P_AproxDistance((mobj1->momx - meanX), (mobj1->momy - meanY));
@ -910,7 +914,7 @@ void K_SwapMomentum(mobj_t *mobj1, mobj_t *mobj2, boolean bounce)
if (cv_collidesounds.value == 1)
{
S_StartSound(mobj1, cv_collidesoundnum.value);
S_StartSound(mobj2, cv_collidesoundnum.value);
//S_StartSound(mobj2, cv_collidesoundnum.value);
}
if (deltaV1 < (cv_collideminimum.value * FRACUNIT / 2))
{
@ -930,17 +934,30 @@ void K_SwapMomentum(mobj_t *mobj1, mobj_t *mobj2, boolean bounce)
mobj2->momx = meanX + FixedMul(deltax2, a);
mobj2->momy = meanY + FixedMul(deltay2, a);
}
fixed_t newx = mobj1->momx;
fixed_t newy = mobj1->momy;
fixed_t newz = mobj1->momz;
if (mobj1->player && mobj2->player) // Weight is applicable if both are players
{
fixed_t m1w = 7 + mobj1->player->kartweight;
fixed_t m2w = 7 + mobj2->player->kartweight;
newx = FixedMul(mobj1->momx, FixedDiv(m1w*FRACUNIT, m2w*FRACUNIT));
newy = FixedMul(mobj1->momy, FixedDiv(m1w*FRACUNIT, m2w*FRACUNIT));
mobj1->momx = FixedMul(mobj2->momx, FixedDiv(m2w*FRACUNIT, m1w*FRACUNIT));
mobj1->momy = FixedMul(mobj2->momy, FixedDiv(m2w*FRACUNIT, m1w*FRACUNIT));
}
else
{
newx = mobj1->momx;
newy = mobj1->momy;
mobj1->momx = mobj2->momx;
mobj1->momy = mobj2->momy;
}
mobj2->momx = newx;
mobj2->momy = newy;
if (bounce == true) // Perform a Goomba Bounce.
mobj1->momz = -mobj1->momz;
else
{
fixed_t newz = mobj1->momz;
mobj1->momz = mobj2->momz;
mobj2->momz = newz;
}
@ -1933,10 +1950,11 @@ static INT16 K_GetKartDriftValue(player_t *player, fixed_t countersteer)
return -266*player->kartstuff[k_drift]; // Drift has ended and we are tweaking their angle back a bit
}
basedrift = 90*player->kartstuff[k_drift];
driftangle = abs((250 - driftweight)/5*player->kartstuff[k_drift]);
// 90*player->kartstuff[k_drift]; = 450
basedrift = 94*player->kartstuff[k_drift] - driftweight*player->kartstuff[k_drift]/3;
driftangle = abs((252 - driftweight)*player->kartstuff[k_drift]/5);
return basedrift+FixedMul(driftangle, countersteer);
return basedrift + FixedMul(driftangle, countersteer);
}
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
@ -1970,8 +1988,8 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
static void K_KartDrift(player_t *player, boolean onground)
{
// IF YOU CHANGE THESE: MAKE SURE YOU UPDATE THE SAME VALUES IN p_mobjc, "case MT_DRIFT:"
fixed_t dsone = 43 + player->kartspeed*2 + (10 - player->kartweight); // 46 - 70
fixed_t dstwo = dsone*2; // 92 - 140
fixed_t dsone = 49 + player->kartspeed*2; // 50 - 67
fixed_t dstwo = dsone*2; // 100 - 134
// Drifting is actually straffing + automatic turning.
// Holding the Jump button will enable drifting.
@ -1998,7 +2016,7 @@ static void K_KartDrift(player_t *player, boolean onground)
&& player->kartstuff[k_driftcharge] >= dstwo
&& onground)
{
player->kartstuff[k_driftboost] = 60;
player->kartstuff[k_driftboost] = 50;
S_StartSound(player->mo, sfx_mush);
player->kartstuff[k_driftcharge] = 0;
}

View file

@ -6405,9 +6405,8 @@ void P_MobjThinker(mobj_t *mobj)
//{ SRB2kart mobs
case MT_DRIFT:
{
fixed_t dsone = 43 + mobj->target->player->kartspeed*2 +
(10 - mobj->target->player->kartweight); // 46 - 70
fixed_t dstwo = dsone*2; // 92 - 140
fixed_t dsone = 49 + mobj->target->player->kartspeed*2; // 50 - 67
fixed_t dstwo = dsone*2; // 100 - 134
if ((mobj->target && mobj->target->player && mobj->target->player->mo && mobj->target->player->health > 0 && !mobj->target->player->spectator)
&& (mobj->type == MT_DRIFT && mobj->target->player->kartstuff[k_driftcharge] >= dsone))
{

View file

@ -2461,6 +2461,12 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
// SRB2kart
player->kartspeed = skin->kartspeed;
player->kartweight = skin->kartweight;
// Cheat Checks
if (player->kartspeed < 1) player->kartspeed = 1;
if (player->kartspeed > 9) player->kartspeed = 9;
if (player->kartweight < 1) player->kartweight = 1;
if (player->kartweight > 9) player->kartweight = 9;
//
player->normalspeed = skin->normalspeed;