- 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:
Christoph Oelckers 2016-03-20 00:54:18 +01:00
commit 51b05d331d
140 changed files with 2406 additions and 2403 deletions

View file

@ -95,6 +95,7 @@ enum EGenericType
GEN_Class,
GEN_Splash,
GEN_Float,
GEN_Double,
GEN_Time,
GEN_Bool,
GEN_Int,
@ -201,7 +202,7 @@ static FGenericParse SplashParser[] =
{ GEN_Byte, {myoffsetof(FSplashDef, ChunkXVelShift)} },
{ GEN_Byte, {myoffsetof(FSplashDef, ChunkYVelShift)} },
{ GEN_Byte, {myoffsetof(FSplashDef, ChunkZVelShift)} },
{ GEN_Fixed, {myoffsetof(FSplashDef, ChunkBaseZVel)} },
{ GEN_Double, {myoffsetof(FSplashDef, ChunkBaseZVel)} },
{ GEN_Bool, {myoffsetof(FSplashDef, NoAlert)} }
};
@ -360,7 +361,7 @@ static void SetSplashDefaults (FSplashDef *splashdef)
splashdef->ChunkXVelShift =
splashdef->ChunkYVelShift =
splashdef->ChunkZVelShift = 8;
splashdef->ChunkBaseZVel = FRACUNIT;
splashdef->ChunkBaseZVel = 1;
splashdef->SmallSplashClip = 12*FRACUNIT;
splashdef->NoAlert = false;
}
@ -595,6 +596,11 @@ static void GenericParse (FScanner &sc, FGenericParse *parser, const char **keyw
SET_FIELD (float, float(sc.Float));
break;
case GEN_Double:
sc.MustGetFloat();
SET_FIELD(double, sc.Float);
break;
case GEN_Time:
sc.MustGetFloat ();
SET_FIELD (int, (int)(sc.Float * TICRATE));