mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Two scale things I noticed.
* Change spacing of bustable FOF debris with scale (plus increase its default a bit for less lag). * Make a few instances of scalespeed take mapheader scaling into account.
This commit is contained in:
parent
f4479b81cc
commit
285ae41a6e
3 changed files with 8 additions and 7 deletions
|
|
@ -4846,7 +4846,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
&& player->kartstuff[k_growshrinktimer] <= 0) // Grow holds the item box hostage
|
&& player->kartstuff[k_growshrinktimer] <= 0) // Grow holds the item box hostage
|
||||||
{
|
{
|
||||||
K_PlayPowerGloatSound(player->mo);
|
K_PlayPowerGloatSound(player->mo);
|
||||||
player->mo->scalespeed = FRACUNIT/TICRATE;
|
player->mo->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/TICRATE;
|
||||||
player->mo->destscale = 3*(mapheaderinfo[gamemap-1]->mobj_scale)/2;
|
player->mo->destscale = 3*(mapheaderinfo[gamemap-1]->mobj_scale)/2;
|
||||||
if (cv_kartdebugshrink.value && !player->bot)
|
if (cv_kartdebugshrink.value && !player->bot)
|
||||||
player->mo->destscale = 6*player->mo->destscale/8;
|
player->mo->destscale = 6*player->mo->destscale/8;
|
||||||
|
|
|
||||||
|
|
@ -3003,6 +3003,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
|
||||||
fixed_t topz;
|
fixed_t topz;
|
||||||
fixed_t a, b, c;
|
fixed_t a, b, c;
|
||||||
mobjtype_t type = MT_ROCKCRUMBLE1;
|
mobjtype_t type = MT_ROCKCRUMBLE1;
|
||||||
|
const fixed_t spacing = 48*mapheaderinfo[gamemap-1]->mobj_scale;
|
||||||
|
|
||||||
// If the control sector has a special
|
// If the control sector has a special
|
||||||
// of Section3:7-15, use the custom debris.
|
// of Section3:7-15, use the custom debris.
|
||||||
|
|
@ -3034,16 +3035,16 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
|
||||||
rightx = sec->lines[rightmostvertex]->v1->x;
|
rightx = sec->lines[rightmostvertex]->v1->x;
|
||||||
topy = sec->lines[topmostvertex]->v1->y-(16<<FRACBITS);
|
topy = sec->lines[topmostvertex]->v1->y-(16<<FRACBITS);
|
||||||
bottomy = sec->lines[bottommostvertex]->v1->y;
|
bottomy = sec->lines[bottommostvertex]->v1->y;
|
||||||
topz = *rover->topheight-(16<<FRACBITS);
|
topz = *rover->topheight-(spacing/2);
|
||||||
|
|
||||||
for (a = leftx; a < rightx; a += (32<<FRACBITS))
|
for (a = leftx; a < rightx; a += spacing)
|
||||||
{
|
{
|
||||||
for (b = topy; b > bottomy; b -= (32<<FRACBITS))
|
for (b = topy; b > bottomy; b -= spacing)
|
||||||
{
|
{
|
||||||
if (R_PointInSubsector(a, b)->sector == sec)
|
if (R_PointInSubsector(a, b)->sector == sec)
|
||||||
{
|
{
|
||||||
mobj_t *spawned = NULL;
|
mobj_t *spawned = NULL;
|
||||||
for (c = topz; c > *rover->bottomheight; c -= (32<<FRACBITS))
|
for (c = topz; c > *rover->bottomheight; c -= spacing)
|
||||||
{
|
{
|
||||||
spawned = P_SpawnMobj(a, b, c, type);
|
spawned = P_SpawnMobj(a, b, c, type);
|
||||||
spawned->fuse = 3*TICRATE;
|
spawned->fuse = 3*TICRATE;
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_SetTarget(&special->tracer, toucher);
|
P_SetTarget(&special->tracer, toucher);
|
||||||
special->flags2 |= MF2_NIGHTSPULL;
|
special->flags2 |= MF2_NIGHTSPULL;
|
||||||
special->destscale = mapheaderinfo[gamemap-1]->mobj_scale>>4;
|
special->destscale = mapheaderinfo[gamemap-1]->mobj_scale>>4;
|
||||||
special->scalespeed <<= 1;
|
special->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/6; // (FRACUNIT/12)<<1 but mapheader-scale-considering
|
||||||
|
|
||||||
special->flags &= ~MF_SPECIAL;
|
special->flags &= ~MF_SPECIAL;
|
||||||
return;
|
return;
|
||||||
|
|
@ -3329,7 +3329,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
if (!player->kartstuff[k_invincibilitytimer] && player->kartstuff[k_growshrinktimer] <= 0)
|
if (!player->kartstuff[k_invincibilitytimer] && player->kartstuff[k_growshrinktimer] <= 0)
|
||||||
{
|
{
|
||||||
// Start shrinking!
|
// Start shrinking!
|
||||||
player->mo->scalespeed = FRACUNIT/TICRATE;
|
player->mo->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/TICRATE;
|
||||||
player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8;
|
player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8;
|
||||||
if (cv_kartdebugshrink.value && !player->bot)
|
if (cv_kartdebugshrink.value && !player->bot)
|
||||||
player->mo->destscale = 6*player->mo->destscale/8;
|
player->mo->destscale = 6*player->mo->destscale/8;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue