Merge branch 'the-scary-22-merge' of https://git.do.srb2.org/KartKrew/Kart into the-scary-22-merge

This commit is contained in:
SteelT 2020-10-02 15:31:12 -04:00
commit 542f1cc470
5 changed files with 19 additions and 14 deletions

View file

@ -6259,7 +6259,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_SIGN_BACK", "S_SIGN_BACK",
"S_SIGN_SIDE", "S_SIGN_SIDE",
"S_SIGN_FACE", "S_SIGN_FACE",
"S_SIGN_DEFAULT", "S_SIGN_ERROR",
// Spike Ball // Spike Ball
"S_SPIKEBALL1", "S_SPIKEBALL1",

View file

@ -1889,7 +1889,7 @@ state_t states[NUMSTATES] =
{SPR_SIGN, 1|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_BACK {SPR_SIGN, 1|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_BACK
{SPR_SIGN, 2|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_SIDE {SPR_SIGN, 2|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_SIDE
{SPR_SIGN, 3|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_FACE {SPR_SIGN, 3|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_FACE
{SPR_SIGN, 4|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_DEFAULT {SPR_SIGN, 19|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN_DEFAULT
// Spike Ball // Spike Ball
{SPR_SPIK, 0, 1, {NULL}, 0, 0, S_SPIKEBALL2}, // S_SPIKEBALL1 {SPR_SPIK, 0, 1, {NULL}, 0, 0, S_SPIKEBALL2}, // S_SPIKEBALL1

View file

@ -2100,7 +2100,7 @@ typedef enum state
S_SIGN_BACK, S_SIGN_BACK,
S_SIGN_SIDE, S_SIGN_SIDE,
S_SIGN_FACE, S_SIGN_FACE,
S_SIGN_DEFAULT, S_SIGN_ERROR,
// Spike Ball // Spike Ball
S_SPIKEBALL1, S_SPIKEBALL1,

View file

@ -7133,7 +7133,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
mobj->momz = 0; mobj->momz = 0;
mobj->movecount = 2; mobj->movecount = 2;
newskin = ((skin_t*)mobj->target->skin)-skins; newskin = ((skin_t*)mobj->target->skin) - skins;
newcolor = mobj->target->player->skincolor; newcolor = mobj->target->player->skincolor;
} }
else else
@ -7161,7 +7161,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
{ {
if (ticstilimpact <= 8) if (ticstilimpact <= 8)
{ {
newskin = mobj->target->player->skin; newskin = ((skin_t*)mobj->target->skin) - skins;
newcolor = mobj->target->player->skincolor; newcolor = mobj->target->player->skincolor;
} }
else else
@ -7184,14 +7184,14 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
if (plistlen <= 1) if (plistlen <= 1)
{ {
// Default to the winner // Default to the winner
newskin = mobj->target->player->skin; newskin = ((skin_t*)mobj->target->skin) - skins;
newcolor = mobj->target->player->skincolor; newcolor = mobj->target->player->skincolor;
} }
else else
{ {
// Pick another player in the server! // Pick another player in the server!
player_t *p = &players[plist[P_RandomKey(plistlen)]]; player_t *p = &players[plist[P_RandomKey(plistlen)]];
newskin = p->skin; newskin = ((skin_t*)p->mo->skin) - skins;
newcolor = p->skincolor; newcolor = p->skincolor;
} }
} }
@ -7224,10 +7224,15 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
amt += 1; amt += 1;
if (newskin != -1) if (newskin != -1)
{
cur->skin = &skins[newskin]; cur->skin = &skins[newskin];
if (newcolor != SKINCOLOR_NONE)
cur->color = newcolor; cur->color = newcolor;
}
}
else if (cur->state == &states[S_SIGN_ERROR])
{
z += (5*mobj->scale);
amt += 1;
} }
P_TeleportMove( P_TeleportMove(

View file

@ -3896,7 +3896,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
} }
} }
static void P_SetupSignObject(mobj_t *sign, mobj_t *pmo) static void P_SetupSignObject(mobj_t *sign, mobj_t *pmo, boolean error)
{ {
mobj_t *cur = sign, *prev = NULL; mobj_t *cur = sign, *prev = NULL;
@ -3925,7 +3925,7 @@ static void P_SetupSignObject(mobj_t *sign, mobj_t *pmo)
cur->hnext = P_SpawnMobj(sign->x, sign->y, sign->z, MT_SIGN_PIECE); cur->hnext = P_SpawnMobj(sign->x, sign->y, sign->z, MT_SIGN_PIECE);
P_SetTarget(&cur->hnext->target, sign); P_SetTarget(&cur->hnext->target, sign);
cur->hnext->skin = pmo->skin; cur->hnext->skin = pmo->skin;
P_SetMobjState(cur->hnext, S_KART_SIGN); P_SetMobjState(cur->hnext, (error == true) ? S_SIGN_ERROR : S_KART_SIGN);
cur->hnext->extravalue1 = 7; cur->hnext->extravalue1 = 7;
cur->hnext->extravalue2 = 0; cur->hnext->extravalue2 = 0;
@ -3991,7 +3991,7 @@ void P_SetupSignExit(player_t *player)
if (thing->state != &states[thing->info->spawnstate]) if (thing->state != &states[thing->info->spawnstate])
continue; continue;
P_SetupSignObject(thing, player->mo); P_SetupSignObject(thing, player->mo, false);
++numfound; ++numfound;
} }
@ -4012,7 +4012,7 @@ void P_SetupSignExit(player_t *player)
if (thing->state != &states[thing->info->spawnstate]) if (thing->state != &states[thing->info->spawnstate])
continue; continue;
P_SetupSignObject(thing, player->mo); P_SetupSignObject(thing, player->mo, false);
++numfound; ++numfound;
} }
@ -4024,7 +4024,7 @@ void P_SetupSignExit(player_t *player)
{ {
thing = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->floorz, MT_SIGN); thing = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->floorz, MT_SIGN);
thing->angle = player->mo->angle; thing->angle = player->mo->angle;
P_SetupSignObject(thing, player->mo); P_SetupSignObject(thing, player->mo, true); // Use :youfuckedup: sign face
} }
} }