mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-20 19:02:37 +00:00
1.3.01
------ Friction now correctly ignores FoFs over the sector (idk if it'll work on FoFs themselves yet) Friction reduces speed to 1/3, was 1/2.
This commit is contained in:
parent
ba2cf198bf
commit
911508e262
2 changed files with 29 additions and 9 deletions
|
@ -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 0 // more precise version number
|
||||
#define SUBVERSION 1 // more precise version number
|
||||
#define VERSIONSTRING "Development EXE"
|
||||
#define VERSIONSTRINGW "v1.3.0"
|
||||
#define VERSIONSTRINGW "v1.3.01"
|
||||
// most interface strings are ignored in development mode.
|
||||
// we use comprevision and compbranch instead.
|
||||
#else
|
||||
#define VERSION 103 // Game version
|
||||
#define SUBVERSION 0 // more precise version number
|
||||
#define VERSIONSTRING "DevEXE v1.3.0"
|
||||
#define VERSIONSTRINGW L"v1.3.0"
|
||||
#define SUBVERSION 1 // more precise version number
|
||||
#define VERSIONSTRING "DevEXE v1.3.01"
|
||||
#define VERSIONSTRINGW L"v1.3.01"
|
||||
// Hey! If you change this, add 1 to the MODVERSION below!
|
||||
// Otherwise we can't force updates!
|
||||
#endif
|
||||
|
|
28
src/k_kart.c
28
src/k_kart.c
|
@ -881,6 +881,26 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
//{ SRB2kart p_user.c Stuff
|
||||
|
||||
/** \brief Checks that the player is on an offroad subsector for realsies
|
||||
|
||||
\param mo player mobj object
|
||||
|
||||
\return boolean
|
||||
*/
|
||||
static boolean K_CheckOffroadCollide(mobj_t *mo)
|
||||
{
|
||||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
||||
if (((mo->z <= mo->subsector->sector->floorheight
|
||||
&& !(mo->eflags & MFE_VERTICALFLIP) && (mo->subsector->sector->flags & SF_FLIPSPECIAL_FLOOR))
|
||||
|| (mo->z + mo->height >= mo->subsector->sector->ceilingheight
|
||||
&& (mo->eflags & MFE_VERTICALFLIP) && (mo->subsector->sector->flags & SF_FLIPSPECIAL_CEILING))))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** \brief Updates the Player's offroad value once per frame
|
||||
|
||||
\param player player object passed from K_KartPlayerThink
|
||||
|
@ -897,7 +917,7 @@ static void K_UpdateOffroad(player_t *player)
|
|||
// If you are offroad, a timer starts. Depending on your weight value, the timer increments differently.
|
||||
if ((nextsector->special & 256) && nextsector->special != 768 && nextsector->special != 1024 && nextsector->special != 4864)
|
||||
{
|
||||
if (P_IsObjectOnGround(player->mo) && player->kartstuff[k_offroad] == 0)
|
||||
if (K_CheckOffroadCollide(player->mo) && player->kartstuff[k_offroad] == 0)
|
||||
player->kartstuff[k_offroad] = 16;
|
||||
if (player->kartstuff[k_offroad] > 0)
|
||||
{
|
||||
|
@ -905,7 +925,7 @@ static void K_UpdateOffroad(player_t *player)
|
|||
|
||||
// 1872 is the magic number - 35 frames adds up to approximately 65536. 1872/4 = 468/3 = 156
|
||||
// A higher kart weight means you can stay offroad for longer without losing speed
|
||||
offroad = (1872 + 5*156 - kartweight*156);
|
||||
offroad = (1872 + 5*156 - kartweight*156)*2;
|
||||
|
||||
if (player->kartstuff[k_growshrinktimer] > 1) // megashroom slows down half as fast
|
||||
offroad /= 2;
|
||||
|
@ -913,8 +933,8 @@ static void K_UpdateOffroad(player_t *player)
|
|||
player->kartstuff[k_offroad] += offroad;
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_offroad] > FRACUNIT)
|
||||
player->kartstuff[k_offroad] = FRACUNIT;
|
||||
if (player->kartstuff[k_offroad] > FRACUNIT*2)
|
||||
player->kartstuff[k_offroad] = FRACUNIT*2;
|
||||
}
|
||||
else
|
||||
player->kartstuff[k_offroad] = 0;
|
||||
|
|
Loading…
Reference in a new issue