This commit is contained in:
Sally Coolatta 2022-09-18 09:13:23 -04:00
commit d0482b4905
10 changed files with 108 additions and 45 deletions

View file

@ -409,8 +409,6 @@ consvar_t cv_dualjawz = CVAR_INIT ("dualjawz", "On", CV_NETVAR|CV_CHEAT, C
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
consvar_t cv_kartminimap = CVAR_INIT ("kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL);
consvar_t cv_kartcheck = CVAR_INIT ("kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL);
static CV_PossibleValue_t kartinvinsfx_cons_t[] = {{0, "Music"}, {1, "SFX"}, {0, NULL}};
consvar_t cv_kartinvinsfx = CVAR_INIT ("kartinvinsfx", "SFX", CV_SAVE, kartinvinsfx_cons_t, NULL);
consvar_t cv_kartspeed = CVAR_INIT ("kartspeed", "Auto", CV_NETVAR|CV_CALL|CV_NOINIT, kartspeed_cons_t, KartSpeed_OnChange);
static CV_PossibleValue_t kartbumpers_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {0, NULL}};
consvar_t cv_kartbumpers = CVAR_INIT ("kartbumpers", "3", CV_NETVAR|CV_CHEAT, kartbumpers_cons_t, NULL);

View file

@ -83,7 +83,6 @@ extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz;
extern consvar_t cv_kartminimap;
extern consvar_t cv_kartcheck;
extern consvar_t cv_kartinvinsfx;
extern consvar_t cv_kartspeed;
extern consvar_t cv_kartbumpers;
extern consvar_t cv_kartfrantic;

View file

@ -3759,8 +3759,20 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
"S_GROW_PARTICLE",
// Shrink
"S_SHRINK_GUN",
"S_SHRINK_POHBEE",
"S_SHRINK_POHBEE2",
"S_SHRINK_POHBEE3",
"S_SHRINK_POHBEE4",
"S_SHRINK_POHBEE5",
"S_SHRINK_POHBEE6",
"S_SHRINK_POHBEE7",
"S_SHRINK_POHBEE8",
"S_SHRINK_CHAIN",
"S_SHRINK_GUN",
"S_SHRINK_GUN_OVERLAY",
"S_SHRINK_LASER",
"S_SHRINK_PARTICLE",

View file

@ -575,7 +575,9 @@ char sprnames[NUMSPRITES + 1][5] =
"HYUU", // Hyudoro
"GRWP", // Grow
"POHB", // Shrink Poh-Bee
"SHRG", // Shrink gun / laser
"POHC", // Shrink Poh-Bee chain
"SHRG", // Shrink gun
"SHRL", // Shrink laser
"SINK", // Kitchen Sink
"SITR", // Kitchen Sink Trail
"KBLN", // Battle Mode Bumper
@ -4319,10 +4321,22 @@ state_t states[NUMSTATES] =
{SPR_GRWP, FF_FULLBRIGHT|FF_ANIMATE, 13, {NULL}, 7, 1, S_NULL}, // S_GROW_PARTICLE
{SPR_POHB, 0, 1, {NULL}, 0, 0, S_SHRINK_POHBEE2}, // S_SHRINK_POHBEE
{SPR_POHB, 1, 1, {NULL}, 0, 0, S_SHRINK_POHBEE3}, // S_SHRINK_POHBEE2
{SPR_POHB, 0, 1, {NULL}, 0, 0, S_SHRINK_POHBEE4}, // S_SHRINK_POHBEE3
{SPR_POHB, 2, 1, {NULL}, 0, 0, S_SHRINK_POHBEE5}, // S_SHRINK_POHBEE4
{SPR_POHB, 0, 1, {NULL}, 0, 0, S_SHRINK_POHBEE6}, // S_SHRINK_POHBEE5
{SPR_POHB, 3, 1, {NULL}, 0, 0, S_SHRINK_POHBEE7}, // S_SHRINK_POHBEE6
{SPR_POHB, 0, 1, {NULL}, 0, 0, S_SHRINK_POHBEE8}, // S_SHRINK_POHBEE7
{SPR_POHB, 2, 1, {NULL}, 0, 0, S_SHRINK_POHBEE}, // S_SHRINK_POHBEE8
{SPR_POHC, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_CHAIN
{SPR_SHRG, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_GUN
{SPR_POHB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_CHAIN
{SPR_SHRG, FF_FULLBRIGHT|1, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_LASER
{SPR_SHRG, FF_FULLBRIGHT|2, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_PARTICLE
{SPR_SHRG, FF_FULLBRIGHT|1, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_GUN_OVERLAY
{SPR_SHRL, FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_LASER
{SPR_SHRL, FF_FULLBRIGHT|1, -1, {NULL}, 0, 0, S_NULL}, // S_SHRINK_PARTICLE
{SPR_SINK, 0, 1, {A_SmokeTrailer}, MT_SINKTRAIL, 0, S_SINK}, // S_SINK
{SPR_SINK, 0|FF_TRANS80|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_SINK_SHIELD}, // S_SINK_SHIELD
@ -24075,7 +24089,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
{ // MT_SHRINK_POHBEE
-1, // doomednum
S_HYUDORO, // spawnstate
S_SHRINK_POHBEE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
@ -24096,7 +24110,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
0, // mass
0, // damage
sfx_None, // activesound
MF_NOCLIP|MF_NOCLIPTHING|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_DONTENCOREMAP, // flags
MF_NOCLIP|MF_NOCLIPTHING|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_DONTENCOREMAP|MF_NOSQUISH, // flags
S_NULL // raisestate
},

View file

@ -1121,7 +1121,9 @@ typedef enum sprite
SPR_HYUU, // Hyudoro
SPR_GRWP, // Grow
SPR_POHB, // Shrink Poh-Bee
SPR_SHRG, // Shrink gun / laser
SPR_POHC, // Shrink Poh-Bee chain
SPR_SHRG, // Shrink gun
SPR_SHRL, // Shrink laser
SPR_SINK, // Kitchen Sink
SPR_SITR, // Kitchen Sink Trail
SPR_KBLN, // Battle Mode Bumper
@ -4752,8 +4754,20 @@ typedef enum state
S_GROW_PARTICLE,
// Shrink
S_SHRINK_GUN,
S_SHRINK_POHBEE,
S_SHRINK_POHBEE2,
S_SHRINK_POHBEE3,
S_SHRINK_POHBEE4,
S_SHRINK_POHBEE5,
S_SHRINK_POHBEE6,
S_SHRINK_POHBEE7,
S_SHRINK_POHBEE8,
S_SHRINK_CHAIN,
S_SHRINK_GUN,
S_SHRINK_GUN_OVERLAY,
S_SHRINK_LASER,
S_SHRINK_PARTICLE,

View file

@ -241,7 +241,6 @@ void K_RegisterKartStuff(void)
CV_RegisterVar(&cv_kartminimap);
CV_RegisterVar(&cv_kartcheck);
CV_RegisterVar(&cv_kartinvinsfx);
CV_RegisterVar(&cv_kartspeed);
CV_RegisterVar(&cv_kartbumpers);
CV_RegisterVar(&cv_kartfrantic);
@ -5796,7 +5795,7 @@ void K_DoInvincibility(player_t *player, tic_t time)
}
else //used to be "if (P_IsDisplayPlayer(player) == false)"
{
S_StartSound(player->mo, (cv_kartinvinsfx.value ? sfx_alarmi : sfx_kinvnc));
S_StartSound(player->mo, sfx_alarmi);
}
P_RestoreMusic(player);
@ -7011,22 +7010,12 @@ static void K_UpdateInvincibilitySounds(player_t *player)
INT32 sfxnum = sfx_None;
if (player->mo->health > 0 && !P_IsLocalPlayer(player)) // used to be !P_IsDisplayPlayer(player)
{
if (cv_kartinvinsfx.value)
{
if (player->invincibilitytimer > 0) // Prioritize invincibility
sfxnum = sfx_alarmi;
else if (player->growshrinktimer > 0)
sfxnum = sfx_alarmg;
}
else
{
if (player->invincibilitytimer > 0)
sfxnum = sfx_kinvnc;
else if (player->growshrinktimer > 0)
sfxnum = sfx_kgrow;
}
}
if (sfxnum != sfx_None && !S_SoundPlaying(player->mo, sfxnum))
S_StartSound(player->mo, sfxnum);
@ -7036,8 +7025,6 @@ static void K_UpdateInvincibilitySounds(player_t *player)
S_StopSoundByID(player->mo, this);
STOPTHIS(sfx_alarmi);
STOPTHIS(sfx_alarmg);
STOPTHIS(sfx_kinvnc);
STOPTHIS(sfx_kgrow);
#undef STOPTHIS
}
@ -10076,7 +10063,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
}
else //used to be "if (P_IsDisplayPlayer(player) == false)"
{
S_StartSound(player->mo, (cv_kartinvinsfx.value ? sfx_alarmg : sfx_kgrow));
S_StartSound(player->mo, sfx_alarmg);
}
P_RestoreMusic(player);

View file

@ -871,9 +871,6 @@ menuitem_t OPTIONS_Sound[] =
{IT_STRING | IT_CVAR, "Character Voices", "Set how often to play character voices in game.",
NULL, {.cvar = &cv_kartvoices}, 0, 0},
{IT_STRING | IT_CVAR, "Powerup Warning", "Set how to warn you from other player's powerups such as Invincibility.",
NULL, {.cvar = &cv_kartinvinsfx}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},

View file

@ -34,7 +34,7 @@
// vertical flip
//
#define POHBEE_HOVER (256 << FRACBITS)
#define POHBEE_HOVER (128 << FRACBITS)
#define POHBEE_SPEED (128 << FRACBITS)
#define POHBEE_TIME (30 * TICRATE)
#define POHBEE_DIST (4096 << FRACBITS)
@ -58,6 +58,7 @@ enum
#define pohbee_waypoint_cur(o) ((o)->extravalue1)
#define pohbee_waypoint_dest(o) ((o)->extravalue2)
#define pohbee_height(o) ((o)->movefactor)
#define pohbee_destangle(o) ((o)->movedir)
#define pohbee_owner(o) ((o)->target)
#define pohbee_guns(o) ((o)->hnext)
@ -68,6 +69,7 @@ enum
#define gun_pohbee(o) ((o)->target)
#define gun_laser(o) ((o)->tracer)
#define gun_chains(o) ((o)->hprev)
#define gun_overlay(o) ((o)->itnext)
#define chain_index(o) ((o)->extravalue1)
@ -238,12 +240,13 @@ static void PohbeeSpawn(mobj_t *pohbee)
}
PohbeeMoveTo(pohbee, newX, newY, newZ);
pohbee->angle = K_MomentumAngle(pohbee);
pohbee_destangle(pohbee) = K_MomentumAngle(pohbee);
if (finalize == true)
{
// Move to next state
pohbee_mode(pohbee) = POHBEE_MODE_ACT;
pohbee_destangle(pohbee) += ANGLE_180;
}
if (pathfindsuccess == true)
@ -314,7 +317,7 @@ static void ShrinkLaserThinker(mobj_t *pohbee, mobj_t *gun, mobj_t *laser)
mobj_t *particle = NULL;
laser->renderflags &= ~RF_DONTDRAW;
laser->color = gun->color;
laser->color = ShrinkLaserColor(pohbee);
if (leveltime & 1)
{
@ -343,10 +346,20 @@ static void ShrinkLaserThinker(mobj_t *pohbee, mobj_t *gun, mobj_t *laser)
particle->destscale = 0;
//particle->momz = 2 * particle->scale * P_MobjFlip(particle);
if (S_SoundPlaying(laser, sfx_beam01) == false)
{
S_StartSound(laser, sfx_beam01);
}
}
else
{
laser->renderflags |= RF_DONTDRAW;
if (S_SoundPlaying(laser, sfx_beam01) == true)
{
S_StopSound(laser);
}
}
}
@ -386,6 +399,7 @@ static void DoGunChains(mobj_t *gun, mobj_t *pohbee)
static void ShrinkGunThinker(mobj_t *gun)
{
mobj_t *pohbee = gun_pohbee(gun);
skincolornum_t gunColor = SKINCOLOR_GREY;
if (pohbee == NULL || P_MobjWasRemoved(pohbee) == true)
{
@ -393,8 +407,23 @@ static void ShrinkGunThinker(mobj_t *gun)
return;
}
if (pohbee_mode(pohbee) == POHBEE_MODE_SPAWN)
{
gun->angle = pohbee->angle;
gun->color = ShrinkLaserColor(pohbee);
}
if (pohbee_owner(pohbee) != NULL && P_MobjWasRemoved(pohbee_owner(pohbee)) == false
&& pohbee_owner(pohbee)->player != NULL)
{
gunColor = pohbee_owner(pohbee)->player->skincolor;
}
gun->color = gunColor;
if (gun_overlay(gun) != NULL && P_MobjWasRemoved(gun_overlay(gun)) == false)
{
gun_overlay(gun)->color = ShrinkLaserColor(pohbee);
}
DoGunSwing(gun, pohbee);
@ -411,6 +440,7 @@ void Obj_PohbeeThinker(mobj_t *pohbee)
mobj_t *gun = NULL;
pohbee->momx = pohbee->momy = pohbee->momz = 0;
pohbee->spritexscale = pohbee->spriteyscale = 2*FRACUNIT;
switch (pohbee_mode(pohbee))
{
@ -432,6 +462,8 @@ void Obj_PohbeeThinker(mobj_t *pohbee)
break;
}
pohbee->angle += AngleDeltaSigned(pohbee_destangle(pohbee), pohbee->angle) / 8;
gun = pohbee_guns(pohbee);
while (gun != NULL && P_MobjWasRemoved(gun) == false)
{
@ -530,7 +562,7 @@ boolean Obj_ShrinkLaserCollide(mobj_t *gun, mobj_t *victim)
}
else //used to be "if (P_IsDisplayPlayer(victim->player) == false)"
{
S_StartSound(victim, (cv_kartinvinsfx.value ? sfx_alarmg : sfx_kgrow));
S_StartSound(victim, sfx_alarmg);
}
P_RestoreMusic(victim->player);
@ -654,6 +686,7 @@ static void CreatePohbee(player_t *owner, waypoint_t *start, waypoint_t *end, UI
const UINT8 numSegs = segVal * (i + 1);
mobj_t *gun = P_SpawnMobjFromMobj(pohbee, 0, 0, 0, MT_SHRINK_GUN);
mobj_t *overlay = NULL;
mobj_t *laser = NULL;
mobj_t *prevChain = NULL;
@ -663,6 +696,13 @@ static void CreatePohbee(player_t *owner, waypoint_t *start, waypoint_t *end, UI
gun_numsegs(gun) = numSegs;
gun_offset(gun) = P_RandomKey(GUN_SWINGTIME);
overlay = P_SpawnMobjFromMobj(gun, 0, 0, 0, MT_OVERLAY);
P_SetTarget(&overlay->target, gun);
P_SetTarget(&gun_overlay(gun), overlay);
P_SetMobjState(overlay, S_SHRINK_GUN_OVERLAY);
laser = P_SpawnMobjFromMobj(gun, 0, 0, 0, MT_SHRINK_LASER);
P_SetTarget(&gun_laser(gun), laser);

View file

@ -1054,8 +1054,6 @@ sfxinfo_t S_sfx[NUMSFX] =
{"kpogos", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Pogo Spring use
{"alarmi", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Invincibility alarm
{"alarmg", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Grow alarm
{"kinvnc", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Invincibility music
{"kgrow", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Grow music
{"itrol1", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Roulette spinning
{"itrol2", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"itrol3", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
@ -1115,7 +1113,10 @@ sfxinfo_t S_sfx[NUMSFX] =
{"ffbonc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
// Shout message sound effect
{"sysmsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Server notification"},
{"sysmsg", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Server notification"},
// Shrink laser beam
{"beam01", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
// SRB2Kart - Engine sounds
// Engine class A

View file

@ -1118,8 +1118,6 @@ typedef enum
sfx_kpogos,
sfx_alarmi,
sfx_alarmg,
sfx_kinvnc,
sfx_kgrow,
sfx_itrol1,
sfx_itrol2,
sfx_itrol3,
@ -1182,6 +1180,9 @@ typedef enum
// Shout message sound effect
sfx_sysmsg,
// Shrink laser
sfx_beam01,
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
// Engine class A - Low Speed, Low Weight
sfx_krta00,