mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-02 22:22:55 +00:00
Merge public master
This commit is contained in:
commit
29f963c685
6 changed files with 51 additions and 8 deletions
|
|
@ -561,7 +561,9 @@ static constexpr const char* kNetDemoRecordDefault =
|
|||
|
||||
consvar_t cv_recordmultiplayerdemos = Server("netdemo_record", kNetDemoRecordDefault).values({{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}});
|
||||
|
||||
consvar_t cv_reducevfx = Server("reducevfx", "No").yes_no();
|
||||
void ReduceVFX_OnChange(void);
|
||||
consvar_t cv_reducevfx = Server("reducevfx", "No").yes_no().onchange(ReduceVFX_OnChange);
|
||||
|
||||
consvar_t cv_screenshake = Server("screenshake", "Full").values({{0, "Off"}, {1, "Half"}, {2, "Full"}});
|
||||
|
||||
consvar_t cv_rendezvousserver = Server("holepunchserver", "relay.kartkrew.org");
|
||||
|
|
|
|||
|
|
@ -452,7 +452,11 @@ P_GetMidtextureTopBottom
|
|||
{
|
||||
side_t *side = &sides[linedef->sidenum[0]];
|
||||
fixed_t textop, texbottom, texheight;
|
||||
INT32 texnum = R_GetTextureNum(side->midtexture); // make sure the texture is actually valid
|
||||
//Attempt to decouple collision from animation
|
||||
INT32 texnum = side->midtexture; // make sure the texture is actually valid
|
||||
//Sanity check on toaster's suggestion
|
||||
if (texnum < 0 || texnum >= numtextures)
|
||||
texnum = 0;
|
||||
|
||||
sector_t *front = linedef->frontsector;
|
||||
sector_t *back = linedef->backsector;
|
||||
|
|
|
|||
|
|
@ -9772,3 +9772,19 @@ boolean P_MultiSetupWadFiles(boolean fullsetup)
|
|||
partadd_stage++;
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Let's see if this works
|
||||
//
|
||||
void P_ReduceVFXTextureReload(void)
|
||||
{
|
||||
P_InitPicAnims();
|
||||
}
|
||||
|
||||
// Let's see if *this* works
|
||||
extern "C" void ReduceVFX_OnChange(void);
|
||||
void ReduceVFX_OnChange(void)
|
||||
{
|
||||
P_ReduceVFXTextureReload();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ boolean P_MultiSetupWadFiles(boolean fullsetup);
|
|||
SINT8 P_PartialAddGetStage(void);
|
||||
extern UINT16 partadd_earliestfile;
|
||||
|
||||
void P_ReduceVFXTextureReload(void);
|
||||
|
||||
boolean P_RunSOC(const char *socfilename);
|
||||
void P_LoadSoundsRange(UINT16 wadnum, UINT16 first, UINT16 num);
|
||||
|
|
|
|||
31
src/p_spec.c
31
src/p_spec.c
|
|
@ -153,8 +153,8 @@ static void GrowAnimDefs(void)
|
|||
}
|
||||
|
||||
// A prototype; here instead of p_spec.h, so they're "private"
|
||||
void P_ParseANIMDEFSLump(INT32 wadNum, UINT16 lumpnum);
|
||||
void P_ParseAnimationDefintion(void);
|
||||
void P_ParseANIMDEFSLump(INT32 wadNum, UINT16 lumpnum, boolean photosens);
|
||||
void P_ParseAnimationDefintion(boolean photosens);
|
||||
|
||||
/** Sets up texture and flat animations.
|
||||
*
|
||||
|
|
@ -180,15 +180,28 @@ void P_InitPicAnims(void)
|
|||
for (w = numwadfiles-1; w >= 0; w--)
|
||||
{
|
||||
UINT16 animdefsLumpNum;
|
||||
UINT16 photosensLumpNum;
|
||||
|
||||
// Find ANIMDEFS lump in the WAD
|
||||
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", w, 0);
|
||||
|
||||
while (animdefsLumpNum != INT16_MAX)
|
||||
{
|
||||
P_ParseANIMDEFSLump(w, animdefsLumpNum);
|
||||
P_ParseANIMDEFSLump(w, animdefsLumpNum, false);
|
||||
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", (UINT16)w, animdefsLumpNum + 1);
|
||||
}
|
||||
|
||||
if (cv_reducevfx.value)
|
||||
{
|
||||
// Find RVFXANIM lump in the WAD
|
||||
photosensLumpNum = W_CheckNumForNamePwad("RVFXANIM", w, 0);
|
||||
|
||||
while (photosensLumpNum != INT16_MAX)
|
||||
{
|
||||
P_ParseANIMDEFSLump(w, photosensLumpNum, true);
|
||||
photosensLumpNum = W_CheckNumForNamePwad("RVFXANIM", (UINT16)w, photosensLumpNum + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Define the last one
|
||||
|
|
@ -238,7 +251,7 @@ void P_InitPicAnims(void)
|
|||
animdefs = NULL;
|
||||
}
|
||||
|
||||
void P_ParseANIMDEFSLump(INT32 wadNum, UINT16 lumpnum)
|
||||
void P_ParseANIMDEFSLump(INT32 wadNum, UINT16 lumpnum, boolean photosens)
|
||||
{
|
||||
char *animdefsLump;
|
||||
size_t animdefsLumpLength;
|
||||
|
|
@ -271,7 +284,7 @@ void P_ParseANIMDEFSLump(INT32 wadNum, UINT16 lumpnum)
|
|||
if (stricmp(animdefsToken, "TEXTURE") == 0)
|
||||
{
|
||||
Z_Free(animdefsToken);
|
||||
P_ParseAnimationDefintion();
|
||||
P_ParseAnimationDefintion(photosens);
|
||||
}
|
||||
else if (stricmp(animdefsToken, "FLAT") == 0)
|
||||
{
|
||||
|
|
@ -295,7 +308,7 @@ void P_ParseANIMDEFSLump(INT32 wadNum, UINT16 lumpnum)
|
|||
Z_Free((void *)animdefsText);
|
||||
}
|
||||
|
||||
void P_ParseAnimationDefintion(void)
|
||||
void P_ParseAnimationDefintion(boolean photosens)
|
||||
{
|
||||
char *animdefsToken;
|
||||
size_t animdefsTokenLength;
|
||||
|
|
@ -436,6 +449,12 @@ void P_ParseAnimationDefintion(void)
|
|||
{
|
||||
I_Error("Error parsing ANIMDEFS lump: Expected a positive integer for \"%s\"'s animation speed, got \"%s\"", animdefs[i].startname, animdefsToken);
|
||||
}
|
||||
// Not letting anyone mess up a photosensitivity feature like this.
|
||||
if ((photosens) && animSpeed < 8)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("RVFXANIM: Animation speed of \"%s\" is less than 8 - automatically set to 8\n"), animdefs[i].startname);
|
||||
animSpeed = 8;
|
||||
}
|
||||
animdefs[i].speed = animSpeed;
|
||||
Z_Free(animdefsToken);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2421,6 +2421,7 @@ int W_VerifyNMUSlumps(const char *filename, FILE *handle, boolean exit_on_error)
|
|||
{"MKFNT", 5}, // Kart font changes
|
||||
{"K_", 2}, // Kart graphic changes
|
||||
{"MUSICDEF", 8}, // Kart song definitions
|
||||
{"RVFXANIM", 8}, // Photosensitivity texture animation changes
|
||||
|
||||
{"TLG_", 4}, // Generic button legends
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue