cherrypikcs from 'miniladder-16'
This commit is contained in:
parent
782df794c8
commit
7f355a35ca
9 changed files with 40 additions and 11 deletions
|
|
@ -398,7 +398,10 @@ void readfreeslots(MYFILE *f)
|
|||
// TODO: Out-of-slots warnings/errors.
|
||||
// TODO: Name too long (truncated) warnings.
|
||||
if (fastcmp(type, "SFX"))
|
||||
{
|
||||
CONS_Printf("Sound sfx_%s allocated.\n",word);
|
||||
S_AddSoundFx(word, false, 0, false);
|
||||
}
|
||||
else if (fastcmp(type, "SPR"))
|
||||
{
|
||||
for (i = SPR_FIRSTFREESLOT; i <= SPR_LASTFREESLOT; i++)
|
||||
|
|
@ -412,6 +415,7 @@ void readfreeslots(MYFILE *f)
|
|||
// Found a free slot!
|
||||
strncpy(sprnames[i],word,4);
|
||||
//sprnames[i][4] = 0;
|
||||
CONS_Printf("Sprite SPR_%s allocated.\n",word);
|
||||
used_spr[(i-SPR_FIRSTFREESLOT)/8] |= 1<<(i%8); // Okay, this sprite slot has been named now.
|
||||
// Lua needs to update the value in _G if it exists
|
||||
LUA_UpdateSprName(word, i);
|
||||
|
|
@ -422,6 +426,7 @@ void readfreeslots(MYFILE *f)
|
|||
{
|
||||
for (i = 0; i < NUMSTATEFREESLOTS; i++)
|
||||
if (!FREE_STATES[i]) {
|
||||
CONS_Printf("State S_%s allocated.\n",word);
|
||||
FREE_STATES[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL);
|
||||
strcpy(FREE_STATES[i],word);
|
||||
freeslotusage[0][0]++;
|
||||
|
|
@ -432,6 +437,7 @@ void readfreeslots(MYFILE *f)
|
|||
{
|
||||
for (i = 0; i < NUMMOBJFREESLOTS; i++)
|
||||
if (!FREE_MOBJS[i]) {
|
||||
CONS_Printf("MobjType MT_%s allocated.\n",word);
|
||||
FREE_MOBJS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL);
|
||||
strcpy(FREE_MOBJS[i],word);
|
||||
freeslotusage[1][0]++;
|
||||
|
|
@ -442,6 +448,7 @@ void readfreeslots(MYFILE *f)
|
|||
{
|
||||
for (i = 0; i < NUMCOLORFREESLOTS; i++)
|
||||
if (!FREE_SKINCOLORS[i]) {
|
||||
CONS_Printf("Skincolor SKINCOLOR_%s allocated.\n",word);
|
||||
FREE_SKINCOLORS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL);
|
||||
strcpy(FREE_SKINCOLORS[i],word);
|
||||
M_AddMenuColor(numskincolors++);
|
||||
|
|
|
|||
|
|
@ -2038,7 +2038,7 @@ void G_BeginRecording(void)
|
|||
if (wadfiles[i]->important)
|
||||
{
|
||||
nameonly(( filename = va("%s", wadfiles[i]->filename) ));
|
||||
WRITESTRINGN(demobuf.p, filename, 64);
|
||||
WRITESTRINGN(demobuf.p, filename, MAX_WADPATH);
|
||||
WRITEMEM(demobuf.p, wadfiles[i]->md5sum, 16);
|
||||
|
||||
totalfiles++;
|
||||
|
|
|
|||
10
src/p_mobj.c
10
src/p_mobj.c
|
|
@ -10041,10 +10041,16 @@ void P_RemoveSavegameMobj(mobj_t *mobj)
|
|||
|
||||
// stop any playing sound
|
||||
S_StopSound(mobj);
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
P_DeleteMobjStringArgs(mobj);
|
||||
|
||||
// free block
|
||||
P_UnlinkThinker((thinker_t*)mobj);
|
||||
// Here we use the same code as R_RemoveThinkerDelayed, but without reference counting (we're removing everything so it shouldn't matter) and without touching currentthinker since we aren't in P_RunThinkers
|
||||
{
|
||||
thinker_t *thinker = (thinker_t *)mobj;
|
||||
thinker_t *next = thinker->next;
|
||||
(next->prev = thinker->prev)->next = next;
|
||||
Z_Free(thinker);
|
||||
}
|
||||
}
|
||||
|
||||
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
||||
|
|
|
|||
|
|
@ -2820,6 +2820,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
camera[i].y += y;
|
||||
camera[i].z += z;
|
||||
camera[i].subsector = R_PointInSubsector(camera[i].x, camera[i].y);
|
||||
R_RelativeTeleportViewInterpolation(i, x, y, z, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,12 @@ void P_MixUp(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
|||
// move chasecam at new player location
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (thing->player == &players[displayplayers[i]] && camera[i].chase)
|
||||
if (thing->player != &players[displayplayers[i]])
|
||||
continue;
|
||||
if (camera[i].chase)
|
||||
P_ResetCamera(thing->player, &camera[i]);
|
||||
R_ResetViewInterpolation(i + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
// don't run in place after a teleport
|
||||
|
|
|
|||
|
|
@ -216,6 +216,14 @@ void R_ResetViewInterpolation(UINT8 p)
|
|||
}
|
||||
}
|
||||
|
||||
void R_RelativeTeleportViewInterpolation(UINT8 p, fixed_t xdiff, fixed_t ydiff, fixed_t zdiff, angle_t angdiff)
|
||||
{
|
||||
pview_old[p].x += xdiff;
|
||||
pview_old[p].y += ydiff;
|
||||
pview_old[p].z += zdiff;
|
||||
pview_old[p].angle += angdiff;
|
||||
}
|
||||
|
||||
void R_SetViewContext(enum viewcontext_e _viewcontext)
|
||||
{
|
||||
UINT8 i = 0;
|
||||
|
|
|
|||
|
|
@ -130,6 +130,8 @@ void R_InterpolateViewRollAngle(fixed_t frac);
|
|||
void R_UpdateViewInterpolation(void);
|
||||
// Reset the view states (e.g. after level load) so R_InterpolateView doesn't interpolate invalid data
|
||||
void R_ResetViewInterpolation(UINT8 p);
|
||||
// Update old view for seamless relative teleport
|
||||
void R_RelativeTeleportViewInterpolation(UINT8 p, fixed_t xdiff, fixed_t ydiff, fixed_t zdiff, angle_t angdiff);
|
||||
// Set the current view context (the viewvars pointed to by newview)
|
||||
void R_SetViewContext(enum viewcontext_e _viewcontext);
|
||||
|
||||
|
|
|
|||
|
|
@ -1090,10 +1090,10 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"toada", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"}, // Arid Sands Toad scream
|
||||
{"gemhit", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"}, // Opulence gem/coin tumbling
|
||||
{"bsnipe", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Sniped"}, // Banana sniping
|
||||
{"join", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Player joined server
|
||||
{"leave", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Player left server
|
||||
{"requst", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Got a Discord join request
|
||||
{"syfail", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Funny sync failure
|
||||
{"join", true, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Player joined server
|
||||
{"leave", true, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Player left server
|
||||
{"requst", true, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Got a Discord join request
|
||||
{"syfail", true, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Funny sync failure
|
||||
{"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // :shitsfree:
|
||||
{"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Debug notification
|
||||
{"typri1", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // SA2 boss typewriting 1
|
||||
|
|
|
|||
|
|
@ -102,9 +102,10 @@ virtlump_t* vres_Find(const virtres_t*, const char*);
|
|||
// =========================================================================
|
||||
|
||||
#define MAX_WADPATH 512
|
||||
#define MAX_WADFILES 127 // maximum of wad files used at the same time
|
||||
// Replay code relies on it being an UINT8 and, just to be safe, in case some wad counter somewhere is a SINT8, you should NOT go above 127 here if you're lazy like me.
|
||||
// Besides, are there truly 127 wads worth your interrest?
|
||||
#define MAX_WADFILES 255 // maximum of wad files used at the same time
|
||||
// Replay code relies on it being an UINT8. There are no SINT8s handling WAD indices, though.
|
||||
// Can be set all the way up to 255 but not 256,
|
||||
// because an UINT8 will never be >= 256, probably breaking some conditionals.
|
||||
|
||||
#define lumpcache_t void *
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue