Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
SRB2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
262
Issues
262
List
Board
Labels
Milestones
Merge Requests
67
Merge Requests
67
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
STJr
SRB2
Commits
0de3a64b
Commit
0de3a64b
authored
Dec 29, 2020
by
LJ Sonic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let Lua toggle the crosshair
parent
0d1050f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
hu_stuff.c
src/hu_stuff.c
+12
-9
lua_hud.h
src/lua_hud.h
+1
-0
lua_hudlib.c
src/lua_hudlib.c
+1
-0
No files found.
src/hu_stuff.c
View file @
0de3a64b
...
...
@@ -2109,15 +2109,18 @@ void HU_Drawer(void)
return
;
// draw the crosshair, not when viewing demos nor with chasecam
if
(
!
automapactive
&&
cv_crosshair
.
value
&&
!
demoplayback
&&
(
!
camera
.
chase
||
ticcmd_ztargetfocus
[
0
])
&&
!
players
[
displayplayer
].
spectator
)
HU_DrawCrosshair
();
if
(
!
automapactive
&&
cv_crosshair2
.
value
&&
!
demoplayback
&&
(
!
camera2
.
chase
||
ticcmd_ztargetfocus
[
1
])
&&
!
players
[
secondarydisplayplayer
].
spectator
)
HU_DrawCrosshair2
();
if
(
LUA_HudEnabled
(
hud_crosshair
))
{
if
(
!
automapactive
&&
cv_crosshair
.
value
&&
!
demoplayback
&&
(
!
camera
.
chase
||
ticcmd_ztargetfocus
[
0
])
&&
!
players
[
displayplayer
].
spectator
)
HU_DrawCrosshair
();
if
(
!
automapactive
&&
cv_crosshair2
.
value
&&
!
demoplayback
&&
(
!
camera2
.
chase
||
ticcmd_ztargetfocus
[
1
])
&&
!
players
[
secondarydisplayplayer
].
spectator
)
HU_DrawCrosshair2
();
}
// draw desynch text
if
(
hu_redownloadinggamestate
)
...
...
src/lua_hud.h
View file @
0de3a64b
...
...
@@ -13,6 +13,7 @@
enum
hud
{
hud_stagetitle
=
0
,
hud_textspectator
,
hud_crosshair
,
// Singleplayer / Co-op
hud_score
,
hud_time
,
...
...
src/lua_hudlib.c
View file @
0de3a64b
...
...
@@ -39,6 +39,7 @@ static UINT8 hudAvailable; // hud hooks field
static
const
char
*
const
hud_disable_options
[]
=
{
"stagetitle"
,
"textspectator"
,
"crosshair"
,
"score"
,
"time"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment