fade director hud after 4 secs after toggling it
This commit is contained in:
1 parent
9448a98573
commit
847b1f5cb7
3 files changed
+16
-1
No files matched your search
@@ -339,6 +339,7 @@ INT16 prevmap, nextmap;
|
||||
// save if director is enabled
|
||||
// so demos can disable it by default and restore it after
|
||||
static int directorstate = 0;
|
||||
tic_t directortoggletimer = 0;
|
||||
|
||||
static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}};
|
||||
consvar_t cv_recordmultiplayerdemos = {"netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
@@ -1947,6 +1948,7 @@ boolean G_Responder(event_t *ev)
|
||||
|| ev->data1 == gamecontrol[gc_director][1])
|
||||
{
|
||||
K_ToggleDirector();
|
||||
directortoggletimer = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -218,6 +218,8 @@ extern angle_t localangle[MAXSPLITSCREENPLAYERS];
|
||||
extern INT32 localaiming[MAXSPLITSCREENPLAYERS]; // should be an angle_t but signed
|
||||
extern boolean camspin[MAXSPLITSCREENPLAYERS]; // SRB2Kart
|
||||
|
||||
extern tic_t directortoggletimer;
|
||||
|
||||
//
|
||||
// GAME
|
||||
//
|
||||
|
||||
+12
-1
@@ -28,6 +28,9 @@
|
||||
#include "m_menu.h"
|
||||
#include "m_cheat.h"
|
||||
#include "p_setup.h" // NiGHTS grading
|
||||
|
||||
#include "i_time.h"
|
||||
|
||||
#include "k_kart.h" // SRB2kart
|
||||
|
||||
//random index
|
||||
@@ -665,8 +668,16 @@ static void ST_overlayDrawer(void)
|
||||
|
||||
snprintf(directortext, 20, "Director: %s", cv_director.value ? "On" : "Off");
|
||||
|
||||
V_DrawString(1, BASEVIDHEIGHT-8-1, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANSHALF|V_ALLOWLOWERCASE, directortext);
|
||||
if (directortoggletimer < (I_GetTime() + 40 * TICRATE) % I_GetTime())
|
||||
{
|
||||
V_DrawString(1, BASEVIDHEIGHT-8-1, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANSHALF|V_ALLOWLOWERCASE, directortext);
|
||||
directortoggletimer++;
|
||||
}
|
||||
else if (cv_translucenthud.value != 0)
|
||||
V_DrawString(1, BASEVIDHEIGHT-8-1, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_80TRANS|V_ALLOWLOWERCASE, directortext); // idk if V_80TRANS is good?
|
||||
}
|
||||
else
|
||||
directortoggletimer = 0;
|
||||
|
||||
if (cv_showviewpointtext.value)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user