mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Add hud-tracked context help for Bubble Trap and Garden Top
This commit is contained in:
parent
f26b7bc7f7
commit
9ee58e4f7e
4 changed files with 56 additions and 2 deletions
|
|
@ -232,6 +232,8 @@ private:
|
||||||
|
|
||||||
case MT_BATTLEUFO_SPAWNER:
|
case MT_BATTLEUFO_SPAWNER:
|
||||||
case MT_WAYPOINT:
|
case MT_WAYPOINT:
|
||||||
|
case MT_BUBBLESHIELD:
|
||||||
|
case MT_GARDENTOP:
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -341,11 +343,31 @@ bool is_object_tracking_target(const mobj_t* mobj)
|
||||||
case MT_WAYPOINT:
|
case MT_WAYPOINT:
|
||||||
return cv_kartdebugwaypoints.value;
|
return cv_kartdebugwaypoints.value;
|
||||||
|
|
||||||
|
case MT_BUBBLESHIELDTRAP:
|
||||||
|
return mobj->tracer && !P_MobjWasRemoved(mobj->tracer) && mobj->tracer->player && P_IsDisplayPlayer(mobj->tracer->player);
|
||||||
|
|
||||||
|
case MT_GARDENTOP:
|
||||||
|
return Obj_GardenTopPlayerNeedsHelp(mobj);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool can_object_be_offscreen(const mobj_t* mobj)
|
||||||
|
{
|
||||||
|
switch (mobj->type)
|
||||||
|
{
|
||||||
|
// You can see this, you fucking liar
|
||||||
|
case MT_GARDENTOP:
|
||||||
|
case MT_BUBBLESHIELDTRAP:
|
||||||
|
return false;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Visibility is_object_visible(const mobj_t* mobj)
|
Visibility is_object_visible(const mobj_t* mobj)
|
||||||
{
|
{
|
||||||
switch (mobj->type)
|
switch (mobj->type)
|
||||||
|
|
@ -381,7 +403,7 @@ void K_DrawTargetTracking(const TargetTracking& target)
|
||||||
const trackingResult_t& result = target.result;
|
const trackingResult_t& result = target.result;
|
||||||
int32_t timer = 0;
|
int32_t timer = 0;
|
||||||
|
|
||||||
if (result.onScreen == false)
|
if (can_object_be_offscreen(target.mobj) && result.onScreen == false)
|
||||||
{
|
{
|
||||||
// Off-screen, draw alongside the borders of the screen.
|
// Off-screen, draw alongside the borders of the screen.
|
||||||
// Probably the most complicated thing.
|
// Probably the most complicated thing.
|
||||||
|
|
@ -578,7 +600,7 @@ void K_DrawTargetTracking(const TargetTracking& target)
|
||||||
.align(Draw::Align::kCenter);
|
.align(Draw::Align::kCenter);
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (target.mobj->type) // debug
|
switch (target.mobj->type)
|
||||||
{
|
{
|
||||||
case MT_BATTLEUFO_SPAWNER:
|
case MT_BATTLEUFO_SPAWNER:
|
||||||
debug().text("BUFO ID: {}", Obj_BattleUFOSpawnerID(target.mobj));
|
debug().text("BUFO ID: {}", Obj_BattleUFOSpawnerID(target.mobj));
|
||||||
|
|
@ -592,6 +614,21 @@ void K_DrawTargetTracking(const TargetTracking& target)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MT_BUBBLESHIELDTRAP:
|
||||||
|
Draw(FixedToFloat(result.x), FixedToFloat(result.y))
|
||||||
|
.flags(V_SPLITSCREEN)
|
||||||
|
.font(Draw::Font::kMenu)
|
||||||
|
.align(Draw::Align::kCenter)
|
||||||
|
.text(((leveltime/3)%2) ? "\x93 " : " \x92");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MT_GARDENTOP:
|
||||||
|
Draw(FixedToFloat(result.x), FixedToFloat(result.y))
|
||||||
|
.flags(V_SPLITSCREEN)
|
||||||
|
.font(Draw::Font::kMenu)
|
||||||
|
.align(Draw::Align::kCenter)
|
||||||
|
.text("Try \xA7!");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ void Obj_GardenTopThink(mobj_t *top);
|
||||||
void Obj_GardenTopSparkThink(mobj_t *spark);
|
void Obj_GardenTopSparkThink(mobj_t *spark);
|
||||||
void Obj_GardenTopArrowThink(mobj_t *arrow);
|
void Obj_GardenTopArrowThink(mobj_t *arrow);
|
||||||
boolean Obj_GardenTopPlayerIsGrinding(const player_t *player);
|
boolean Obj_GardenTopPlayerIsGrinding(const player_t *player);
|
||||||
|
boolean Obj_GardenTopPlayerNeedsHelp(const mobj_t *top);
|
||||||
|
|
||||||
/* Shrink */
|
/* Shrink */
|
||||||
void Obj_PohbeeThinker(mobj_t *pohbee);
|
void Obj_PohbeeThinker(mobj_t *pohbee);
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ enum {
|
||||||
#define top_waveangle(o) ((o)->movedir)
|
#define top_waveangle(o) ((o)->movedir)
|
||||||
/* wavepause will take mobjinfo reactiontime automatically */
|
/* wavepause will take mobjinfo reactiontime automatically */
|
||||||
#define top_wavepause(o) ((o)->reactiontime)
|
#define top_wavepause(o) ((o)->reactiontime)
|
||||||
|
#define top_helpme(o) ((o)->cusval)
|
||||||
|
|
||||||
#define spark_top(o) ((o)->target)
|
#define spark_top(o) ((o)->target)
|
||||||
#define spark_angle(o) ((o)->movedir)
|
#define spark_angle(o) ((o)->movedir)
|
||||||
|
|
@ -133,6 +134,7 @@ init_top
|
||||||
top_float(top) = 0;
|
top_float(top) = 0;
|
||||||
top_sound(top) = sfx_None;
|
top_sound(top) = sfx_None;
|
||||||
top_waveangle(top) = 0;
|
top_waveangle(top) = 0;
|
||||||
|
top_helpme(top) = (mode == TOP_ANCHORED) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -191,6 +193,8 @@ spawn_grind_spark (mobj_t *top)
|
||||||
player = get_rider_player(rider);
|
player = get_rider_player(rider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
top_helpme(top) = 0;
|
||||||
|
|
||||||
spark = P_SpawnMobjFromMobj(
|
spark = P_SpawnMobjFromMobj(
|
||||||
top, x, y, 0, MT_DRIFTSPARK);
|
top, x, y, 0, MT_DRIFTSPARK);
|
||||||
|
|
||||||
|
|
@ -687,3 +691,9 @@ Obj_GardenTopPlayerIsGrinding (const player_t *player)
|
||||||
|
|
||||||
return top ? is_top_grinding(top) : false;
|
return top ? is_top_grinding(top) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean
|
||||||
|
Obj_GardenTopPlayerNeedsHelp (const mobj_t *top)
|
||||||
|
{
|
||||||
|
return top ? top_helpme(top) : false;
|
||||||
|
}
|
||||||
|
|
@ -5359,6 +5359,12 @@ static boolean P_IsTrackerType(INT32 type)
|
||||||
case MT_WAYPOINT: // debug
|
case MT_WAYPOINT: // debug
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case MT_BUBBLESHIELDTRAP: // Mash prompt
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case MT_GARDENTOP: // Frey
|
||||||
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue