- replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed. Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
This commit is contained in:
parent
51a98d0e5d
commit
51b05d331d
140 changed files with 2406 additions and 2403 deletions
|
|
@ -1228,7 +1228,7 @@ void G_FinishTravel ()
|
|||
{
|
||||
Printf(TEXTCOLOR_RED "No player %d start to travel to!\n", pnum + 1);
|
||||
// Move to the coordinates this player had when they left the level.
|
||||
pawn->SetXYZ(pawndup->X(), pawndup->Y(), pawndup->Z());
|
||||
pawn->SetXYZ(pawndup->_f_X(), pawndup->_f_Y(), pawndup->_f_Z());
|
||||
}
|
||||
}
|
||||
oldpawn = pawndup;
|
||||
|
|
@ -1242,10 +1242,8 @@ void G_FinishTravel ()
|
|||
{
|
||||
pawn->Angles = pawndup->Angles;
|
||||
}
|
||||
pawn->SetXYZ(pawndup->X(), pawndup->Y(), pawndup->Z());
|
||||
pawn->vel.x = pawndup->vel.x;
|
||||
pawn->vel.y = pawndup->vel.y;
|
||||
pawn->vel.z = pawndup->vel.z;
|
||||
pawn->SetXYZ(pawndup->_f_X(), pawndup->_f_Y(), pawndup->_f_Z());
|
||||
pawn->Vel = pawndup->Vel;
|
||||
pawn->Sector = pawndup->Sector;
|
||||
pawn->floorz = pawndup->floorz;
|
||||
pawn->ceilingz = pawndup->ceilingz;
|
||||
|
|
@ -1315,7 +1313,7 @@ void G_InitLevelLocals ()
|
|||
NormalLight.ChangeColor (PalEntry (255, 255, 255), 0);
|
||||
|
||||
level.gravity = sv_gravity * 35/TICRATE;
|
||||
level.aircontrol = (fixed_t)(sv_aircontrol * 65536.f);
|
||||
level.aircontrol = sv_aircontrol;
|
||||
level.teamdamage = teamdamage;
|
||||
level.flags = 0;
|
||||
level.flags2 = 0;
|
||||
|
|
@ -1356,7 +1354,7 @@ void G_InitLevelLocals ()
|
|||
}
|
||||
if (info->aircontrol != 0.f)
|
||||
{
|
||||
level.aircontrol = (fixed_t)(info->aircontrol * 65536.f);
|
||||
level.aircontrol = info->aircontrol;
|
||||
}
|
||||
if (info->teamdamage != 0.f)
|
||||
{
|
||||
|
|
@ -1461,15 +1459,14 @@ FString CalcMapName (int episode, int level)
|
|||
|
||||
void G_AirControlChanged ()
|
||||
{
|
||||
if (level.aircontrol <= 256)
|
||||
if (level.aircontrol <= 1/256.)
|
||||
{
|
||||
level.airfriction = FRACUNIT;
|
||||
level.airfriction = 1.;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Friction is inversely proportional to the amount of control
|
||||
float fric = ((float)level.aircontrol/65536.f) * -0.0941f + 1.0004f;
|
||||
level.airfriction = (fixed_t)(fric * 65536.f);
|
||||
level.airfriction = level.aircontrol * -0.0941 + 1.0004;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue