Revert "remove mobj realscales"

This reverts commit 9f45dabd9c.
This commit is contained in:
Alug committed 2024-02-14 19:27:21 +01:00
1 parent 46882dee93
commit 992813d770
6 files changed
+18 -7

No files matched your search

+3 -1
View File
@@ -3913,6 +3913,7 @@ static void G_DoCompleted(void)
nextmap = G_RandMap(G_TOLFlag(gametype), prevmap, false, 0, false, NULL);
}
// We are committed to this map now.
// We may as well allocate its header if it doesn't exist
// (That is, if it's a real map)
@@ -8889,4 +8890,5 @@ INT32 G_TicsToCentiseconds(tic_t tics)
INT32 G_TicsToMilliseconds(tic_t tics)
{
return (INT32)((tics%TICRATE) * (1000.00f/TICRATE));
}
}
+6 -3
View File
@@ -3118,8 +3118,8 @@ static void K_StretchPlayerGravity(player_t *p)
fixed_t rzsDiv = 1;
fixed_t slamDiv = 1;
fixed_t dxs = p->mo->scale;
fixed_t dys = p->mo->scale;
fixed_t dxs = p->mo->realxscale;
fixed_t dys = p->mo->realyscale;
//boolean gravSlamming = false;
//fixed_t impactFactor = 0;
stretchScaleFactor = FixedDiv(FRACUNIT*60, cv_gravstretch.value);
@@ -6457,7 +6457,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (cv_gravstretch.value > 13107)
K_StretchPlayerGravity(player);
else
player->mo->spritexscale = player->mo->spriteyscale = player->mo->scale;
{
player->mo->spritexscale = player->mo->realxscale;
player->mo->spriteyscale = player->mo->realyscale;
}
boolean usedist = false;
+2 -2
View File
@@ -271,9 +271,9 @@ int mobj_spritescale_setter(lua_State *L)
{
// Mmm yea
if (spritescale == &mo->spritexscale)
mo->spritexscale = luaL_checkfixed(L, 2);
mo->realxscale = luaL_checkfixed(L, 2);
else
mo->spriteyscale = luaL_checkfixed(L, 2);
mo->realyscale = luaL_checkfixed(L, 2);
}
return 0;
}
+3 -1
View File
@@ -9678,7 +9678,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
}
// Sprite rendering
mobj->spritexscale = mobj->spriteyscale = mobj->scale;
mobj->realxscale = mobj->realyscale = mobj->scale;
mobj->spritexscale = mobj->realxscale;
mobj->spriteyscale = mobj->realyscale;
mobj->spritexoffset = mobj->spriteyoffset = 0;
// Funni slam sound when landing
+2
View File
@@ -297,6 +297,8 @@ typedef struct mobj_s
fixed_t old_spritexscale, old_spriteyscale;
fixed_t old_spritexoffset, old_spriteyoffset;
fixed_t realxscale, realyscale; // funn-E streeetch
fixed_t stretchslam; // "squish" effect when you land
//sloperollangle
+2
View File
@@ -1990,6 +1990,8 @@ static void LoadMobjThinker(actionf_p1 thinker)
mobj->spriteyoffset = mobj->old_spriteyoffset = 0;
mobj->spritexscale = mobj->old_spritexscale = FRACUNIT;
mobj->spriteyscale = mobj->old_spriteyscale = FRACUNIT;
mobj->realxscale = FRACUNIT;
mobj->realyscale = FRACUNIT;
mobj->stretchslam = 0;
mobj->slamsoundtimer = 0;