I've spent the last 3 or so hours just trying to get a feel as to how to even begin approaching this task but I think it's just way beyond my understanding, I don't have enough experience with big C / C++ projects to know if its just me or if this project being 2 decades running makes it a freak of nature but I'm just barely holding on here and not seeing any results, so nuts to it for now.

This commit is contained in:
Jack 2024-09-01 14:50:27 +01:00
parent 902b2d5f9a
commit 6125572b63
4 changed files with 18 additions and 6 deletions

View file

@ -1195,7 +1195,7 @@ static void HWR_GetBlendedTexture(patch_t *patch, patch_t *blendpatch, INT32 ski
static boolean HWR_AllowModel(mobj_t *mobj)
{
// Don't allow rendering of model for these.
if (mobj->sprite2 == SPR2_XTRA || mobj->sprite2 == SPR2_SIGN || mobj->sprite2 == SPR2_SIGL || mobj->sprite2 == SPR2_SSIG || mobj->sprite2 == SPR2_TALK)
if (mobj->sprite2 == SPR2_XTRA || mobj->sprite2 == SPR2_SIGN || mobj->sprite2 == SPR2_SIGL || mobj->sprite2 == SPR2_SSIG || mobj->sprite2 == SPR2_TALK || mobj->sprite2 == SPR2_DKRT) // TODO: Remove SPR2_DKRT from this list of clauses once player-specific destroyed karts have an associated model
return false;
// Otherwise, render the model.

View file

@ -839,6 +839,7 @@ playersprite_t spr2defaults[NUMPLAYERSPRITES] = {
SPR2_SIGN, // SPR2_SSIG
0, // SPR2_XTRA
0, // SPR2_TALK
0, // SPR2_DKRT
};
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
@ -902,7 +903,7 @@ state_t states[NUMSTATES] =
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_OBJPLACE_DUMMY}, // S_OBJPLACE_DUMMY
{SPR_KART, 0, -1, {NULL}, 0, 0, S_NULL}, // S_KART_LEFTOVER
{SPR_DIEF, 0, -1, {NULL}, 0, 0, S_NULL}, // S_KART_LEFTOVER_NOTIRES
{SPR_DIEF, SPR2_DKRT, -1, {NULL}, 0, 0, S_NULL}, // S_KART_LEFTOVER_NOTIRES
{SPR_TIRE, 0, -1, {NULL}, 0, 0, S_NULL}, // S_KART_TIRE1
{SPR_TIRE, 1, -1, {NULL}, 0, 0, S_NULL}, // S_KART_TIRE2

View file

@ -1329,6 +1329,7 @@ typedef enum playersprite
SPR2_SIGN, SPR2_SIGL, SPR2_SSIG,
SPR2_XTRA,
SPR2_TALK,
SPR2_DKRT,
SPR2_FIRSTFREESLOT,
SPR2_LASTFREESLOT = 0x7f,

View file

@ -328,11 +328,21 @@ struct Kart : Mobj
if (Mobj* p = player(); Mobj::valid(p))
{
if (p->player && skins[p->player->skin].flags & SF_BADNIK)
if (p->player)
{
P_SpawnBadnikExplosion(p);
p->spritescale({2*FRACUNIT, 2*FRACUNIT});
p->flags |= MF_NOSQUISH;
skin = (&skins[p->player->skin]);
color = (p->player->skincolor);
// it's necessary to refresh SPR2 on skin changes.
state(S_KART_LEFTOVER_NOTIRES);
sprite2 = (P_GetSkinSprite2(static_cast<skin_t*>(skin), SPR2_DKRT, NULL));;
if(skins[p->player->skin].flags & SF_BADNIK){
P_SpawnBadnikExplosion(p);
p->spritescale({2*FRACUNIT, 2*FRACUNIT});
p->flags |= MF_NOSQUISH;
}
}
p->state(S_KART_DEAD);