mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 17:21:34 +00:00
This is a sign
Signpost with the face of the person in 1st falls down at a pre-determined location on race finish (or at the finishing player if none is found)
This commit is contained in:
parent
ec2b4e0dfc
commit
250c61dd00
5 changed files with 87 additions and 7 deletions
|
@ -7218,6 +7218,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_BLUEDIAG",
|
||||
"MT_RANDOMITEM",
|
||||
"MT_RANDOMITEMPOP",
|
||||
"MT_RINGSPARKLE",
|
||||
|
||||
"MT_BOOSTFLAME",
|
||||
"MT_BOOSTSMOKE",
|
||||
|
|
42
src/info.c
42
src/info.c
|
@ -175,14 +175,15 @@ state_t states[NUMSTATES] =
|
|||
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_OBJPLACE_DUMMY}, //S_OBJPLACE_DUMMY
|
||||
|
||||
// 1-Up Box Sprites (uses player sprite)
|
||||
{SPR_PLAY, 35, 2, {NULL}, 0, 16, S_PLAY_BOX2}, // S_PLAY_BOX1
|
||||
// Kart: default to signpost just to ensure there are no missing sprite errors...
|
||||
{SPR_PLAY, 24, 2, {NULL}, 0, 16, S_PLAY_BOX2}, // S_PLAY_BOX1
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_PLAY_BOX1}, // S_PLAY_BOX2
|
||||
{SPR_PLAY, 35, 4, {NULL}, 0, 4, S_PLAY_ICON2}, // S_PLAY_ICON1
|
||||
{SPR_PLAY, 24, 4, {NULL}, 0, 4, S_PLAY_ICON2}, // S_PLAY_ICON1
|
||||
{SPR_NULL, 0, 12, {NULL}, 0, 0, S_PLAY_ICON3}, // S_PLAY_ICON2
|
||||
{SPR_PLAY, 35, 18, {NULL}, 0, 4, S_NULL}, // S_PLAY_ICON3
|
||||
{SPR_PLAY, 24, 18, {NULL}, 0, 4, S_NULL}, // S_PLAY_ICON3
|
||||
|
||||
// Level end sign (uses player sprite)
|
||||
{SPR_PLAY, 34, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN
|
||||
{SPR_PLAY, 24, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN
|
||||
|
||||
// Blue Crawla
|
||||
{SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND
|
||||
|
@ -1090,7 +1091,7 @@ state_t states[NUMSTATES] =
|
|||
{SPR_SIGN, 3, 1, {NULL}, 0, 0, S_SIGN49}, // S_SIGN48
|
||||
{SPR_SIGN, 0, 1, {NULL}, 0, 0, S_SIGN50}, // S_SIGN49
|
||||
{SPR_SIGN, 1, 1, {NULL}, 0, 0, S_SIGN51}, // S_SIGN50
|
||||
{SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN53}, // S_SIGN51
|
||||
{SPR_SIGN, 2, 1, {NULL}, 0, 0, S_SIGN1}, // S_SIGN51
|
||||
{SPR_SIGN, 3, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN52 Eggman
|
||||
{SPR_SIGN, 7, -1, {A_SignPlayer}, 0, 0, S_NULL}, // S_SIGN53 Blank
|
||||
|
||||
|
@ -5796,7 +5797,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
|
||||
{ // MT_SIGN
|
||||
501, // doomednum
|
||||
S_SIGN52, // spawnstate
|
||||
S_INVISIBLE, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_PLAY_SIGN, // seestate
|
||||
sfx_lvpass, // seesound
|
||||
|
@ -5817,7 +5818,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_SCENERY, // flags
|
||||
MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -14402,6 +14403,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_RINGSPARKLE
|
||||
-1, // doomednum
|
||||
S_SPRK1, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
8, // speed
|
||||
14*FRACUNIT, // radius
|
||||
14*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BOOSTFLAME
|
||||
-1, // doomednum
|
||||
S_BOOSTFLAME, // spawnstate
|
||||
|
|
|
@ -4082,6 +4082,7 @@ typedef enum mobj_type
|
|||
MT_BLUEDIAG,
|
||||
MT_RANDOMITEM,
|
||||
MT_RANDOMITEMPOP,
|
||||
MT_RINGSPARKLE,
|
||||
|
||||
MT_BOOSTFLAME,
|
||||
MT_BOOSTSMOKE,
|
||||
|
|
23
src/p_mobj.c
23
src/p_mobj.c
|
@ -1409,6 +1409,9 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
case MT_SINK:
|
||||
gravityadd = FixedMul(gravityadd, 5*FRACUNIT); // Double gravity
|
||||
break;
|
||||
case MT_SIGN:
|
||||
gravityadd /= 3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -8282,6 +8285,26 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case MT_SIGN: // Kart's unique sign behavior
|
||||
if (mobj->movecount)
|
||||
{
|
||||
if (mobj->z <= mobj->movefactor)
|
||||
{
|
||||
P_SetMobjState(mobj, S_SIGN53);
|
||||
//mobj->flags |= MF_NOGRAVITY; // ?
|
||||
mobj->flags &= ~MF_NOCLIPHEIGHT;
|
||||
mobj->movecount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
P_SpawnMobj(mobj->x + (P_RandomRange(-32,32)<<FRACBITS),
|
||||
mobj->y + (P_RandomRange(-32,32)<<FRACBITS),
|
||||
mobj->z + (24<<FRACBITS) + (P_RandomRange(-16,16)<<FRACBITS),
|
||||
MT_RINGSPARKLE);
|
||||
mobj->flags &= ~MF_NOGRAVITY;
|
||||
}
|
||||
}
|
||||
break;
|
||||
//}
|
||||
case MT_TURRET:
|
||||
P_MobjCheckWater(mobj);
|
||||
|
|
27
src/p_spec.c
27
src/p_spec.c
|
@ -3227,6 +3227,11 @@ void P_SetupSignExit(player_t *player)
|
|||
if (thing->info->seesound)
|
||||
S_StartSound(thing, thing->info->seesound);
|
||||
|
||||
// SRB2Kart: Set sign spinning variables
|
||||
thing->movefactor = thing->z;
|
||||
thing->z += (512<<FRACBITS) * P_MobjFlip(thing);
|
||||
thing->movecount = 1;
|
||||
|
||||
++numfound;
|
||||
}
|
||||
|
||||
|
@ -3252,8 +3257,29 @@ void P_SetupSignExit(player_t *player)
|
|||
if (thing->info->seesound)
|
||||
S_StartSound(thing, thing->info->seesound);
|
||||
|
||||
// SRB2Kart: Set sign spinning variables
|
||||
thing->movefactor = thing->z;
|
||||
thing->z += (512<<FRACBITS) * P_MobjFlip(thing);
|
||||
thing->movecount = 1;
|
||||
|
||||
++numfound;
|
||||
}
|
||||
|
||||
if (numfound)
|
||||
return;
|
||||
|
||||
// SRB2Kart: FINALLY, add in an alternative if no place is found
|
||||
if (player->mo)
|
||||
{
|
||||
mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (512<<FRACBITS), MT_SIGN);
|
||||
|
||||
P_SetTarget(&sign->target, player->mo);
|
||||
P_SetMobjState(sign, S_SIGN1);
|
||||
if (sign->info->seesound)
|
||||
S_StartSound(sign, sign->info->seesound);
|
||||
sign->movefactor = player->mo->z;
|
||||
sign->movecount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -4239,6 +4265,7 @@ DoneSection2:
|
|||
S_StartSound(NULL, sfx_s253);
|
||||
|
||||
P_DoPlayerExit(player);
|
||||
P_SetupSignExit(player);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue