mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Ancient Shrine: Code the rest of the owl
- If a follower with the specific Mystic Melody sound effect (DSMELODY) is used on the Shrine by a local player...
- Activates the shrine after two seconds!
- This is clientside only.
- Stores on the mapheaderinfo's mapvisited record
This commit is contained in:
parent
fe62e76a39
commit
d386800c1e
7 changed files with 68 additions and 9 deletions
|
|
@ -142,7 +142,8 @@ struct skinreference_t
|
||||||
#define MV_BEATEN (1<<1)
|
#define MV_BEATEN (1<<1)
|
||||||
#define MV_ENCORE (1<<2)
|
#define MV_ENCORE (1<<2)
|
||||||
#define MV_SPBATTACK (1<<3)
|
#define MV_SPBATTACK (1<<3)
|
||||||
#define MV_MAX (MV_VISITED|MV_BEATEN|MV_ENCORE|MV_SPBATTACK)
|
#define MV_MYSTICMELODY (1<<4)
|
||||||
|
#define MV_MAX (MV_VISITED|MV_BEATEN|MV_ENCORE|MV_SPBATTACK|MV_MYSTICMELODY)
|
||||||
#define MV_FINISHNEEDED (1<<7)
|
#define MV_FINISHNEEDED (1<<7)
|
||||||
#define MV_PERSISTUNLOADED (MV_SPBATTACK|MV_FINISHNEEDED)
|
#define MV_PERSISTUNLOADED (MV_SPBATTACK|MV_FINISHNEEDED)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8336,7 +8336,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
0, // mass
|
0, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_SCENERY|MF_NOGRAVITY|MF_SOLID|MF_DONTENCOREMAP, // flags
|
MF_NOGRAVITY|MF_SOLID|MF_DONTENCOREMAP, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -729,15 +729,16 @@ void K_FollowerHornTaunt(player_t *taunter, player_t *victim, boolean mysticmelo
|
||||||
|
|
||||||
const follower_t *fl = &followers[taunter->followerskin];
|
const follower_t *fl = &followers[taunter->followerskin];
|
||||||
|
|
||||||
// Check mystic melody special status
|
// Restrict mystic melody special status
|
||||||
if (mysticmelodyspecial == true)
|
if (mysticmelodyspecial == true)
|
||||||
{
|
{
|
||||||
/*mysticmelodyspecial = (fl->hornsound == sfx_melody)
|
mysticmelodyspecial = (
|
||||||
|
(demo.playback == false) // No downloading somebody else's replay
|
||||||
if (mysticmelodyspecial == true)
|
&& (fl->hornsound == sfx_melody) // Must be the Mystic Melody
|
||||||
{
|
&& (taunter->bot == false) // No getting your puppies to do it for you
|
||||||
// Todo: The rest of the owl
|
&& P_IsLocalPlayer(taunter) // Must be in your party
|
||||||
}*/
|
&& !(mapheaderinfo[gamemap-1]->records.mapvisited & MV_MYSTICMELODY) // Not already done
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// More expensive checks
|
// More expensive checks
|
||||||
|
|
@ -758,6 +759,40 @@ void K_FollowerHornTaunt(player_t *taunter, player_t *victim, boolean mysticmelo
|
||||||
mobj_t *honk = taunter->follower->hprev;
|
mobj_t *honk = taunter->follower->hprev;
|
||||||
const fixed_t desiredscale = (2*taunter->mo->scale)/3;
|
const fixed_t desiredscale = (2*taunter->mo->scale)/3;
|
||||||
|
|
||||||
|
if (mysticmelodyspecial == true)
|
||||||
|
{
|
||||||
|
mobj_t *mobj = NULL, *next = NULL;
|
||||||
|
|
||||||
|
for (mobj = trackercap; mobj; mobj = next)
|
||||||
|
{
|
||||||
|
next = mobj->itnext;
|
||||||
|
if (mobj->type != MT_ANCIENTSHRINE)
|
||||||
|
{
|
||||||
|
// Not relevant
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (P_MobjWasRemoved(mobj->tracer) == false)
|
||||||
|
{
|
||||||
|
// Already initiated
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cleverly a mobj type where TypeIsNetSynced is false
|
||||||
|
P_SetTarget(&mobj->tracer, P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_HORNCODE));
|
||||||
|
|
||||||
|
if (P_MobjWasRemoved(mobj->tracer) == true)
|
||||||
|
{
|
||||||
|
// Unrecoverable?!
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is a helper non-netsynced countdown
|
||||||
|
mobj->tracer->renderflags |= RF_DONTDRAW;
|
||||||
|
mobj->tracer->fuse = 2*TICRATE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (P_MobjWasRemoved(honk) == true)
|
if (P_MobjWasRemoved(honk) == true)
|
||||||
{
|
{
|
||||||
honk = P_SpawnMobj(
|
honk = P_SpawnMobj(
|
||||||
|
|
|
||||||
|
|
@ -6392,6 +6392,12 @@ static void M_DrawMapMedals(INT32 mapnum, INT32 x, INT32 y)
|
||||||
}
|
}
|
||||||
x -= 8;
|
x -= 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mapheaderinfo[mapnum]->records.mapvisited & MV_MYSTICMELODY)
|
||||||
|
{
|
||||||
|
V_DrawScaledPatch(x, y, 0, W_CachePatchName("GOTMEL", PU_CACHE));
|
||||||
|
x -= 8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M_DrawStatsMaps(void)
|
static void M_DrawStatsMaps(void)
|
||||||
|
|
|
||||||
15
src/p_mobj.c
15
src/p_mobj.c
|
|
@ -7255,6 +7255,21 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MT_ANCIENTSHRINE:
|
||||||
|
{
|
||||||
|
if (P_MobjWasRemoved(mobj->tracer) == false
|
||||||
|
&& mobj->tracer->fuse == 1)
|
||||||
|
{
|
||||||
|
if (!(mapheaderinfo[gamemap-1]->records.mapvisited & MV_MYSTICMELODY))
|
||||||
|
{
|
||||||
|
mapheaderinfo[gamemap-1]->records.mapvisited |= MV_MYSTICMELODY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mobj->frame = (mapheaderinfo[gamemap-1]->records.mapvisited & MV_MYSTICMELODY) ? 1 : 0;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case MT_FLOATINGITEM:
|
case MT_FLOATINGITEM:
|
||||||
{
|
{
|
||||||
P_ResetPitchRoll(mobj);
|
P_ResetPitchRoll(mobj);
|
||||||
|
|
|
||||||
|
|
@ -1192,6 +1192,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"clawk2", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // SF_X8AWAYSOUND
|
{"clawk2", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // SF_X8AWAYSOUND
|
||||||
|
|
||||||
{"horn00", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"}, // HORNCODE
|
{"horn00", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"}, // HORNCODE
|
||||||
|
{"melody", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"}, // Mystic Melody
|
||||||
{"monch", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
{"monch", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||||
{"etexpl", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Game crash"},
|
{"etexpl", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Game crash"},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1262,6 +1262,7 @@ typedef enum
|
||||||
sfx_clawk2,
|
sfx_clawk2,
|
||||||
|
|
||||||
sfx_horn00,
|
sfx_horn00,
|
||||||
|
sfx_melody,
|
||||||
sfx_monch,
|
sfx_monch,
|
||||||
sfx_etexpl,
|
sfx_etexpl,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue