Merge branch 'ufo-health-fix' into 'master'

Sealed Stars: fix UFODebugSetHealth always running

Closes #686

See merge request KartKrew/Kart!1501
This commit is contained in:
toaster 2023-09-16 19:32:21 +00:00
commit 8eb5115b8e
2 changed files with 7 additions and 4 deletions

View file

@ -803,7 +803,7 @@ consvar_t cv_restrictskinchange = OnlineCheat("restrictskinchange", "Yes").yes_n
consvar_t cv_spbtest = OnlineCheat("spbtest", "Off").on_off().description("SPB can never target a player");
consvar_t cv_timescale = OnlineCheat(cvlist_timer)("timescale", "1.0").floating_point().min_max(FRACUNIT/20, 20*FRACUNIT).description("Overclock or slow down the game");
consvar_t cv_ufo_follow = OnlineCheat("ufo_follow", "0").min_max(0, MAXPLAYERS).description("Make UFO Catcher folow this player");
consvar_t cv_ufo_health = OnlineCheat("ufo_health", "100").min_max(0, 100).description("Override UFO Catcher health -- applied at spawn or when value is changed");
consvar_t cv_ufo_health = OnlineCheat("ufo_health", "-1").min_max(-1, 100).description("Override UFO Catcher health -- applied at spawn or when value is changed");
//

View file

@ -580,8 +580,11 @@ void Obj_SpecialUFOThinker(mobj_t *ufo)
{
{
extern consvar_t cv_ufo_health;
if (cv_ufo_health.value != -1)
{
UFODebugSetHealth(ufo, cv_ufo_health.value);
}
}
UFOMove(ufo);
UFOUpdateAngle(ufo);