only allow director toggling with button when you spec someone
This commit is contained in:
1 parent
0daf5e0da9
commit
9440aa62ff
4 files changed
+14
-1
No files matched your search
@@ -1857,7 +1857,6 @@ boolean G_Responder(event_t *ev)
|
||||
|| ev->data1 == gamecontrol[gc_director][1])
|
||||
{
|
||||
K_ToggleDirector();
|
||||
directortoggletimer = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -395,10 +395,15 @@ void K_UpdateDirector(void)
|
||||
|
||||
void K_ToggleDirector(void)
|
||||
{
|
||||
if (!directortextactive)
|
||||
return;
|
||||
|
||||
if (!K_DirectorIsEnabled())
|
||||
{
|
||||
directorinfo.cooldown = 0; // switch immediately
|
||||
}
|
||||
|
||||
directortoggletimer = 0;
|
||||
|
||||
COM_ImmedExecute("add director 1");
|
||||
}
|
||||
@@ -155,6 +155,8 @@ static patch_t *envelope;
|
||||
player_t *stplyr;
|
||||
UINT8 stplyrnum;
|
||||
|
||||
boolean directortextactive = false;
|
||||
|
||||
// SRB2kart
|
||||
|
||||
hudinfo_t hudinfo[NUMHUDITEMS] =
|
||||
@@ -661,6 +663,8 @@ static void ST_overlayDrawer(void)
|
||||
|
||||
snprintf(directortext, 20, "Director: %s", cv_director.value ? "On" : "Off");
|
||||
|
||||
directortextactive = true;
|
||||
|
||||
if ((!demo.playback && directortoggletimer < 13*TICRATE) || (demo.playback && directortoggletimer < 4*TICRATE))
|
||||
{
|
||||
if (renderisnewtic)
|
||||
@@ -673,7 +677,10 @@ static void ST_overlayDrawer(void)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
directortoggletimer = 0;
|
||||
directortextactive = false;
|
||||
}
|
||||
|
||||
if (cv_showviewpointtext.value)
|
||||
{
|
||||
|
||||
@@ -146,4 +146,6 @@ extern UINT16 objectsdrawn;
|
||||
extern consvar_t cv_lessflicker;
|
||||
extern consvar_t cv_stagetitle;
|
||||
|
||||
extern boolean directortextactive;
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user