mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Error icon for when a map is missing its signpost
This commit is contained in:
parent
062ea7e430
commit
884eb3d515
5 changed files with 19 additions and 14 deletions
|
|
@ -6259,7 +6259,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_SIGN_BACK",
|
||||
"S_SIGN_SIDE",
|
||||
"S_SIGN_FACE",
|
||||
"S_SIGN_DEFAULT",
|
||||
"S_SIGN_ERROR",
|
||||
|
||||
// Spike Ball
|
||||
"S_SPIKEBALL1",
|
||||
|
|
|
|||
|
|
@ -1889,7 +1889,7 @@ state_t states[NUMSTATES] =
|
|||
{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, 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
|
||||
{SPR_SPIK, 0, 1, {NULL}, 0, 0, S_SPIKEBALL2}, // S_SPIKEBALL1
|
||||
|
|
|
|||
|
|
@ -2100,7 +2100,7 @@ typedef enum state
|
|||
S_SIGN_BACK,
|
||||
S_SIGN_SIDE,
|
||||
S_SIGN_FACE,
|
||||
S_SIGN_DEFAULT,
|
||||
S_SIGN_ERROR,
|
||||
|
||||
// Spike Ball
|
||||
S_SPIKEBALL1,
|
||||
|
|
|
|||
15
src/p_mobj.c
15
src/p_mobj.c
|
|
@ -7161,7 +7161,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
{
|
||||
if (ticstilimpact <= 8)
|
||||
{
|
||||
newskin = mobj->target->player->skin;
|
||||
newskin = ((skin_t*)mobj->target->skin) - skins;
|
||||
newcolor = mobj->target->player->skincolor;
|
||||
}
|
||||
else
|
||||
|
|
@ -7184,14 +7184,14 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
if (plistlen <= 1)
|
||||
{
|
||||
// Default to the winner
|
||||
newskin = mobj->target->player->skin;
|
||||
newskin = ((skin_t*)mobj->target->skin) - skins;
|
||||
newcolor = mobj->target->player->skincolor;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pick another player in the server!
|
||||
player_t *p = &players[plist[P_RandomKey(plistlen)]];
|
||||
newskin = p->skin;
|
||||
newskin = ((skin_t*)p->mo->skin) - skins;
|
||||
newcolor = p->skincolor;
|
||||
}
|
||||
}
|
||||
|
|
@ -7224,11 +7224,16 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
amt += 1;
|
||||
|
||||
if (newskin != -1)
|
||||
{
|
||||
cur->skin = &skins[newskin];
|
||||
|
||||
if (newcolor != SKINCOLOR_NONE)
|
||||
cur->color = newcolor;
|
||||
}
|
||||
}
|
||||
else if (cur->state == &states[S_SIGN_ERROR])
|
||||
{
|
||||
z += (5*mobj->scale);
|
||||
amt += 1;
|
||||
}
|
||||
|
||||
P_TeleportMove(
|
||||
cur,
|
||||
|
|
|
|||
10
src/p_spec.c
10
src/p_spec.c
|
|
@ -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;
|
||||
|
||||
|
|
@ -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);
|
||||
P_SetTarget(&cur->hnext->target, sign);
|
||||
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->extravalue2 = 0;
|
||||
|
||||
|
|
@ -3991,7 +3991,7 @@ void P_SetupSignExit(player_t *player)
|
|||
if (thing->state != &states[thing->info->spawnstate])
|
||||
continue;
|
||||
|
||||
P_SetupSignObject(thing, player->mo);
|
||||
P_SetupSignObject(thing, player->mo, false);
|
||||
++numfound;
|
||||
}
|
||||
|
||||
|
|
@ -4012,7 +4012,7 @@ void P_SetupSignExit(player_t *player)
|
|||
if (thing->state != &states[thing->info->spawnstate])
|
||||
continue;
|
||||
|
||||
P_SetupSignObject(thing, player->mo);
|
||||
P_SetupSignObject(thing, player->mo, false);
|
||||
++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->angle = player->mo->angle;
|
||||
P_SetupSignObject(thing, player->mo);
|
||||
P_SetupSignObject(thing, player->mo, true); // Use :youfuckedup: sign face
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue