Squishsound #41
No files matched your search
@@ -703,6 +703,8 @@ void D_RegisterServerCommands(void)
|
||||
CV_RegisterVar(&cv_powerstones);
|
||||
CV_RegisterVar(&cv_competitionboxes);
|
||||
CV_RegisterVar(&cv_matchboxes);
|
||||
|
||||
CV_RegisterVar(&cv_slamsound);
|
||||
|
||||
/*CV_RegisterVar(&cv_recycler);
|
||||
CV_RegisterVar(&cv_teleporters);
|
||||
|
||||
@@ -545,8 +545,12 @@ static CV_PossibleValue_t stretchfactor_t[] = {{0, "MIN"}, {FRACUNIT, "MAX"}, {0
|
||||
consvar_t cv_gravstretch = {"gravstretch", "0", CV_FLOAT | CV_SAVE, stretchfactor_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_sloperoll = {"sloperoll", "Off", CV_SAVE|CV_CALL, CV_OnOff, PDistort_menu_Onchange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_sliptideroll = {"sliptideroll", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t slamsound_t[] = {{0, "Off"}, {1, "On"}, {0, NULL}};
|
||||
consvar_t cv_slamsound = {"slamsound", "1", CV_SAVE, slamsound_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t sloperolldist_cons_t[] = {
|
||||
/*{256, "256"},*/ {512, "512"}, {768, "768"},
|
||||
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
||||
|
||||
@@ -155,6 +155,7 @@ extern consvar_t cv_driftsparkpulse;
|
||||
extern consvar_t cv_gravstretch;
|
||||
extern consvar_t cv_sloperoll;
|
||||
extern consvar_t cv_sliptideroll;
|
||||
extern consvar_t cv_slamsound;
|
||||
extern consvar_t cv_sloperolldist;
|
||||
|
||||
extern consvar_t cv_invincmusicfade;
|
||||
|
||||
+9
-1
@@ -3008,6 +3008,15 @@ static void K_StretchPlayerGravity(player_t *p)
|
||||
I_Assert(p->mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(p->mo));
|
||||
|
||||
if (p->mo->slamsoundtimer)
|
||||
p->mo->slamsoundtimer--;
|
||||
|
||||
if (cv_slamsound.value == 1 && (p->mo->eflags & MFE_JUSTHITFLOOR) && p->mo->stretchslam > 4*mos && !p->mo->slamsoundtimer)
|
||||
{
|
||||
S_StartSound(p->mo, sfx_s3k4c);
|
||||
p->mo->slamsoundtimer = TICRATE;
|
||||
}
|
||||
|
||||
if (!P_IsObjectOnGround(p->mo))
|
||||
{
|
||||
if (zspd != 0)
|
||||
@@ -3040,7 +3049,6 @@ static void K_StretchPlayerGravity(player_t *p)
|
||||
p->mo->stretchslam -= (4*mos);
|
||||
else
|
||||
p->mo->stretchslam = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1727,6 +1727,7 @@ static menuitem_t OP_PlayerDistortMenu[] =
|
||||
{IT_STRING | IT_CVAR, NULL, "Slope rotation distance", &cv_sloperolldist, 35},
|
||||
{IT_STRING | IT_CVAR, NULL, "Rotate players when sliptiding", &cv_sliptideroll, 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Player stretch factor", &cv_gravstretch, 65},
|
||||
{IT_STRING | IT_CVAR, NULL, "Squish Sound Effect", &cv_slamsound, 80},
|
||||
};
|
||||
|
||||
enum
|
||||
|
||||
@@ -9562,6 +9562,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||
mobj->spriteyscale = mobj->realyscale;
|
||||
mobj->spritexoffset = mobj->spriteyoffset = 0;
|
||||
|
||||
// Funni slam sound when landing
|
||||
mobj->slamsoundtimer = 0;
|
||||
|
||||
// set subsector and/or block links
|
||||
P_SetThingPosition(mobj);
|
||||
I_Assert(mobj->subsector != NULL);
|
||||
|
||||
@@ -395,6 +395,8 @@ typedef struct mobj_s
|
||||
boolean colorized; // Whether the mobj uses the rainbow colormap
|
||||
boolean rollmodel; // OpenGL: Should this model rotate?
|
||||
|
||||
tic_t slamsoundtimer;
|
||||
|
||||
// saltyhop! hardcode edition
|
||||
boolean salty_ready;
|
||||
boolean salty_tapping;
|
||||
|
||||
@@ -1984,6 +1984,7 @@ static void LoadMobjThinker(actionf_p1 thinker)
|
||||
mobj->spritexscale = mobj->spriteyscale = mobj->old_spritexscale = mobj->old_spriteyscale = FRACUNIT;
|
||||
mobj->realxscale = mobj->realyscale = FRACUNIT;
|
||||
mobj->stretchslam = 0;
|
||||
mobj->slamsoundtimer = 0;
|
||||
|
||||
mobj->sloperoll = mobj->reservezangle = mobj->reservexydir = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user