Merge branch 'v2dev3' into udmf-cherrypick-cherrypick
This commit is contained in:
commit
972b98cc90
6 changed files with 42 additions and 97 deletions
|
|
@ -3496,35 +3496,35 @@ thingtypes
|
|||
sprite = "SPDBA2A8";
|
||||
flags8text = "[8] Rotate 22.5° CCW";
|
||||
}
|
||||
557
|
||||
2171
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Diagonal Grey Spring";
|
||||
sprite = "SPDGA2A8";
|
||||
flags8text = "[8] Rotate 22.5° CCW";
|
||||
}
|
||||
558
|
||||
2172
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Yellow Spring";
|
||||
sprite = "SPHYA2A8";
|
||||
flags8text = "[8] Rotate 22.5° CCW";
|
||||
}
|
||||
559
|
||||
2173
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Red Spring";
|
||||
sprite = "SPHRA2A8";
|
||||
flags8text = "[8] Rotate 22.5° CCW";
|
||||
}
|
||||
560
|
||||
2174
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Blue Spring";
|
||||
sprite = "SPHBA2A8";
|
||||
flags8text = "[8] Rotate 22.5° CCW";
|
||||
}
|
||||
561
|
||||
2175
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Grey Spring";
|
||||
|
|
|
|||
|
|
@ -1882,7 +1882,7 @@ udmf
|
|||
}
|
||||
}
|
||||
}
|
||||
557
|
||||
2171
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Diagonal Grey Spring";
|
||||
|
|
@ -1899,7 +1899,7 @@ udmf
|
|||
}
|
||||
}
|
||||
}
|
||||
558
|
||||
2172
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Yellow Spring";
|
||||
|
|
@ -1913,7 +1913,7 @@ udmf
|
|||
enum = "yesno";
|
||||
}
|
||||
}
|
||||
559
|
||||
2173
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Red Spring";
|
||||
|
|
@ -1927,7 +1927,7 @@ udmf
|
|||
enum = "yesno";
|
||||
}
|
||||
}
|
||||
560
|
||||
2174
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Blue Spring";
|
||||
|
|
@ -1941,7 +1941,7 @@ udmf
|
|||
enum = "yesno";
|
||||
}
|
||||
}
|
||||
561
|
||||
2175
|
||||
{
|
||||
arrow = 1;
|
||||
title = "Horizontal Grey Spring";
|
||||
|
|
|
|||
10
src/info.c
10
src/info.c
|
|
@ -8302,7 +8302,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
},
|
||||
|
||||
{ // MT_GREYDIAG
|
||||
558, // doomednum
|
||||
2171, // doomednum
|
||||
S_GDIAG1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_GDIAG2, // seestate
|
||||
|
|
@ -8329,7 +8329,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
},
|
||||
|
||||
{ // MT_YELLOWHORIZ
|
||||
559, // doomednum
|
||||
2172, // doomednum
|
||||
S_YHORIZ1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_YHORIZ2, // seestate
|
||||
|
|
@ -8356,7 +8356,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
},
|
||||
|
||||
{ // MT_REDHORIZ
|
||||
560, // doomednum
|
||||
2173, // doomednum
|
||||
S_RHORIZ1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_RHORIZ2, // seestate
|
||||
|
|
@ -8383,7 +8383,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
},
|
||||
|
||||
{ // MT_BLUEHORIZ
|
||||
561, // doomednum
|
||||
2174, // doomednum
|
||||
S_BHORIZ1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_BHORIZ2, // seestate
|
||||
|
|
@ -8410,7 +8410,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
},
|
||||
|
||||
{ // MT_GREYHORIZ
|
||||
562, // doomednum
|
||||
2175, // doomednum
|
||||
S_GHORIZ1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_GHORIZ2, // seestate
|
||||
|
|
|
|||
|
|
@ -548,77 +548,6 @@ void K_ProcessTerrainEffect(mobj_t *mo)
|
|||
// (Offroad is handled elsewhere!)
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_SetDefaultFriction(mobj_t *mo)
|
||||
|
||||
See header file for description.
|
||||
--------------------------------------------------*/
|
||||
void K_SetDefaultFriction(mobj_t *mo)
|
||||
{
|
||||
boolean isPlayer = false;
|
||||
|
||||
if (mo == NULL || P_MobjWasRemoved(mo) == true)
|
||||
{
|
||||
// Invalid object.
|
||||
return;
|
||||
}
|
||||
|
||||
isPlayer = (mo->player != NULL);
|
||||
|
||||
mo->friction = ORIG_FRICTION;
|
||||
|
||||
if (isPlayer == true)
|
||||
{
|
||||
mo->movefactor = FRACUNIT;
|
||||
}
|
||||
|
||||
if (mo->terrain != NULL)
|
||||
{
|
||||
fixed_t strength = mo->terrain->friction;
|
||||
|
||||
fixed_t newFriction = INT32_MAX;
|
||||
fixed_t newMovefactor = INT32_MAX;
|
||||
|
||||
if (strength > 0) // sludge
|
||||
{
|
||||
strength = strength * 2; // otherwise, the maximum sludginess value is +967...
|
||||
}
|
||||
|
||||
// The following might seem odd. At the time of movement,
|
||||
// the move distance is multiplied by 'friction/0x10000', so a
|
||||
// higher friction value actually means 'less friction'.
|
||||
newFriction = ORIG_FRICTION - FixedMul(0x1EB8, strength) / 0x80; // ORIG_FRICTION is 0xE800
|
||||
|
||||
if (newFriction > FRACUNIT)
|
||||
{
|
||||
newFriction = FRACUNIT;
|
||||
}
|
||||
|
||||
if (newFriction < 0)
|
||||
{
|
||||
newFriction = 0;
|
||||
}
|
||||
|
||||
mo->friction = newFriction;
|
||||
|
||||
if (isPlayer == true)
|
||||
{
|
||||
newMovefactor = FixedDiv(ORIG_FRICTION, newFriction);
|
||||
|
||||
if (newMovefactor < FRACUNIT)
|
||||
{
|
||||
newMovefactor = 19*newMovefactor - 18*FRACUNIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
newMovefactor = FRACUNIT;
|
||||
}
|
||||
|
||||
mo->movefactor = newMovefactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
static void K_SpawnSplashParticles(mobj_t *mo, t_splash_t *s, fixed_t impact)
|
||||
|
||||
|
|
|
|||
15
src/p_mobj.c
15
src/p_mobj.c
|
|
@ -1340,6 +1340,7 @@ static void P_SceneryXYFriction(mobj_t *mo, fixed_t oldx, fixed_t oldy)
|
|||
{
|
||||
// Stolen from P_SpawnFriction
|
||||
mo->friction = FRACUNIT - 0x100;
|
||||
//mo->movefactor = ((0x10092 - mo->friction)*(0x70))/0x158;
|
||||
}
|
||||
else
|
||||
mo->friction = ORIG_FRICTION;
|
||||
|
|
@ -1361,21 +1362,23 @@ static void P_XYFriction(mobj_t *mo, fixed_t oldx, fixed_t oldy)
|
|||
player = mo->player;
|
||||
if (player) // valid only if player avatar
|
||||
{
|
||||
if (FixedHypot(player->rmomx, player->rmomy) < FixedMul(STOPSPEED, mo->scale) && (K_GetForwardMove(player) == 0)
|
||||
&& !(player->mo->standingslope && (!(player->mo->standingslope->flags & SL_NOPHYSICS)) /*&& (abs(player->mo->standingslope->zdelta) >= FRACUNIT/2)*/))
|
||||
if (abs(player->rmomx) < FixedMul(STOPSPEED, mo->scale)
|
||||
&& abs(player->rmomy) < FixedMul(STOPSPEED, mo->scale)
|
||||
&& (!(player->cmd.forwardmove && !player->cmd.sidemove))
|
||||
&& !(player->mo->standingslope && (!(player->mo->standingslope->flags & SL_NOPHYSICS)) && (abs(player->mo->standingslope->zdelta) >= FRACUNIT/2))
|
||||
)
|
||||
{
|
||||
// if in a walking frame, stop moving
|
||||
if (player->panim == PA_SLOW)
|
||||
{
|
||||
P_SetPlayerMobjState(mo, S_KART_STILL);
|
||||
}
|
||||
|
||||
mo->momx = player->cmomx;
|
||||
mo->momy = player->cmomy;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (oldx == mo->x && oldy == mo->y)
|
||||
if (oldx == mo->x && oldy == mo->y) // didn't go anywhere
|
||||
{
|
||||
mo->momx = FixedMul(mo->momx, ORIG_FRICTION);
|
||||
mo->momy = FixedMul(mo->momy, ORIG_FRICTION);
|
||||
|
|
@ -1386,13 +1389,11 @@ static void P_XYFriction(mobj_t *mo, fixed_t oldx, fixed_t oldy)
|
|||
mo->momy = FixedMul(mo->momy, mo->friction);
|
||||
}
|
||||
|
||||
K_SetDefaultFriction(mo);
|
||||
mo->friction = ORIG_FRICTION;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
P_SceneryXYFriction(mo, oldx, oldy);
|
||||
}
|
||||
}
|
||||
|
||||
static void P_PushableCheckBustables(mobj_t *mo)
|
||||
|
|
|
|||
23
src/p_spec.c
23
src/p_spec.c
|
|
@ -8018,10 +8018,22 @@ void T_Friction(friction_t *f)
|
|||
|
||||
sec = sectors + f->affectee;
|
||||
|
||||
// Get FOF control sector
|
||||
// Get FOF control sector (was "Make sure the sector type hasn't changed")
|
||||
if (f->roverfriction)
|
||||
//{
|
||||
referrer = sectors + f->referrer;
|
||||
|
||||
/* if (!(GETSECSPECIAL(referrer->special, 3) == 1
|
||||
|| GETSECSPECIAL(referrer->special, 3) == 3))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(GETSECSPECIAL(sec->special, 3) == 1
|
||||
|| GETSECSPECIAL(sec->special, 3) == 3))
|
||||
return;
|
||||
}*/
|
||||
|
||||
// Assign the friction value to players on the floor, non-floating,
|
||||
// and clipped. Normally the object's friction value is kept at
|
||||
// ORIG_FRICTION and this thinker changes it for icy or muddy floors.
|
||||
|
|
@ -8037,8 +8049,7 @@ void T_Friction(friction_t *f)
|
|||
// apparently, all I had to do was comment out part of the next line and
|
||||
// friction works for all mobj's
|
||||
// (or at least MF_PUSHABLEs, which is all I care about anyway)
|
||||
// Readded v1 kart condition - Nep
|
||||
if (!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) && thing->z == thing->floorz && (thing->player
|
||||
if ((!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) && thing->z == thing->floorz) && (thing->player
|
||||
&& (thing->player->invincibilitytimer == 0 && thing->player->hyudorotimer == 0
|
||||
&& thing->player->sneakertimer == 0 && thing->player->growshrinktimer <= 0)))
|
||||
{
|
||||
|
|
@ -8096,9 +8107,13 @@ static void P_SpawnFriction(void)
|
|||
|
||||
movefactor = FixedDiv(ORIG_FRICTION, friction);
|
||||
if (movefactor < FRACUNIT)
|
||||
movefactor = 8*movefactor - 7*FRACUNIT;
|
||||
movefactor = 19*movefactor - 18*FRACUNIT;
|
||||
else
|
||||
movefactor = FRACUNIT;
|
||||
|
||||
// killough 8/28/98: prevent odd situations
|
||||
if (movefactor < 32)
|
||||
movefactor = 32;
|
||||
|
||||
Add_Friction(friction, movefactor, (INT32)(s-sectors), -1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue