Update Draft with newer tether fixes and remove 5 from max and min draft speed
Lets make it a tiny bit slower pls!
This commit is contained in:
parent
9eb18ba6d8
commit
8acac99d17
2 changed files with 20 additions and 10 deletions
|
|
@ -502,10 +502,10 @@ consvar_t cv_kartstacking_slope_accelboost = CVAR_INIT ("vanillaboost_slope_acce
|
|||
consvar_t cv_kartstacking_slope_stackable = CVAR_INIT ("vanillaboost_slope_stackable", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
// Max speed for high speeds
|
||||
consvar_t cv_kartstacking_drafting_minspeed = CVAR_INIT ("vanillaboost_draft_minspeed", "0.27", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_drafting_minspeed = CVAR_INIT ("vanillaboost_draft_minspeed", "0.22", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
|
||||
// Max speed for low speeds
|
||||
consvar_t cv_kartstacking_drafting_maxspeed = CVAR_INIT ("vanillaboost_draft_maxspeed", "0.37", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
consvar_t cv_kartstacking_drafting_maxspeed = CVAR_INIT ("vanillaboost_draft_maxspeed", "0.32", CV_NETVAR|CV_CHEAT|CV_FLOAT, CV_Unsigned, NULL);
|
||||
|
||||
consvar_t cv_kartchaining = CVAR_INIT ("kartchaining", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, KartChaining_OnChange);
|
||||
consvar_t cv_kartchainingoffroad = CVAR_INIT ("kartchaining_chainoffroad", "No", CV_NETVAR, CV_YesNo, NULL);
|
||||
|
|
|
|||
26
src/k_kart.c
26
src/k_kart.c
|
|
@ -2450,21 +2450,19 @@ static void K_UpdateDraft(player_t *player)
|
|||
yourangle = K_MomentumAngle(player->mo);
|
||||
theirangle = K_MomentumAngle(players[i].mo);
|
||||
|
||||
diff = R_PointToAngle2(player->mo->x, player->mo->y, players[i].mo->x, players[i].mo->y) - yourangle;
|
||||
if (diff > ANGLE_180)
|
||||
diff = InvAngle(diff);
|
||||
|
||||
// Not in front of this player.
|
||||
diff = AngleDelta(R_PointToAngle2(player->mo->x, player->mo->y, players[i].mo->x, players[i].mo->y), yourangle);
|
||||
if (diff > ANG10)
|
||||
{
|
||||
continue;
|
||||
|
||||
diff = yourangle - theirangle;
|
||||
if (diff > ANGLE_180)
|
||||
diff = InvAngle(diff);
|
||||
}
|
||||
|
||||
// Not moving in the same direction.
|
||||
diff = AngleDelta(yourangle, theirangle);
|
||||
if (diff > ANGLE_90)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//if (P_IsLocalPlayer(player))
|
||||
//CONS_Printf("Within Range of %s!\nAngle = %d\n", player_names[player - players], diff);
|
||||
|
|
@ -2475,13 +2473,25 @@ static void K_UpdateDraft(player_t *player)
|
|||
#ifndef EASYDRAFTTEST
|
||||
// TOO close to draft.
|
||||
if (dist < minDist)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Not close enough to draft.
|
||||
if (dist > draftdistance && draftdistance > 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Bots are unusually good at keeping their facing aligned on long, tight turns.
|
||||
// Force them to give up draft in these situations, like a drifting player typically would.
|
||||
UINT16 rejectThreshold = KART_FULLTURN/4;
|
||||
if (K_PlayerUsesBotMovement(player) && (abs(player->oldcmd.turning + player->cmd.turning) >= rejectThreshold))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
olddraft = player->draftpower;
|
||||
|
||||
player->draftleeway = leniency;
|
||||
|
|
|
|||
Loading…
Reference in a new issue