Skip to content

Commit

Permalink
make sure WalkStepTics and RunStepTics read ints, not floats
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Oct 21, 2024
1 parent 3a88281 commit 7b59642
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/gamedata/p_terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ enum EGenericType
GEN_Splash,
GEN_Float,
GEN_Double,
GEN_Time,
GEN_Bool,
GEN_Int,
GEN_Custom,
Expand Down Expand Up @@ -217,8 +216,8 @@ static FGenericParse TerrainParser[] =
{ GEN_Int, {myoffsetof(FTerrainDef, DamageTimeMask)} },
{ GEN_Double, {myoffsetof(FTerrainDef, FootClip)} },
{ GEN_Float, {myoffsetof(FTerrainDef, StepVolume)} },
{ GEN_Time, {myoffsetof(FTerrainDef, WalkStepTics)} },
{ GEN_Time, {myoffsetof(FTerrainDef, RunStepTics)} },
{ GEN_Int, {myoffsetof(FTerrainDef, WalkStepTics)} },
{ GEN_Int, {myoffsetof(FTerrainDef, RunStepTics)} },
{ GEN_Sound, {myoffsetof(FTerrainDef, LeftStepSound)} },
{ GEN_Sound, {myoffsetof(FTerrainDef, RightStepSound)} },
{ GEN_Bool, {myoffsetof(FTerrainDef, IsLiquid)} },
Expand Down Expand Up @@ -600,11 +599,6 @@ static void GenericParse (FScanner &sc, FGenericParse *parser, const char **keyw
SET_FIELD(double, sc.Float);
break;

case GEN_Time:
sc.MustGetFloat ();
SET_FIELD (int, (int)(sc.Float));
break;

case GEN_Bool:
SET_FIELD (bool, true);
break;
Expand Down

0 comments on commit 7b59642

Please sign in to comment.