mirror of
https://github.com/ENSL/NS.git
synced 2024-11-26 06:20:57 +00:00
Merge pull request #15 from ENSL/pierow-fixes
Various features/fixes - crosshair system, sv_jumpmode, cl_ambientsound...
This commit is contained in:
commit
f64ea6b025
115 changed files with 1403 additions and 164 deletions
5
main/alienofficial.cfg
Normal file
5
main/alienofficial.cfg
Normal file
|
@ -0,0 +1,5 @@
|
|||
//Alien cfg that is part of a default installation on the NS Launcher
|
||||
//Activated by pressing F2 (which also is used to join aliens)
|
||||
|
||||
//bind "mouse2" "+movement"
|
||||
//psoff
|
Binary file not shown.
|
@ -6,10 +6,7 @@ bind "TAB" "+showscores"
|
|||
bind "ENTER" "messagemode"
|
||||
bind "ESCAPE" "cancelselect"
|
||||
bind "SPACE" "+jump"
|
||||
bind "'" "+moveup"
|
||||
bind "+" "sizeup"
|
||||
bind "," "impulse 123"
|
||||
bind "-" "sizedown"
|
||||
bind "." "impulse 124"
|
||||
bind "/" "impulse 125"
|
||||
bind "0" "slot10"
|
||||
|
@ -22,10 +19,6 @@ bind "6" "slot6"
|
|||
bind "7" "slot7"
|
||||
bind "8" "slot8"
|
||||
bind "9" "slot9"
|
||||
bind ";" "+mlook"
|
||||
bind "=" "sizeup"
|
||||
bind "[" "invprev"
|
||||
bind "]" "invnext"
|
||||
bind "`" "toggleconsole"
|
||||
bind "a" "+moveleft"
|
||||
bind "c" "+showmap"
|
||||
|
@ -35,13 +28,14 @@ bind "f" "impulse 100"
|
|||
bind "g" "impulse 3"
|
||||
bind "l" "impulse 105"
|
||||
bind "q" "lastinv"
|
||||
bind "r" "+reload"
|
||||
bind "r" "+movement"
|
||||
bind "s" "+back"
|
||||
bind "t" "impulse 201"
|
||||
bind "b" "impulse 11"
|
||||
bind "t" "+popupmenu"
|
||||
bind "u" "messagemode2"
|
||||
bind "v" "impulse 9"
|
||||
bind "v" "impulse 10"
|
||||
bind "w" "+forward"
|
||||
bind "x" "impulse 81"
|
||||
bind "x" "impulse 14"
|
||||
bind "y" "messagemode"
|
||||
bind "z" "impulse 80"
|
||||
bind "~" "toggleconsole"
|
||||
|
@ -52,47 +46,50 @@ bind "RIGHTARROW" "+right"
|
|||
bind "ALT" "+voicerecord"
|
||||
bind "CTRL" "+duck"
|
||||
bind "SHIFT" "+speed"
|
||||
bind "F1" "jointeamone"
|
||||
bind "F2" "jointeamtwo"
|
||||
alias "marinecfg" "exec marineofficial.cfg"
|
||||
alias "aliencfg" "exec alienofficial.cfg"
|
||||
bind "F1" "jointeamone;marinecfg"
|
||||
bind "F2" "jointeamtwo;aliencfg"
|
||||
bind "F3" "autoassign"
|
||||
bind "F4" "readyroom"
|
||||
bind "F5" "snapshot"
|
||||
bind "F6" "save quick"
|
||||
bind "F7" "load quick"
|
||||
bind "F10" "quit prompt"
|
||||
bind "INS" "+klook"
|
||||
bind "PGDN" "+lookdown"
|
||||
bind "PGUP" "+lookup"
|
||||
bind "END" "centerview"
|
||||
bind "MWHEELDOWN" "invnext"
|
||||
bind "MWHEELUP" "invprev"
|
||||
bind "MOUSE1" "+attack"
|
||||
bind "MOUSE2" "+popupmenu"
|
||||
bind "MOUSE2" "+movement"
|
||||
bind "MOUSE3" "+popupmenu"
|
||||
bind "MOUSE4" "lastinv"
|
||||
bind "PAUSE" "pause"
|
||||
_snd_mixahead "0.1"
|
||||
ati_npatch "1.0"
|
||||
ati_subdiv "2.0"
|
||||
ati_npatch "0"
|
||||
ati_subdiv "0"
|
||||
bgmvolume "1.000000"
|
||||
bottomcolor "144.889999"
|
||||
brightness "1.000000"
|
||||
brightness "5"
|
||||
cl_allowdownload "1"
|
||||
cl_allowupload "1"
|
||||
cl_autohelp "1.0"
|
||||
cl_buildmessages "1"
|
||||
cl_centerentityid "0.0"
|
||||
cl_cmdbackup "2"
|
||||
cl_cmdrate "30"
|
||||
cl_cmdrate "100"
|
||||
cl_cmhotkeys "qwerasdfzxcv"
|
||||
cl_customcrosshair "0"
|
||||
cl_dlmax "128"
|
||||
cl_download_ingame "1"
|
||||
cl_dynamiclights "1"
|
||||
cl_dynamiclights "0"
|
||||
cl_forcedefaultfov "0"
|
||||
cl_gammaramp "1"
|
||||
cl_gammaramp "0"
|
||||
cl_highdetail "1"
|
||||
cl_himodels "0"
|
||||
cl_iconb "221"
|
||||
cl_icong "149"
|
||||
cl_iconr "0"
|
||||
cl_idealpitchscale "0.8"
|
||||
cl_labelhivesight "1"
|
||||
cl_labelmaps "1"
|
||||
cl_lc "1"
|
||||
cl_logocolor "#Valve_Orange"
|
||||
|
@ -100,24 +97,26 @@ cl_logofile "lambda"
|
|||
cl_lw "1"
|
||||
cl_musicdelay "90"
|
||||
cl_musicdirectory ""
|
||||
cl_musicenabled "1.0"
|
||||
cl_musicvolume "155"
|
||||
cl_musicenabled "0"
|
||||
cl_particleinfo "0"
|
||||
cl_quickselecttime ".15"
|
||||
cl_timeout "60"
|
||||
cl_updaterate "20"
|
||||
cl_updaterate "100"
|
||||
cl_vsmoothing "0.05"
|
||||
con_color "255 180 30"
|
||||
console "1.000000"
|
||||
crosshair "1.000000"
|
||||
fps_max "72.0"
|
||||
crosshair "0"
|
||||
fps_max "250"
|
||||
fps_override "1"
|
||||
fps_modem "0.0"
|
||||
gamma "2.500000"
|
||||
gamma "3"
|
||||
gl_vsync "0"
|
||||
gl_dither "1"
|
||||
gl_flipmatrix "0"
|
||||
gl_fog "1"
|
||||
gl_monolights "0"
|
||||
gl_overbright "0"
|
||||
gl_overbright "1"
|
||||
gl_polyoffset "0.1"
|
||||
hisound "1"
|
||||
hpk_maxsize "4"
|
||||
|
@ -125,7 +124,7 @@ hud_capturemouse "1"
|
|||
hud_centerid "0"
|
||||
hud_classautokill "1"
|
||||
hud_draw "1"
|
||||
hud_fastswitch "0"
|
||||
hud_fastswitch "1"
|
||||
hud_takesshots "0"
|
||||
joystick "0"
|
||||
lookspring "0.000000"
|
||||
|
@ -137,7 +136,7 @@ m_side "0.8"
|
|||
m_yaw "0.022"
|
||||
model "barney"
|
||||
MP3FadeTime "2.0"
|
||||
MP3Volume "0.8"
|
||||
MP3Volume "0"
|
||||
mp_decals "300"
|
||||
name "NSPlayer"
|
||||
net_graph "0"
|
||||
|
@ -162,7 +161,7 @@ s_refdelay "4"
|
|||
s_refgain "0.4"
|
||||
s_rolloff "1.0"
|
||||
s_verbwet "0.25"
|
||||
sensitivity "4.960000"
|
||||
sensitivity "2"
|
||||
skin ""
|
||||
suitvolume "0.250000"
|
||||
sv_aim "0"
|
||||
|
@ -174,7 +173,14 @@ voice_enable "1"
|
|||
voice_forcemicrecord "1"
|
||||
voice_modenable "1"
|
||||
voice_scale "1"
|
||||
volume "0.800000"
|
||||
volume "0.500000"
|
||||
m_rawinput "1"
|
||||
zoom_sensitivity_ratio "1"
|
||||
lightgamma "2"
|
||||
ex_interp "0.05"
|
||||
cl_cross "1"
|
||||
rate "30000"
|
||||
cl_bob "0"
|
||||
|
||||
+mlook
|
||||
+jlook
|
||||
exec userconfig.cfg
|
||||
|
|
BIN
main/dlls/ns.dll
BIN
main/dlls/ns.dll
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.7 KiB |
6
main/marineofficial.cfg
Normal file
6
main/marineofficial.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
//Marine cfg that is part of a default installation on the NS Launcher
|
||||
//Activated by pressing F1 (which also is used to join marines)
|
||||
|
||||
|
||||
//bind "mouse2" "impulse 10"
|
||||
//pson
|
71
main/oldbinds.cfg
Normal file
71
main/oldbinds.cfg
Normal file
|
@ -0,0 +1,71 @@
|
|||
writecfg b4oldbinds
|
||||
unbindall
|
||||
bind "TAB" "+showscores"
|
||||
bind "ENTER" "messagemode"
|
||||
bind "ESCAPE" "cancelselect"
|
||||
bind "SPACE" "+jump"
|
||||
bind "'" "+moveup"
|
||||
bind "+" "sizeup"
|
||||
bind "," "impulse 123"
|
||||
bind "-" "sizedown"
|
||||
bind "." "impulse 124"
|
||||
bind "/" "impulse 125"
|
||||
bind "0" "slot10"
|
||||
bind "1" "slot1"
|
||||
bind "2" "slot2"
|
||||
bind "3" "slot3"
|
||||
bind "4" "slot4"
|
||||
bind "5" "slot5"
|
||||
bind "6" "slot6"
|
||||
bind "7" "slot7"
|
||||
bind "8" "slot8"
|
||||
bind "9" "slot9"
|
||||
bind ";" "+mlook"
|
||||
bind "=" "sizeup"
|
||||
bind "[" "invprev"
|
||||
bind "]" "invnext"
|
||||
bind "`" "toggleconsole"
|
||||
bind "a" "+moveleft"
|
||||
bind "c" "+showmap"
|
||||
bind "d" "+moveright"
|
||||
bind "e" "+use"
|
||||
bind "f" "impulse 100"
|
||||
bind "g" "impulse 3"
|
||||
bind "l" "impulse 105"
|
||||
bind "q" "lastinv"
|
||||
bind "r" "+movement"
|
||||
bind "s" "+back"
|
||||
bind "t" "impulse 201"
|
||||
bind "u" "messagemode2"
|
||||
bind "v" "impulse 9"
|
||||
bind "w" "+forward"
|
||||
bind "x" "impulse 14"
|
||||
bind "y" "messagemode"
|
||||
bind "z" "impulse 7"
|
||||
bind "~" "toggleconsole"
|
||||
bind "UPARROW" "+forward"
|
||||
bind "DOWNARROW" "+back"
|
||||
bind "LEFTARROW" "+left"
|
||||
bind "RIGHTARROW" "+right"
|
||||
bind "ALT" "+voicerecord"
|
||||
bind "CTRL" "+duck"
|
||||
bind "SHIFT" "+speed"
|
||||
bind "F1" "jointeamone"
|
||||
bind "F2" "jointeamtwo"
|
||||
bind "F3" "autoassign"
|
||||
bind "F4" "readyroom"
|
||||
bind "F5" "snapshot"
|
||||
bind "F6" "save quick"
|
||||
bind "F7" "load quick"
|
||||
bind "F10" "quit prompt"
|
||||
bind "INS" "+klook"
|
||||
bind "PGDN" "+lookdown"
|
||||
bind "PGUP" "+lookup"
|
||||
bind "END" "centerview"
|
||||
bind "MWHEELDOWN" "invnext"
|
||||
bind "MWHEELUP" "invprev"
|
||||
bind "MOUSE1" "+attack"
|
||||
bind "MOUSE2" "+popupmenu"
|
||||
bind "MOUSE3" "+popupmenu"
|
||||
bind "MOUSE4" "lastinv"
|
||||
bind "PAUSE" "pause"
|
189
main/olddefaults.cfg
Normal file
189
main/olddefaults.cfg
Normal file
|
@ -0,0 +1,189 @@
|
|||
// This file is overwritten whenever you change your user settings in the game.
|
||||
// Add custom configurations to the file "userconfig.cfg".
|
||||
|
||||
//Backs up current cfg before proceeding.
|
||||
writecfg "backupb4old"
|
||||
|
||||
//NS 3.2 official config.cfg
|
||||
unbindall
|
||||
bind "TAB" "+showscores"
|
||||
bind "ENTER" "messagemode"
|
||||
bind "ESCAPE" "cancelselect"
|
||||
bind "SPACE" "+jump"
|
||||
bind "'" "+moveup"
|
||||
bind "+" "sizeup"
|
||||
bind "," "impulse 123"
|
||||
bind "-" "sizedown"
|
||||
bind "." "impulse 124"
|
||||
bind "/" "impulse 125"
|
||||
bind "0" "slot10"
|
||||
bind "1" "slot1"
|
||||
bind "2" "slot2"
|
||||
bind "3" "slot3"
|
||||
bind "4" "slot4"
|
||||
bind "5" "slot5"
|
||||
bind "6" "slot6"
|
||||
bind "7" "slot7"
|
||||
bind "8" "slot8"
|
||||
bind "9" "slot9"
|
||||
bind ";" "+mlook"
|
||||
bind "=" "sizeup"
|
||||
bind "[" "invprev"
|
||||
bind "]" "invnext"
|
||||
bind "`" "toggleconsole"
|
||||
bind "a" "+moveleft"
|
||||
bind "c" "+showmap"
|
||||
bind "d" "+moveright"
|
||||
bind "e" "+use"
|
||||
bind "f" "impulse 100"
|
||||
bind "g" "impulse 3"
|
||||
bind "l" "impulse 105"
|
||||
bind "q" "lastinv"
|
||||
bind "r" "+movement"
|
||||
bind "s" "+back"
|
||||
bind "t" "impulse 201"
|
||||
bind "u" "messagemode2"
|
||||
bind "v" "impulse 9"
|
||||
bind "w" "+forward"
|
||||
bind "x" "impulse 14"
|
||||
bind "y" "messagemode"
|
||||
bind "z" "impulse 7"
|
||||
bind "~" "toggleconsole"
|
||||
bind "UPARROW" "+forward"
|
||||
bind "DOWNARROW" "+back"
|
||||
bind "LEFTARROW" "+left"
|
||||
bind "RIGHTARROW" "+right"
|
||||
bind "ALT" "+voicerecord"
|
||||
bind "CTRL" "+duck"
|
||||
bind "SHIFT" "+speed"
|
||||
bind "F1" "jointeamone"
|
||||
bind "F2" "jointeamtwo"
|
||||
bind "F3" "autoassign"
|
||||
bind "F4" "readyroom"
|
||||
bind "F5" "snapshot"
|
||||
bind "F6" "save quick"
|
||||
bind "F7" "load quick"
|
||||
bind "F10" "quit prompt"
|
||||
bind "INS" "+klook"
|
||||
bind "PGDN" "+lookdown"
|
||||
bind "PGUP" "+lookup"
|
||||
bind "END" "centerview"
|
||||
bind "MWHEELDOWN" "invnext"
|
||||
bind "MWHEELUP" "invprev"
|
||||
bind "MOUSE1" "+attack"
|
||||
bind "MOUSE2" "+popupmenu"
|
||||
bind "MOUSE3" "+popupmenu"
|
||||
bind "MOUSE4" "lastinv"
|
||||
bind "PAUSE" "pause"
|
||||
_snd_mixahead "0.1"
|
||||
ati_npatch "1.0"
|
||||
ati_subdiv "2.0"
|
||||
bgmvolume "1.000000"
|
||||
bottomcolor "144.889999"
|
||||
brightness "1.000000"
|
||||
cl_allowdownload "1"
|
||||
cl_allowupload "1"
|
||||
cl_autohelp "1.0"
|
||||
cl_buildmessages "1"
|
||||
cl_centerentityid "0.0"
|
||||
cl_cmdbackup "2"
|
||||
cl_cmdrate "30"
|
||||
cl_cmhotkeys "qwerasdfzxcv"
|
||||
cl_customcrosshair "1"
|
||||
cl_dlmax "128"
|
||||
cl_download_ingame "1"
|
||||
cl_dynamiclights "1"
|
||||
cl_forcedefaultfov "0"
|
||||
cl_gammaramp "1"
|
||||
cl_highdetail "1"
|
||||
cl_himodels "0"
|
||||
cl_iconb "221"
|
||||
cl_icong "149"
|
||||
cl_iconr "0"
|
||||
cl_idealpitchscale "0.8"
|
||||
cl_labelhivesight "1"
|
||||
cl_labelmaps "1"
|
||||
cl_lc "1"
|
||||
cl_logocolor "#Valve_Orange"
|
||||
cl_logofile "lambda"
|
||||
cl_lw "1"
|
||||
cl_musicdelay "90"
|
||||
cl_musicdirectory ""
|
||||
cl_musicenabled "1.0"
|
||||
cl_musicvolume "155"
|
||||
cl_particleinfo "0"
|
||||
cl_quickselecttime ".15"
|
||||
cl_timeout "60"
|
||||
cl_updaterate "20"
|
||||
cl_vsmoothing "0.05"
|
||||
con_color "255 180 30"
|
||||
console "1.000000"
|
||||
crosshair "1.000000"
|
||||
fps_max "72.0"
|
||||
fps_modem "0.0"
|
||||
gamma "2.500000"
|
||||
gl_dither "1"
|
||||
gl_flipmatrix "0"
|
||||
gl_fog "1"
|
||||
gl_monolights "0"
|
||||
gl_overbright "0"
|
||||
gl_polyoffset "0.1"
|
||||
hisound "1"
|
||||
hpk_maxsize "4"
|
||||
hud_capturemouse "1"
|
||||
hud_centerid "0"
|
||||
hud_classautokill "1"
|
||||
hud_draw "1"
|
||||
hud_fastswitch "0"
|
||||
hud_takesshots "0"
|
||||
joystick "0"
|
||||
lookspring "0.000000"
|
||||
lookstrafe "0.000000"
|
||||
m_filter "0"
|
||||
m_forward "1"
|
||||
m_pitch "0.022000"
|
||||
m_side "0.8"
|
||||
m_yaw "0.022"
|
||||
model "barney"
|
||||
MP3FadeTime "2.0"
|
||||
MP3Volume "0.8"
|
||||
mp_decals "300"
|
||||
name "NSPlayer"
|
||||
net_graph "0"
|
||||
net_graphpos "1"
|
||||
net_scale "5"
|
||||
r_bmodelhighfrac "5.0"
|
||||
r_detailtextures "0"
|
||||
s_a3d "0.0"
|
||||
s_automax_distance "30.0"
|
||||
s_automin_distance "2.0"
|
||||
s_bloat "2.0"
|
||||
s_distance "60"
|
||||
s_doppler "0.0"
|
||||
s_eax "0.0"
|
||||
s_leafnum "0"
|
||||
s_max_distance "1000.0"
|
||||
s_min_distance "8.0"
|
||||
s_numpolys "200"
|
||||
s_polykeep "1000000000"
|
||||
s_polysize "10000000"
|
||||
s_refdelay "4"
|
||||
s_refgain "0.4"
|
||||
s_rolloff "1.0"
|
||||
s_verbwet "0.25"
|
||||
sensitivity "4.960000"
|
||||
skin ""
|
||||
suitvolume "0.250000"
|
||||
sv_aim "0"
|
||||
sv_voiceenable "1"
|
||||
team ""
|
||||
topcolor "151.169998"
|
||||
viewsize "120.000000"
|
||||
voice_enable "1"
|
||||
voice_forcemicrecord "1"
|
||||
voice_modenable "1"
|
||||
voice_scale "1"
|
||||
volume "0.800000"
|
||||
+mlook
|
||||
+jlook
|
||||
exec userconfig.cfg
|
|
@ -4,6 +4,7 @@
|
|||
#include "chudmisc.h"
|
||||
#include "hud_spectator.h"
|
||||
#include "AvHFont.h"
|
||||
#include "hud_crosshairs.h"
|
||||
|
||||
|
||||
class CHud
|
||||
|
@ -82,7 +83,8 @@ public:
|
|||
CHudAmmoSecondary m_AmmoSecondary;
|
||||
CHudTextMessage m_TextMessage;
|
||||
CHudStatusIcons m_StatusIcons;
|
||||
|
||||
CHudCrosshairs m_Crosshairs;
|
||||
|
||||
AvHFont mFont;
|
||||
AvHFont mSmallFont;
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<ShowIncludes>false</ShowIncludes>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>particles.lib;vgui.lib;zlib.lib;libpng.lib;wsock32.lib;sdl2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>particles.lib;vgui.lib;zlib.lib;libpng.lib;wsock32.lib;sdl2.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\particles\Release;$(SolutionDir)\includes\lpng1251;$(SolutionDir)\includes\zlib-1.2.8;$(SolutionDir)\includes\vgui\lib\win32_vc6;$(SolutionDir)\lib\public;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
|
@ -170,6 +170,10 @@
|
|||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hud_crosshairs.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hud_msg.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
@ -190,6 +194,10 @@
|
|||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hudgl.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="in_camera.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
@ -805,6 +813,8 @@
|
|||
<ClInclude Include="GameStudioModelRenderer.h" />
|
||||
<ClInclude Include="health.h" />
|
||||
<ClInclude Include="hud.h" />
|
||||
<ClInclude Include="hudgl.h" />
|
||||
<ClInclude Include="hud_crosshairs.h" />
|
||||
<ClInclude Include="hud_iface.h" />
|
||||
<ClInclude Include="hud_servers.h" />
|
||||
<ClInclude Include="hud_servers_priv.h" />
|
||||
|
|
|
@ -594,6 +594,12 @@
|
|||
<ClCompile Include="cdll_int.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hud_crosshairs.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hudgl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\mod\AvHAlienAbilities.h">
|
||||
|
@ -1040,6 +1046,12 @@
|
|||
<ClInclude Include="..\textrep\TRTagValuePair.h">
|
||||
<Filter>textrep</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="hud_crosshairs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="hudgl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\lib\public\game_controls.lib" />
|
||||
|
|
|
@ -203,15 +203,15 @@ void CHud :: Init( void )
|
|||
g_bDuckToggled = false;
|
||||
// :
|
||||
|
||||
CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 );
|
||||
CVAR_CREATE( "zoom_sensitivity_ratio", "1", 0 );
|
||||
default_fov = CVAR_CREATE( "default_fov", "90", 0 );
|
||||
m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE );
|
||||
m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE );
|
||||
cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" );
|
||||
|
||||
CVAR_CREATE( "cl_showspeed", "0", 0);
|
||||
CVAR_CREATE( kvLabelMaps, "1", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE( kvGammaRamp, "1", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE( kvLabelMaps, "3", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE( kvGammaRamp, "0", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE( kvCustomCrosshair, "1", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE( kvHudMapZoom, "3", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE( kvLabelHivesight, "1", FCVAR_ARCHIVE);
|
||||
|
@ -251,6 +251,7 @@ void CHud :: Init( void )
|
|||
m_AmmoSecondary.Init();
|
||||
m_TextMessage.Init();
|
||||
m_StatusIcons.Init();
|
||||
m_Crosshairs.Init();
|
||||
|
||||
m_Spectator.m_chatEnabled = (m_SayText.m_HUD_saytext->value!=0);
|
||||
|
||||
|
@ -315,8 +316,16 @@ void CHud :: VidInit( void )
|
|||
|
||||
gHUD.SetViewport(theViewPort);
|
||||
|
||||
mFont.Load("sprites/font_arial");
|
||||
mSmallFont.Load("sprites/font_arialsmall");
|
||||
if (CVAR_GET_FLOAT("hud_style") == 2.0f)
|
||||
{
|
||||
mFont.Load("sprites/nl/font_arial");
|
||||
mSmallFont.Load("sprites/nl/font_arialsmall");
|
||||
}
|
||||
else
|
||||
{
|
||||
mFont.Load("sprites/font_arial");
|
||||
mSmallFont.Load("sprites/font_arialsmall");
|
||||
}
|
||||
|
||||
// ----------
|
||||
// Load Sprites
|
||||
|
@ -335,6 +344,9 @@ void CHud :: VidInit( void )
|
|||
if ( !m_pSpriteList )
|
||||
{
|
||||
// we need to load the hud.txt, and all sprites within
|
||||
if (CVAR_GET_FLOAT("hud_style") == 2.0f)
|
||||
m_pSpriteList = SPR_GetList("sprites/hudnl.txt", &m_iSpriteCountAllRes);
|
||||
else
|
||||
m_pSpriteList = SPR_GetList("sprites/hud.txt", &m_iSpriteCountAllRes);
|
||||
|
||||
if (m_pSpriteList)
|
||||
|
@ -414,6 +426,7 @@ void CHud :: VidInit( void )
|
|||
m_AmmoSecondary.VidInit();
|
||||
m_TextMessage.VidInit();
|
||||
m_StatusIcons.VidInit();
|
||||
m_Crosshairs.VidInit();
|
||||
GetClientVoiceMgr()->VidInit();
|
||||
}
|
||||
|
||||
|
@ -535,7 +548,7 @@ int CHud::MsgFunc_SetFOV(const char *pszName, int iSize, void *pbuf)
|
|||
// the clients fov is actually set in the client data update section of the hud
|
||||
|
||||
// Set a new sensitivity
|
||||
if ( m_iFOV == def_fov )
|
||||
if ( m_iFOV == def_fov || CVAR_GET_FLOAT("senslock") == 1.0f)
|
||||
{
|
||||
// reset to saved sensitivity
|
||||
m_flMouseSensitivity = 0;
|
||||
|
|
219
main/source/cl_dll/hud_crosshairs.cpp
Normal file
219
main/source/cl_dll/hud_crosshairs.cpp
Normal file
|
@ -0,0 +1,219 @@
|
|||
#include "hud.h"
|
||||
#include "cl_util.h"
|
||||
#include "parsemsg.h"
|
||||
#include "hudgl.h"
|
||||
|
||||
// Crosshair system based on OpenAG
|
||||
// https://github.com/YaLTeR/OpenAG
|
||||
|
||||
int CHudCrosshairs::Init()
|
||||
{
|
||||
m_iFlags = HUD_ACTIVE;
|
||||
|
||||
cl_cross = CVAR_CREATE("cl_cross", "0", FCVAR_ARCHIVE);
|
||||
cl_cross_color = CVAR_CREATE("cl_cross_color", "255 255 255", FCVAR_ARCHIVE);
|
||||
cl_cross_alpha = CVAR_CREATE("cl_cross_alpha", "255", FCVAR_ARCHIVE);
|
||||
cl_cross_thickness = CVAR_CREATE("cl_cross_thickness", "2", FCVAR_ARCHIVE);
|
||||
cl_cross_size = CVAR_CREATE("cl_cross_size", "6", FCVAR_ARCHIVE);
|
||||
cl_cross_gap = CVAR_CREATE("cl_cross_gap", "3", FCVAR_ARCHIVE);
|
||||
cl_cross_outline = CVAR_CREATE("cl_cross_outline", "2", FCVAR_ARCHIVE);
|
||||
cl_cross_outline_alpha = CVAR_CREATE("cl_cross_outline_alpha", "255", FCVAR_ARCHIVE);
|
||||
cl_cross_outline_inner = CVAR_CREATE("cl_cross_outline_inner", "0", FCVAR_ARCHIVE);
|
||||
cl_cross_circle_radius = CVAR_CREATE("cl_cross_circle_radius", "0", FCVAR_ARCHIVE);
|
||||
cl_cross_dot_size = CVAR_CREATE("cl_cross_dot_size", "0", FCVAR_ARCHIVE);
|
||||
cl_cross_dot_color = CVAR_CREATE("cl_cross_dot_color", "", FCVAR_ARCHIVE);
|
||||
cl_cross_dot_outline = CVAR_CREATE("cl_cross_dot_outline", "0", FCVAR_ARCHIVE);
|
||||
cl_cross_line_top = CVAR_CREATE("cl_cross_line_top", "1", FCVAR_ARCHIVE);
|
||||
cl_cross_line_bottom = CVAR_CREATE("cl_cross_line_bottom", "1", FCVAR_ARCHIVE);
|
||||
cl_cross_line_left = CVAR_CREATE("cl_cross_line_left", "1", FCVAR_ARCHIVE);
|
||||
cl_cross_line_right = CVAR_CREATE("cl_cross_line_right", "1", FCVAR_ARCHIVE);
|
||||
|
||||
gHUD.AddHudElem(this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CHudCrosshairs::VidInit()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CHudCrosshairs::Draw(float time)
|
||||
{
|
||||
if (cl_cross->value == 0.0f)
|
||||
return 0;
|
||||
|
||||
unsigned char alpha;
|
||||
if (sscanf(cl_cross_alpha->string, "%hhu", &alpha) != 1)
|
||||
alpha = 255;
|
||||
|
||||
if (alpha == 0)
|
||||
return 0;
|
||||
|
||||
if (gHUD.GetInTopDownMode())
|
||||
return 0;
|
||||
|
||||
// outline alpha perhaps unnecessary since odd numbered thicknesses feather the outline edges
|
||||
unsigned char outalpha;
|
||||
if (sscanf(cl_cross_outline_alpha->string, "%hhu", &outalpha) != 1)
|
||||
outalpha = 255;
|
||||
|
||||
if (outalpha == 0)
|
||||
return 0;
|
||||
|
||||
unsigned char r, g, b;
|
||||
if (sscanf(cl_cross_color->string, "%hhu %hhu %hhu", &r, &g, &b) != 3) {
|
||||
r = 0;
|
||||
g = 255;
|
||||
b = 0;
|
||||
}
|
||||
|
||||
|
||||
Vector2D center(ScreenWidth() / 2.0f, ScreenHeight() / 2.0f);
|
||||
|
||||
HudGL gl;
|
||||
|
||||
// Draw the outline.
|
||||
// TODO: this contains a terrible amount of repeating complex code.
|
||||
//
|
||||
// Possible solution: can be changed to this with the one downside being in rare cases where cl_cross_thickness is high AND its alpha is <255, the center of each line will be slightly darker.
|
||||
// Example below is for bottom line. Would also cause certain crosshairs that have outlines on invisible cross lines to not look right.
|
||||
// gl.rectangle(Vector2D(center.x + offset, center.y + gap - half_width), Vector2D(center.x - offset, center.y + gap + size + half_width));
|
||||
if (cl_cross_outline->value > 0.0f) {
|
||||
//gl.color(0, 0, 0, alpha);
|
||||
gl.color(0, 0, 0, outalpha);
|
||||
gl.line_width(cl_cross_outline->value);
|
||||
|
||||
float size = cl_cross_size->value;
|
||||
float gap = cl_cross_gap->value;
|
||||
float half_thickness = cl_cross_thickness->value / 2.0f;
|
||||
float half_width = cl_cross_outline->value / 2.0f;
|
||||
float offset = half_thickness + half_width;
|
||||
|
||||
// Top line
|
||||
if (cl_cross_line_top->value) {
|
||||
gl.line(Vector2D(center.x - offset, center.y - gap - size), Vector2D(center.x + offset, center.y - gap - size));
|
||||
if (cl_cross_outline_inner->value == 0.0f)
|
||||
{
|
||||
gl.line(Vector2D(center.x + half_thickness, center.y - gap - size + half_width), Vector2D(center.x + half_thickness, center.y - gap));
|
||||
gl.line(Vector2D(center.x - half_thickness, center.y - gap), Vector2D(center.x - half_thickness, center.y - gap - size + half_width));
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.line(Vector2D(center.x + half_thickness, center.y - gap - size + half_width), Vector2D(center.x + half_thickness, center.y - gap - half_width));
|
||||
gl.line(Vector2D(center.x + offset, center.y - gap), Vector2D(center.x - offset, center.y - gap));
|
||||
gl.line(Vector2D(center.x - half_thickness, center.y - gap - half_width), Vector2D(center.x - half_thickness, center.y - gap - size + half_width));
|
||||
}
|
||||
}
|
||||
|
||||
// Bottom line
|
||||
if (cl_cross_line_bottom->value) {
|
||||
gl.line(Vector2D(center.x - offset, center.y + gap + size), Vector2D(center.x + offset, center.y + gap + size));
|
||||
if (cl_cross_outline_inner->value == 0.0f)
|
||||
{
|
||||
gl.line(Vector2D(center.x + half_thickness, center.y + gap + size - half_width), Vector2D(center.x + half_thickness, center.y + gap));
|
||||
gl.line(Vector2D(center.x - half_thickness, center.y + gap), Vector2D(center.x - half_thickness, center.y + gap + size - half_width));
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.line(Vector2D(center.x + half_thickness, center.y + gap + size - half_width), Vector2D(center.x + half_thickness, center.y + gap + half_width));
|
||||
gl.line(Vector2D(center.x + offset, center.y + gap), Vector2D(center.x - offset, center.y + gap));
|
||||
gl.line(Vector2D(center.x - half_thickness, center.y + gap + half_width), Vector2D(center.x - half_thickness, center.y + gap + size - half_width));
|
||||
}
|
||||
}
|
||||
|
||||
// Left line
|
||||
if (cl_cross_line_left->value) {
|
||||
gl.line(Vector2D(center.x - gap - size, center.y - offset), Vector2D(center.x - gap - size, center.y + offset));
|
||||
if (cl_cross_outline_inner->value == 0.0f)
|
||||
{
|
||||
gl.line(Vector2D(center.x - gap - size + half_width, center.y + half_thickness), Vector2D(center.x - gap, center.y + half_thickness));
|
||||
gl.line(Vector2D(center.x - gap, center.y - half_thickness), Vector2D(center.x - gap - size + half_width, center.y - half_thickness));
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.line(Vector2D(center.x - gap - size + half_width, center.y + half_thickness), Vector2D(center.x - gap - half_width, center.y + half_thickness));
|
||||
gl.line(Vector2D(center.x - gap, center.y + offset), Vector2D(center.x - gap, center.y - offset));
|
||||
gl.line(Vector2D(center.x - gap - half_width, center.y - half_thickness), Vector2D(center.x - gap - size + half_width, center.y - half_thickness));
|
||||
}
|
||||
}
|
||||
|
||||
// Right line
|
||||
if (cl_cross_line_right->value) {
|
||||
gl.line(Vector2D(center.x + gap + size, center.y - offset), Vector2D(center.x + gap + size, center.y + offset));
|
||||
if (cl_cross_outline_inner->value == 0.0f)
|
||||
{
|
||||
gl.line(Vector2D(center.x + gap + size - half_width, center.y + half_thickness), Vector2D(center.x + gap, center.y + half_thickness));
|
||||
gl.line(Vector2D(center.x + gap, center.y - half_thickness), Vector2D(center.x + gap + size - half_width, center.y - half_thickness));
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.line(Vector2D(center.x + gap + size - half_width, center.y + half_thickness), Vector2D(center.x + gap + half_width, center.y + half_thickness));
|
||||
gl.line(Vector2D(center.x + gap, center.y + offset), Vector2D(center.x + gap, center.y - offset));
|
||||
gl.line(Vector2D(center.x + gap + half_width, center.y - half_thickness), Vector2D(center.x + gap + size - half_width, center.y - half_thickness));
|
||||
}
|
||||
}
|
||||
|
||||
// Dot
|
||||
if (cl_cross_dot_size->value > 0.0f && cl_cross_dot_outline->value > 0.0f) {
|
||||
float size = cl_cross_dot_size->value;
|
||||
Vector2D offset = Vector2D(size / 2.0f, size / 2.0f);
|
||||
float dot_half_width = cl_cross_dot_outline->value / 2.0f;
|
||||
|
||||
gl.line(Vector2D(center.x - offset.x - dot_half_width, center.y - offset.y), Vector2D(center.x + offset.x + dot_half_width, center.y - offset.y));
|
||||
gl.line(Vector2D(center.x + offset.x, center.y - offset.y + dot_half_width), Vector2D(center.x + offset.x, center.y + offset.y - dot_half_width));
|
||||
gl.line(Vector2D(center.x - offset.x, center.y - offset.y + dot_half_width), Vector2D(center.x - offset.x, center.y + offset.y - dot_half_width));
|
||||
gl.line(Vector2D(center.x - offset.x - dot_half_width, center.y + offset.y), Vector2D(center.x + offset.x + dot_half_width, center.y + offset.y));
|
||||
}
|
||||
}
|
||||
|
||||
gl.color(r, g, b, alpha);
|
||||
|
||||
// Draw the crosshairs.
|
||||
if (cl_cross_thickness->value > 0.0f) {
|
||||
gl.line_width(cl_cross_thickness->value);
|
||||
|
||||
float size = cl_cross_size->value;
|
||||
float gap = cl_cross_gap->value;
|
||||
|
||||
if (cl_cross_line_top->value)
|
||||
gl.line(Vector2D(center.x, center.y - gap - size), Vector2D(center.x, center.y - gap));
|
||||
if (cl_cross_line_bottom->value)
|
||||
gl.line(Vector2D(center.x, center.y + gap + size), Vector2D(center.x, center.y + gap));
|
||||
if (cl_cross_line_left->value)
|
||||
gl.line(Vector2D(center.x - gap - size, center.y), Vector2D(center.x - gap, center.y));
|
||||
if (cl_cross_line_right->value)
|
||||
gl.line(Vector2D(center.x + gap + size, center.y), Vector2D(center.x + gap, center.y));
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
//Remove when OSX builds with c++11
|
||||
#else
|
||||
// Draw the circle.
|
||||
if (cl_cross_circle_radius->value > 0.0f) {
|
||||
gl.line_width(1.0f);
|
||||
|
||||
float radius = cl_cross_circle_radius->value;
|
||||
if (old_circle_radius != radius) {
|
||||
// Recompute the circle points.
|
||||
circle_points = HudGL::compute_circle(radius);
|
||||
old_circle_radius = radius;
|
||||
}
|
||||
|
||||
gl.circle(center, circle_points);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Draw the dot.
|
||||
if (cl_cross_dot_size->value > 0.0f) {
|
||||
unsigned char r, g, b;
|
||||
if (sscanf(cl_cross_dot_color->string, "%hhu %hhu %hhu", &r, &g, &b) == 3)
|
||||
gl.color(r, g, b, alpha);
|
||||
|
||||
float size = cl_cross_dot_size->value;
|
||||
Vector2D offset = Vector2D(size / 2.0f, size / 2.0f);
|
||||
|
||||
gl.rectangle(center - offset, center + offset);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
38
main/source/cl_dll/hud_crosshairs.h
Normal file
38
main/source/cl_dll/hud_crosshairs.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
// Crosshair system based on OpenAG
|
||||
// https://github.com/YaLTeR/OpenAG
|
||||
|
||||
class CHudCrosshairs : public CHudBase
|
||||
{
|
||||
cvar_t* cl_cross;
|
||||
cvar_t* cl_cross_color;
|
||||
cvar_t* cl_cross_alpha;
|
||||
cvar_t* cl_cross_thickness;
|
||||
cvar_t* cl_cross_size;
|
||||
cvar_t* cl_cross_gap;
|
||||
cvar_t* cl_cross_outline;
|
||||
cvar_t* cl_cross_outline_alpha;
|
||||
cvar_t* cl_cross_outline_inner;
|
||||
cvar_t* cl_cross_circle_radius;
|
||||
cvar_t* cl_cross_dot_size;
|
||||
cvar_t* cl_cross_dot_color;
|
||||
cvar_t* cl_cross_dot_outline;
|
||||
cvar_t* cl_cross_line_top;
|
||||
cvar_t* cl_cross_line_bottom;
|
||||
cvar_t* cl_cross_line_left;
|
||||
cvar_t* cl_cross_line_right;
|
||||
|
||||
#ifdef __APPLE__
|
||||
//Remove when OSX builds with c++11
|
||||
#else
|
||||
float old_circle_radius;
|
||||
std::vector<Vector2D> circle_points;
|
||||
#endif
|
||||
|
||||
public:
|
||||
virtual int Init();
|
||||
virtual int VidInit();
|
||||
virtual int Draw(float time);
|
||||
};
|
|
@ -70,7 +70,7 @@ void CHud::Think(void)
|
|||
// the clients fov is actually set in the client data update section of the hud
|
||||
|
||||
// Set a new sensitivity
|
||||
if ( m_iFOV == default_fov->value )
|
||||
if ( m_iFOV == default_fov->value || CVAR_GET_FLOAT("senslock") == 1.0f)
|
||||
{
|
||||
// reset to saved sensitivity
|
||||
m_flMouseSensitivity = 0;
|
||||
|
|
97
main/source/cl_dll/hudgl.cpp
Normal file
97
main/source/cl_dll/hudgl.cpp
Normal file
|
@ -0,0 +1,97 @@
|
|||
#define _USE_MATH_DEFINES
|
||||
#include "util_vector.h"
|
||||
#include "hudgl.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
HudGL::HudGL() {
|
||||
// Same steps as FillRGBA does.
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glEnable(GL_BLEND);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
HudGL::~HudGL() {
|
||||
// Reset the line width in case we changed it.
|
||||
glLineWidth(1.0f);
|
||||
|
||||
// Same steps as FillRGBA does.
|
||||
glColor3f(1.0f, 1.0f, 1.0f);
|
||||
glDisable(GL_BLEND);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
void HudGL::color(float r, float g, float b, float a) const {
|
||||
glColor4f(r, g, b, a);
|
||||
}
|
||||
|
||||
void HudGL::color(unsigned char r, unsigned char g, unsigned char b, unsigned char a) const {
|
||||
glColor4ub(r, g, b, a);
|
||||
}
|
||||
|
||||
void HudGL::line_width(float width) const {
|
||||
glLineWidth(width);
|
||||
}
|
||||
|
||||
void HudGL::line(const Vector2D& start, const Vector2D& end) const {
|
||||
glBegin(GL_LINES);
|
||||
glVertex2f(start.x, start.y);
|
||||
glVertex2f(end.x, end.y);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
//Remove when OSX builds with c++11
|
||||
#else
|
||||
void HudGL::circle(const Vector2D& center, const std::vector<Vector2D>& points) const {
|
||||
glBegin(GL_LINE_STRIP);
|
||||
|
||||
for (const Vector2D& point : points)
|
||||
glVertex2f(center.x + point.x, center.y + point.y);
|
||||
|
||||
glVertex2f(center.x + points[0].x, center.y + points[0].y);
|
||||
glEnd();
|
||||
}
|
||||
#endif
|
||||
|
||||
void HudGL::rectangle(const Vector2D& corner_a, const Vector2D& corner_b) const {
|
||||
glBegin(GL_QUADS);
|
||||
glVertex2f(corner_a.x, corner_a.y);
|
||||
glVertex2f(corner_a.x, corner_b.y);
|
||||
glVertex2f(corner_b.x, corner_b.y);
|
||||
glVertex2f(corner_b.x, corner_a.y);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
//Remove when OSX builds with c++11
|
||||
#else
|
||||
std::vector<Vector2D> HudGL::compute_circle(float radius) {
|
||||
// Maximum allowed distance between the circle and the rendered line segment.
|
||||
const float MAX_ERROR = 0.1f;
|
||||
const unsigned segment_count =
|
||||
static_cast<unsigned>(std::ceil(M_PI / std::acos((radius - MAX_ERROR) / radius)));
|
||||
|
||||
std::vector<Vector2D> points;
|
||||
points.reserve(segment_count);
|
||||
|
||||
for (unsigned i = 0; i < segment_count; ++i) {
|
||||
float angle = static_cast<float>(M_PI * 2 * i / segment_count);
|
||||
points.emplace_back(radius * std::cos(angle), radius * std::sin(angle));
|
||||
}
|
||||
|
||||
return points;
|
||||
}
|
||||
#endif
|
24
main/source/cl_dll/hudgl.h
Normal file
24
main/source/cl_dll/hudgl.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include <vector>
|
||||
|
||||
class HudGL {
|
||||
public:
|
||||
HudGL();
|
||||
~HudGL();
|
||||
|
||||
void color(float r, float g, float b, float a) const;
|
||||
void color(unsigned char r, unsigned char g, unsigned char b, unsigned char a) const;
|
||||
void line_width(float width) const;
|
||||
void line(const Vector2D& start, const Vector2D& end) const;
|
||||
#ifdef __APPLE__
|
||||
//Remove when OSX builds with c++11
|
||||
#else
|
||||
void circle(const Vector2D& center, const std::vector<Vector2D>& points) const;
|
||||
#endif
|
||||
void rectangle(const Vector2D& corner_a, const Vector2D& corner_b) const;
|
||||
|
||||
#ifdef __APPLE__
|
||||
//Remove when OSX builds with c++11
|
||||
#else
|
||||
static std::vector<Vector2D> compute_circle(float radius);
|
||||
#endif
|
||||
};
|
|
@ -138,6 +138,9 @@ cvar_t *cl_dynamiclights;
|
|||
cvar_t *cl_buildmessages;
|
||||
cvar_t *cl_particleinfo;
|
||||
cvar_t *cl_widescreen;
|
||||
cvar_t *cl_ambientsound;
|
||||
cvar_t *senslock;
|
||||
cvar_t *hud_style;
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
@ -1533,7 +1536,7 @@ void InitInput (void)
|
|||
|
||||
cl_autohelp = gEngfuncs.pfnRegisterVariable ( kvAutoHelp, "1.0", FCVAR_ARCHIVE );
|
||||
cl_centerentityid = gEngfuncs.pfnRegisterVariable ( kvCenterEntityID, "0.0", FCVAR_ARCHIVE );
|
||||
cl_musicenabled = gEngfuncs.pfnRegisterVariable ( kvMusicEnabled, "1.0", FCVAR_ARCHIVE );
|
||||
cl_musicenabled = gEngfuncs.pfnRegisterVariable ( kvMusicEnabled, "0", FCVAR_ARCHIVE );
|
||||
cl_musicvolume = gEngfuncs.pfnRegisterVariable ( kvMusicVolume, "155", FCVAR_ARCHIVE );
|
||||
cl_musicdir = gEngfuncs.pfnRegisterVariable ( kvMusicDirectory, "", FCVAR_ARCHIVE);
|
||||
cl_musicdelay = gEngfuncs.pfnRegisterVariable ( kvMusicDelay, "90", FCVAR_ARCHIVE);
|
||||
|
@ -1546,6 +1549,9 @@ void InitInput (void)
|
|||
cl_forcedefaultfov = gEngfuncs.pfnRegisterVariable ( kvForceDefaultFOV, "0", FCVAR_ARCHIVE );
|
||||
cl_particleinfo = gEngfuncs.pfnRegisterVariable ( kvParticleInfo, "0", FCVAR_ARCHIVE );
|
||||
cl_widescreen = gEngfuncs.pfnRegisterVariable ( kvWidescreen, "1", FCVAR_ARCHIVE );
|
||||
cl_ambientsound = gEngfuncs.pfnRegisterVariable ( kvAmbientSound, "2", FCVAR_ARCHIVE);
|
||||
senslock = gEngfuncs.pfnRegisterVariable ("senslock", "0", FCVAR_ARCHIVE);
|
||||
hud_style = gEngfuncs.pfnRegisterVariable ("hud_style", "1", FCVAR_ARCHIVE);
|
||||
|
||||
// Initialize third person camera controls.
|
||||
CAM_Init();
|
||||
|
|
|
@ -161,10 +161,10 @@ void SpectatorPanel::Initialize()
|
|||
Font* font = pSchemes->getFont(hSmallScheme);
|
||||
|
||||
//m_TopBorder = new CTransparentPanel(64, 0, 0, ScreenWidth, YRES(PANEL_HEIGHT));
|
||||
m_TopBorder = new CTransparentPanel(1, 0, ScreenHeight() - YRES(32), ScreenWidth(), YRES(SPECTATOR_PANEL_HEIGHT));
|
||||
m_TopBorder = new CTransparentPanel(128, 0, ScreenHeight() - YRES(32), ScreenWidth(), YRES(SPECTATOR_PANEL_HEIGHT));
|
||||
m_TopBorder->setParent(this);
|
||||
|
||||
m_BottomBorder = new CTransparentPanel(1, 0, ScreenHeight() - YRES(32), ScreenWidth(), YRES(SPECTATOR_PANEL_HEIGHT));
|
||||
m_BottomBorder = new CTransparentPanel(128, 0, ScreenHeight() - YRES(32), ScreenWidth(), YRES(SPECTATOR_PANEL_HEIGHT));
|
||||
m_BottomBorder->setParent(this);
|
||||
|
||||
setPaintBackgroundEnabled(false);
|
||||
|
@ -259,8 +259,8 @@ void SpectatorPanel::Initialize()
|
|||
m_overviewButton->setFont(font);
|
||||
m_overviewButton->setParent( m_BottomBorder );
|
||||
m_overviewButton->SetText("Overview");
|
||||
m_overviewButton->setPos(XRES(10), YRES(6));
|
||||
m_overviewButton->setSize(XRES(100), YRES(20));
|
||||
m_overviewButton->setPos(XRES(150), YRES(6));
|
||||
m_overviewButton->setSize(XRES(50), YRES(20));
|
||||
m_overviewButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga");
|
||||
m_overviewButton->SetHandler(new Spectator_CheckButtonHandler(this));
|
||||
m_overviewButton->SetTextColor(colorR, colorG, colorB, 0);
|
||||
|
@ -269,8 +269,8 @@ void SpectatorPanel::Initialize()
|
|||
m_firstPersonButton->setFont(font);
|
||||
m_firstPersonButton->setParent( m_BottomBorder );
|
||||
m_firstPersonButton->SetText("First person");
|
||||
m_firstPersonButton->setPos(XRES(10 + 100), YRES(6));
|
||||
m_firstPersonButton->setSize(XRES(100), YRES(20));
|
||||
m_firstPersonButton->setPos(XRES(150 + 50), YRES(6));
|
||||
m_firstPersonButton->setSize(XRES(50), YRES(20));
|
||||
m_firstPersonButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga");
|
||||
m_firstPersonButton->SetHandler(new Spectator_CheckButtonHandler(this));
|
||||
m_firstPersonButton->SetTextColor(colorR, colorG, colorB, 0);
|
||||
|
@ -279,8 +279,8 @@ void SpectatorPanel::Initialize()
|
|||
m_autoDirectorButton->setFont(font);
|
||||
m_autoDirectorButton->setParent( m_BottomBorder );
|
||||
m_autoDirectorButton->SetText("Auto-director");
|
||||
m_autoDirectorButton->setPos(XRES(10 + 200), YRES(6));
|
||||
m_autoDirectorButton->setSize(XRES(100), YRES(20));
|
||||
m_autoDirectorButton->setPos(XRES(150 + 100), YRES(6));
|
||||
m_autoDirectorButton->setSize(XRES(50), YRES(20));
|
||||
m_autoDirectorButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga");
|
||||
m_autoDirectorButton->SetHandler(new Spectator_CheckButtonHandler(this));
|
||||
m_autoDirectorButton->SetTextColor(colorR, colorG, colorB, 0);
|
||||
|
|
|
@ -1913,16 +1913,16 @@ void V_CalcSpectatorRefdef ( struct ref_params_s * pparams )
|
|||
}
|
||||
*/
|
||||
|
||||
if (g_iUser1)
|
||||
{
|
||||
// if (g_iUser1)
|
||||
// {
|
||||
|
||||
// Adjust the viewport so that the letterbox spectator mode
|
||||
// doesn't cut anything off.
|
||||
|
||||
pparams->viewport[1] += YRES(32);
|
||||
pparams->viewport[3] -= YRES(32 * 2);
|
||||
|
||||
}
|
||||
// // Adjust the viewport so that the letterbox spectator mode
|
||||
// // doesn't cut anything off.
|
||||
//
|
||||
// pparams->viewport[1] += YRES(32);
|
||||
//pparams->viewport[3] -= YRES(32 * 2);
|
||||
//
|
||||
// }
|
||||
|
||||
if ( gHUD.m_Spectator.IsInOverviewMode())
|
||||
{
|
||||
|
|
|
@ -40,7 +40,8 @@
|
|||
|
||||
// UNDONE: Do we need these?
|
||||
#define FL_IMMUNE_WATER (1<<17)
|
||||
#define FL_IMMUNE_SLIME (1<<18)
|
||||
//#define FL_IMMUNE_SLIME (1<<18)
|
||||
#define FL_JUMPHELD (1<<18) // Tracks if player is still holding +jump from a previous jump in sv_jumpmode 1
|
||||
#define FL_IMMUNE_LAVA (1<<19)
|
||||
|
||||
#define FL_PROXY (1<<20) // This is a spectator proxy
|
||||
|
@ -67,7 +68,7 @@
|
|||
// edict->movetype values
|
||||
#define MOVETYPE_NONE 0 // never moves
|
||||
//#define MOVETYPE_ANGLENOCLIP 1
|
||||
//#define MOVETYPE_ANGLECLIP 2
|
||||
//#define MOVETYPE_JUMPHELD 2
|
||||
#define MOVETYPE_WALK 3 // Player only - moving on the ground
|
||||
#define MOVETYPE_STEP 4 // gravity, special edge handling -- monsters use this
|
||||
#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff
|
||||
|
|
|
@ -121,6 +121,7 @@ cvar_t avh_autoconcede = {kvAutoConcede, "4", FCVAR_SERVER};
|
|||
cvar_t avh_combattime = {kvCombatTime, "10", FCVAR_SERVER};
|
||||
cvar_t avh_mapvoteratio = {kvMapVoteRatio, ".6", FCVAR_SERVER};
|
||||
cvar_t avh_blockscripts = {kvBlockScripts, "1", FCVAR_SERVER};
|
||||
cvar_t avh_jumpmode = {kvJumpMode, "1", FCVAR_SERVER};
|
||||
#ifdef DEBUG
|
||||
cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER};
|
||||
#endif
|
||||
|
@ -230,6 +231,7 @@ void GameDLLInit( void )
|
|||
CVAR_REGISTER (&avh_combattime);
|
||||
CVAR_REGISTER (&avh_mapvoteratio);
|
||||
CVAR_REGISTER (&avh_blockscripts);
|
||||
CVAR_REGISTER (&avh_jumpmode);
|
||||
|
||||
// TODO: Remove
|
||||
CVAR_REGISTER (&avh_ironman);
|
||||
|
|
|
@ -3156,6 +3156,16 @@ void CBasePlayer::Spawn( void )
|
|||
g_engfuncs.pfnSetPhysicsKeyValue( edict(), "slj", "0" );
|
||||
g_engfuncs.pfnSetPhysicsKeyValue( edict(), "hl", "1" );
|
||||
|
||||
if (avh_jumpmode.value == 2)
|
||||
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jm2", "1");
|
||||
else
|
||||
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jm2", "0");
|
||||
|
||||
if (avh_jumpmode.value == 1)
|
||||
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jm1", "1");
|
||||
else
|
||||
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jm1", "0");
|
||||
|
||||
pev->fov = m_iFOV = 0;// init field of view.
|
||||
m_iClientFOV = -1; // make sure fov reset is sent
|
||||
|
||||
|
|
|
@ -240,8 +240,17 @@ void CAmbientGeneric :: Precache( void )
|
|||
}
|
||||
if ( m_fActive )
|
||||
{
|
||||
UTIL_EmitAmbientSound ( ENT(pev), pev->origin, szSoundFile,
|
||||
|
||||
if (CVAR_GET_FLOAT("cl_ambientsound") == 0.0f)
|
||||
{
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
0, m_flAttenuation, SND_SPAWNING, m_dpv.pitch);
|
||||
}
|
||||
else if (CVAR_GET_FLOAT("cl_ambientsound") == 2.0f)
|
||||
{
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
(m_dpv.vol * 0.01), m_flAttenuation, SND_SPAWNING, m_dpv.pitch);
|
||||
}
|
||||
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
}
|
||||
|
@ -433,8 +442,18 @@ void CAmbientGeneric :: RampThink( void )
|
|||
if (pitch == PITCH_NORM)
|
||||
pitch = PITCH_NORM + 1; // don't send 'no pitch' !
|
||||
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
//bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") == 0.0f;
|
||||
if (CVAR_GET_FLOAT("cl_ambientsound") == 0.0f)
|
||||
{
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
0, m_flAttenuation, flags, pitch);
|
||||
}
|
||||
else if (CVAR_GET_FLOAT("cl_ambientsound") == 2.0f)
|
||||
{
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
(vol * 0.01), m_flAttenuation, flags, pitch);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// update ramps at 5hz
|
||||
|
@ -631,8 +650,17 @@ void CAmbientGeneric :: ToggleUse ( CBaseEntity *pActivator, CBaseEntity *pCalle
|
|||
|
||||
InitModulationParms();
|
||||
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
//bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") == 0.0f;
|
||||
if (CVAR_GET_FLOAT("cl_ambientsound") == 0.0f)
|
||||
{
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
0, m_flAttenuation, 0, m_dpv.pitch);
|
||||
}
|
||||
else if (CVAR_GET_FLOAT("cl_ambientsound") == 2.0f)
|
||||
{
|
||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||
(m_dpv.vol * 0.01), m_flAttenuation, 0, m_dpv.pitch);
|
||||
}
|
||||
|
||||
pev->nextthink = gpGlobals->time + 0.1;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ ELF-GC-DYNSTR=./elf-gc-dynstr
|
|||
|
||||
ifeq ($(OS),Linux)
|
||||
CC="gcc -m32"
|
||||
CPLUS="g++ -m32"
|
||||
CPLUS="g++ -m32 -std=c++11"
|
||||
CPP_LIB:=-L$(shell g++ -m32 -print-file-name=libstdc++.so | xargs dirname) -lstdc++ -ldl -lpthread
|
||||
endif
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) -DCLIENT_DLL -I/usr/include/malloc -D_snwpr
|
|||
INCLUDEDIRS= -I$(HL_SRC_DIR) -I$(NS_MOD_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I$(PM_SHARED_SRC_DIR) -I../engine -I$(GAME_SHARED_SRC_DIR) -I../external/ -I../particles -I../includes/fmodapi375linux/api/inc -I$(HL_SERVER_SRC_DIR) -I$(HL_SRC_DIR)/cl_dll -I$(VGUI_INCLUDE_DIR) -I$(UI_INCLUDE_DIR) -I$(UTIL_SRC_DIR) -I../ -I../includes/fmodapi375linux/api -I../includes/lpng1251
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -L. libpng12.dylib -lz -framework Carbon vgui.dylib -L. -lSDL2-2.0.0 -L. libparticleMP.a
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -L. libpng12.dylib -lz -framework Carbon -framework OpenGL vgui.dylib -L. -lSDL2-2.0.0 -L. libparticleMP.a
|
||||
else
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -lpng -lz -lfmod-3.75 -L$(CFG) vgui.so -L. libSDL2-2.0.so.0 -L. libparticleMP.a
|
||||
endif
|
||||
|
@ -60,11 +60,13 @@ HL1_OBJS = \
|
|||
$(HL1_OBJ_DIR)/GameStudioModelRenderer.o \
|
||||
$(HL1_OBJ_DIR)/geiger.o \
|
||||
$(HL1_OBJ_DIR)/hud.o \
|
||||
$(HL1_OBJ_DIR)/hud_crosshairs.o \
|
||||
$(HL1_OBJ_DIR)/hud_msg.o \
|
||||
$(HL1_OBJ_DIR)/hud_redraw.o \
|
||||
$(HL1_OBJ_DIR)/hud_servers.o \
|
||||
$(HL1_OBJ_DIR)/hud_spectator.o \
|
||||
$(HL1_OBJ_DIR)/hud_update.o \
|
||||
$(HL1_OBJ_DIR)/hudgl.o \
|
||||
$(HL1_OBJ_DIR)/in_camera.o \
|
||||
$(HL1_OBJ_DIR)/input.o \
|
||||
$(HL1_OBJ_DIR)/inputw32.o \
|
||||
|
|
|
@ -36,7 +36,7 @@ extern cvar_t* cl_musicdir;
|
|||
// Variables
|
||||
#define kvAutoHelp "cl_autohelp"
|
||||
// : 1064 The cl var that controls the display of labelled minimaps
|
||||
#define kvLabelMaps "cl_labelmaps"
|
||||
#define kvLabelMaps "hud_mapstyle"
|
||||
// :
|
||||
// : 0001070 - enables forced gamma ramp loading
|
||||
#define kvGammaRamp "cl_gammaramp"
|
||||
|
@ -48,6 +48,7 @@ extern cvar_t* cl_musicdir;
|
|||
#define kvCMHotKeys "cl_cmhotkeys"
|
||||
#define kvForceDefaultFOV "cl_forcedefaultfov"
|
||||
#define kvWidescreen "cl_widescreen"
|
||||
#define kvAmbientSound "cl_ambientsound"
|
||||
#define kvCenterEntityID "cl_centerentityid"
|
||||
#define kvHighDetail "cl_highdetail"
|
||||
#define kvCMHotkeys "cl_cmhotkeys"
|
||||
|
|
|
@ -428,6 +428,7 @@ extern const char* getModName(void);
|
|||
#define kSpriteDirectory "sprites"
|
||||
#define kMiniMapSpritesDirectory "sprites/minimaps"
|
||||
#define kTechTreeSpriteDirectory "sprites/techtree"
|
||||
#define kTechTreeSpriteDirectoryNL "sprites/nl/techtree"
|
||||
#define kTechTreeSpritePrefix "tech"
|
||||
#define kScriptsDirectory "scripts"
|
||||
#define kSoundDirectory "sound"
|
||||
|
|
|
@ -684,11 +684,18 @@ void AvHNoBuild::Spawn()
|
|||
|
||||
|
||||
|
||||
|
||||
AvHMP3Audio::AvHMP3Audio()
|
||||
{
|
||||
this->mUseState = false;
|
||||
this->mSoundVolume = 255;
|
||||
//bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") != 1;
|
||||
//if (ambtoggle)
|
||||
//{
|
||||
// this->mSoundVolume = 0;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
this->mSoundVolume = 255;
|
||||
// }
|
||||
this->mLooping = false;
|
||||
}
|
||||
|
||||
|
@ -706,7 +713,16 @@ void AvHMP3Audio::KeyValue( KeyValueData* pkvd )
|
|||
}
|
||||
else if(FStrEq(pkvd->szKeyName, "soundvolume"))
|
||||
{
|
||||
this->mSoundVolume = atoi(pkvd->szValue);
|
||||
bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") != 1;
|
||||
if (ambtoggle)
|
||||
{
|
||||
this->mSoundVolume = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->mSoundVolume = atoi(pkvd->szValue);
|
||||
}
|
||||
|
||||
pkvd->fHandled = TRUE;
|
||||
}
|
||||
else if(FStrEq(pkvd->szKeyName, "fadedistance"))
|
||||
|
|
|
@ -328,6 +328,7 @@ AvHGamerules::AvHGamerules() : mTeamA(TEAM_ONE), mTeamB(TEAM_TWO)
|
|||
this->mSpawnEntity = NULL;
|
||||
|
||||
RegisterServerVariable(&avh_blockscripts);
|
||||
RegisterServerVariable(&avh_jumpmode);
|
||||
RegisterServerVariable(&avh_tournamentmode);
|
||||
RegisterServerVariable(&avh_team1damagepercent);
|
||||
RegisterServerVariable(&avh_team2damagepercent);
|
||||
|
|
|
@ -36,7 +36,7 @@ const float kPlayerStatusStatusSpacing = .02f;
|
|||
|
||||
// health armor inset (it is inset by the alien energy indicator for aliens)
|
||||
const float kHealthLeftInset = .05f;
|
||||
const float kArmorLeftInset = .2f;
|
||||
const float kArmorLeftInset = .1f;
|
||||
|
||||
// blip size
|
||||
const float kWorldBlipScale = 100;
|
||||
|
|
|
@ -2192,7 +2192,11 @@ AVHHSPRITE AvHHud::GetTechTreeSprite(AvHMessageID inMessageID)
|
|||
char theMessageNumberString[16];
|
||||
sprintf(theMessageNumberString, "%d", (int)theMessageNumber);
|
||||
//string theSpriteName = kTechTreeSpriteDirectory + string("/") + kTechTreeSpritePrefix + string(theMessageIDString) + string(".spr");
|
||||
string theSpriteName = kTechTreeSpriteDirectory + string("/") + kTechTreeSpritePrefix + string(theMessageNumberString) + string("s.spr");
|
||||
string theSpriteName;
|
||||
if (CVAR_GET_FLOAT("hud_style") == 2.0f)
|
||||
theSpriteName = kTechTreeSpriteDirectoryNL + string("/") + kTechTreeSpritePrefix + string(theMessageNumberString) + string("s.spr");
|
||||
else
|
||||
theSpriteName = kTechTreeSpriteDirectory + string("/") + kTechTreeSpritePrefix + string(theMessageNumberString) + string("s.spr");
|
||||
AVHHSPRITE theSpriteHandle = SPR_Load(theSpriteName.c_str());
|
||||
|
||||
// Sprite handle can be 0, as I don't have sprites for all tech yet
|
||||
|
@ -4371,12 +4375,92 @@ void AvHHud::VidInit(void)
|
|||
// string theSpriteName = "sprites/level1_hud.spr";//UINameToSprite(theBaseName, theScreenWidth, true);
|
||||
// this->mAlienUILifeforms[i] = SPR_Load(theSpriteName.c_str());
|
||||
// }
|
||||
|
||||
if (CVAR_GET_FLOAT("hud_style") == 2.0f)
|
||||
{
|
||||
this->mAlienUIUpgrades = SPR_Load(kAlienUpgradeSpriteNL);
|
||||
this->mAlienUIEnergySprite = SPR_Load(kAlienEnergySpriteNL);
|
||||
this->mAlienUICloakSprite = SPR_Load(kAlienCloakSpriteNL);
|
||||
this->mBackgroundSprite = SPR_Load(kTopDownBGSpriteNL);
|
||||
this->mTopDownTopSprite = SPR_Load(kTopDownTopHUDSpriteNL);
|
||||
this->mTopDownBottomSprite = SPR_Load(kTopDownBottomHUDSpriteNL);
|
||||
this->mMarineTopSprite = SPR_Load(kMarineTopHUDSpriteNL);
|
||||
this->mLogoutSprite = SPR_Load(kLogoutSpriteNL);
|
||||
this->mCommandButtonSprite = SPR_Load(kCommandButtonSpriteNL);
|
||||
this->mCommandStatusSprite = SPR_Load(kCommandStatusSpriteNL);
|
||||
this->mSelectAllSprite = SPR_Load(kSelectAllSpriteNL);
|
||||
this->mOrderSprite = SPR_Load(kOrdersSpriteNL);
|
||||
this->mHiveInfoSprite = SPR_Load(kHiveInfoSpriteNL);
|
||||
this->mHiveHealthSprite = SPR_Load(kHiveHealthSpriteNL);
|
||||
this->mMarineOrderIndicator = SPR_Load(kMarineOrderSpriteNL);
|
||||
this->mMarineUpgradesSprite = SPR_Load(kMarineUpgradesSpriteNL);
|
||||
}
|
||||
else if (CVAR_GET_FLOAT("hud_style") == 1.0f)
|
||||
{
|
||||
char theBaseName[128];
|
||||
sprintf(theBaseName, "%s", kAlienUpgradeSprite);
|
||||
theSpriteName = UINameToSprite(theBaseName, theScreenWidth);
|
||||
this->mAlienUIUpgrades = SPR_Load(theSpriteName.c_str());
|
||||
|
||||
// Load alien energy sprite
|
||||
theSpriteName = UINameToSprite(kAlienEnergySprite, theScreenWidth);
|
||||
this->mAlienUIEnergySprite = SPR_Load(theSpriteName.c_str());
|
||||
theSpriteName = UINameToSprite(kAlienCloakSprite, theScreenWidth);
|
||||
|
||||
this->mAlienUICloakSprite = SPR_Load(theSpriteName.c_str());
|
||||
this->mBackgroundSprite = SPR_Load(kTopDownBGSprite);
|
||||
this->mTopDownTopSprite = SPR_Load(kTopDownTopHUDSpriteMin);
|
||||
this->mTopDownBottomSprite = SPR_Load(kTopDownBottomHUDSpriteMin);
|
||||
this->mMarineTopSprite = SPR_Load(kMarineTopHUDSpriteMin);
|
||||
this->mLogoutSprite = SPR_Load(kLogoutSprite);
|
||||
this->mCommandButtonSprite = SPR_Load(kCommandButtonSprite);
|
||||
this->mCommandStatusSprite = SPR_Load(kCommandStatusSpriteMin);
|
||||
this->mSelectAllSprite = SPR_Load(kSelectAllSpriteMin);
|
||||
// Load order sprite
|
||||
theSpriteName = UINameToSprite(kOrdersSprite, theScreenWidth);
|
||||
this->mOrderSprite = SPR_Load(theSpriteName.c_str());
|
||||
this->mHiveInfoSprite = SPR_Load(kHiveInfoSprite);
|
||||
this->mHiveHealthSprite = SPR_Load(kHiveHealthSprite);
|
||||
this->mMarineOrderIndicator = SPR_Load(kMarineOrderSprite);
|
||||
this->mMarineUpgradesSprite = SPR_Load(kMarineUpgradesSprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
char theBaseName[128];
|
||||
sprintf(theBaseName, "%s", kAlienUpgradeSprite);
|
||||
theSpriteName = UINameToSprite(theBaseName, theScreenWidth);
|
||||
this->mAlienUIUpgrades = SPR_Load(theSpriteName.c_str());
|
||||
|
||||
// Load alien energy sprite
|
||||
theSpriteName = UINameToSprite(kAlienEnergySprite, theScreenWidth);
|
||||
this->mAlienUIEnergySprite = SPR_Load(theSpriteName.c_str());
|
||||
theSpriteName = UINameToSprite(kAlienCloakSprite, theScreenWidth);
|
||||
this->mAlienUICloakSprite = SPR_Load(theSpriteName.c_str());
|
||||
|
||||
// Load background for topdown mode
|
||||
this->mBackgroundSprite = SPR_Load(kTopDownBGSprite);
|
||||
|
||||
// Load HUD
|
||||
this->mTopDownTopSprite = SPR_Load(kTopDownTopHUDSprite);
|
||||
this->mTopDownBottomSprite = SPR_Load(kTopDownBottomHUDSprite);
|
||||
this->mMarineTopSprite = SPR_Load(kMarineTopHUDSprite);
|
||||
|
||||
this->mLogoutSprite = SPR_Load(kLogoutSprite);
|
||||
this->mCommandButtonSprite = SPR_Load(kCommandButtonSprite);
|
||||
this->mCommandStatusSprite = SPR_Load(kCommandStatusSprite);
|
||||
this->mSelectAllSprite = SPR_Load(kSelectAllSprite);
|
||||
|
||||
// Load order sprite
|
||||
theSpriteName = UINameToSprite(kOrdersSprite, theScreenWidth);
|
||||
this->mOrderSprite = SPR_Load(theSpriteName.c_str());
|
||||
this->mHiveInfoSprite = SPR_Load(kHiveInfoSprite);
|
||||
this->mHiveHealthSprite = SPR_Load(kHiveHealthSprite);
|
||||
|
||||
this->mMarineOrderIndicator = SPR_Load(kMarineOrderSprite);
|
||||
this->mMarineUpgradesSprite = SPR_Load(kMarineUpgradesSprite);
|
||||
}
|
||||
|
||||
char theBaseName[128];
|
||||
sprintf(theBaseName, "%s", kAlienUpgradeSprite);
|
||||
theSpriteName = UINameToSprite(theBaseName, theScreenWidth);
|
||||
this->mAlienUIUpgrades = SPR_Load(theSpriteName.c_str());
|
||||
|
||||
sprintf(theBaseName, "%s", kAlienUpgradeCategory);
|
||||
theSpriteName = UINameToSprite(theBaseName, theScreenWidth);
|
||||
this->mAlienUIUpgradeCategories = SPR_Load(theSpriteName.c_str());
|
||||
|
@ -4385,25 +4469,6 @@ void AvHHud::VidInit(void)
|
|||
theSpriteName = UINameToSprite(kJetpackSprite, theScreenWidth);
|
||||
this->mMarineUIJetpackSprite = SPR_Load(theSpriteName.c_str());
|
||||
|
||||
// Load alien energy sprite
|
||||
theSpriteName = UINameToSprite(kAlienEnergySprite, theScreenWidth);
|
||||
this->mAlienUIEnergySprite = SPR_Load(theSpriteName.c_str());
|
||||
theSpriteName = UINameToSprite(kAlienCloakSprite, theScreenWidth);
|
||||
this->mAlienUICloakSprite = SPR_Load(theSpriteName.c_str());
|
||||
|
||||
// Load background for topdown mode
|
||||
this->mBackgroundSprite = SPR_Load(kTopDownBGSprite);
|
||||
|
||||
// Load HUD
|
||||
this->mTopDownTopSprite = SPR_Load(kTopDownTopHUDSprite);
|
||||
this->mTopDownBottomSprite = SPR_Load(kTopDownBottomHUDSprite);
|
||||
this->mMarineTopSprite = SPR_Load(kMarineTopHUDSprite);
|
||||
|
||||
this->mLogoutSprite = SPR_Load(kLogoutSprite);
|
||||
this->mCommandButtonSprite = SPR_Load(kCommandButtonSprite);
|
||||
this->mCommandStatusSprite = SPR_Load(kCommandStatusSprite);
|
||||
this->mSelectAllSprite = SPR_Load(kSelectAllSprite);
|
||||
|
||||
//this->mTopDownBottomSprite = SPR_Load("sprites/distorttest.spr");
|
||||
//this->mTopDownBottomSprite = SPR_Load("sprites/ns.spr");
|
||||
//this->mTopDownBottomSprite = SPR_Load("sprites/distorttest.spr");
|
||||
|
@ -4412,17 +4477,9 @@ void AvHHud::VidInit(void)
|
|||
this->mMembraneSprite = SPR_Load(kMembraneSprite);
|
||||
this->mDigestingSprite = SPR_Load(kDigestingSprite);
|
||||
|
||||
// Load order sprite
|
||||
theSpriteName = UINameToSprite(kOrdersSprite, theScreenWidth);
|
||||
this->mOrderSprite = SPR_Load(theSpriteName.c_str());
|
||||
this->mHiveInfoSprite = SPR_Load(kHiveInfoSprite);
|
||||
this->mHiveHealthSprite = SPR_Load(kHiveHealthSprite);
|
||||
|
||||
// Load cursor sprite
|
||||
this->mMarineCursor = SPR_Load(kCursorsSprite);
|
||||
this->mAlienCursor = SPR_Load(kAlienCursorSprite);
|
||||
this->mMarineOrderIndicator = SPR_Load(kMarineOrderSprite);
|
||||
this->mMarineUpgradesSprite = SPR_Load(kMarineUpgradesSprite);
|
||||
//this->mMappingTechSprite = SPR_Load("sprites/ns.spr");
|
||||
|
||||
this->mAlienBuildSprite = SPR_Load(kAlienBuildSprite);
|
||||
|
|
|
@ -224,23 +224,28 @@ string AvHMiniMap::GetSpriteNameFromMap(int inSpriteWidth, const string& inMapNa
|
|||
sprintf(theWidthString, "%d", inSpriteWidth);
|
||||
// : 1064
|
||||
// insert _labelled into the filename before ".spr"
|
||||
string extraname="";
|
||||
switch ( useLabels ) {
|
||||
case 1:
|
||||
extraname="_1";
|
||||
break;
|
||||
case 2:
|
||||
extraname="_2";
|
||||
break;
|
||||
case 3:
|
||||
extraname="_3";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
string extraname = "";
|
||||
switch (useLabels) {
|
||||
case 1:
|
||||
extraname = "_1";
|
||||
break;
|
||||
case 2:
|
||||
extraname = "_2";
|
||||
break;
|
||||
case 3:
|
||||
extraname = "_3";
|
||||
break;
|
||||
case 4:
|
||||
extraname = "_4";
|
||||
break;
|
||||
case 5:
|
||||
extraname = "_5";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
string theMiniMapName = kMiniMapSpritesDirectory + string("/") /*+ string(theWidthString)*/ + inMapName + extraname + string(".spr");
|
||||
// :
|
||||
return theMiniMapName;
|
||||
string theMiniMapName = kMiniMapSpritesDirectory + string("/") /*+ string(theWidthString)*/ + inMapName + extraname + string(".spr");
|
||||
return theMiniMapName;
|
||||
}
|
||||
|
||||
void AvHMiniMap::InitializePalette()
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "AvHCommandConstants.h"
|
||||
#include "../engine/cdll_int.h"
|
||||
#include "../types.h"
|
||||
#include <SDL2/SDL_mouse.h>
|
||||
#include <string>
|
||||
using std::string;
|
||||
|
||||
|
@ -118,7 +119,7 @@ void AvHPieMenuHandler::ClosePieMenu(void)
|
|||
|
||||
// Reset the mouse cursor to the center of the screen so
|
||||
// that the view doesn't jog once the pie menu is closed.
|
||||
|
||||
|
||||
IN_ResetMouse();
|
||||
gHUD.ShowCrosshair();
|
||||
|
||||
|
@ -136,6 +137,10 @@ void AvHPieMenuHandler::InternalClosePieMenu(void)
|
|||
if(!gHUD.GetInTopDownMode())
|
||||
{
|
||||
gHUD.GetManager().SetMouseVisibility(false);
|
||||
//attempt at fixing OS cursor appearing over game's cursor
|
||||
#ifdef WIN32
|
||||
ShowCursor(TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
theMarineMenu->SetFadeState(false);
|
||||
|
@ -145,6 +150,11 @@ void AvHPieMenuHandler::InternalClosePieMenu(void)
|
|||
}
|
||||
sLastNodeHighlighted = NULL;
|
||||
|
||||
if (CVAR_GET_FLOAT("m_rawinput") != 0)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
}
|
||||
|
||||
// if(sTheDebugBool)
|
||||
// {
|
||||
// AvHTeamHierarchy* theHierarchyComponent = NULL;
|
||||
|
@ -175,10 +185,23 @@ void AvHPieMenuHandler::OpenPieMenu(void)
|
|||
if(!gHUD.GetInTopDownMode())
|
||||
{
|
||||
gHUD.GetManager().SetMouseVisibility(true);
|
||||
//attempt at fixing OS cursor appearing over game's cursor
|
||||
#ifdef WIN32
|
||||
ShowCursor(FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
gHUD.HideCrosshair();
|
||||
|
||||
|
||||
if (CVAR_GET_FLOAT("m_rawinput") != 0)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
gEngfuncs.pfnSetMousePos(gEngfuncs.GetWindowCenterX(), gEngfuncs.GetWindowCenterY());
|
||||
}
|
||||
//App::getInstance()->setCursorOveride(App::getInstance()->getScheme()->getCursor(Scheme::scu_none));
|
||||
//App::getInstance()->setCursorOveride(gHUD.GetManager().mBlankCursor);
|
||||
|
||||
|
||||
// Only do this when in full screen
|
||||
//App::getInstance()->setCursorPos(ScreenWidth/2, ScreenHeight/2);
|
||||
|
||||
|
@ -189,7 +212,7 @@ void AvHPieMenuHandler::OpenPieMenu(void)
|
|||
sTimeLastNodeHighlighted = sTimeMenuOpened;
|
||||
sPieMenuOpen = true;
|
||||
|
||||
|
||||
|
||||
// if(sTheDebugBool)
|
||||
// {
|
||||
// AvHTeamHierarchy* theHierarchyComponent = NULL;
|
||||
|
|
|
@ -9329,8 +9329,8 @@ void AvHPlayer::UpdateAmbientSounds()
|
|||
int theBaseSpeed, theMaxSpeed;
|
||||
this->GetSpeeds(theBaseSpeed, theMaxSpeed);
|
||||
|
||||
float theAlienSoundFreq = 0.003f;
|
||||
float theChanceOfPlayingSound = theAlienSoundFreq*(theVelocity/((float)theMaxSpeed));
|
||||
float theAlienSoundFreq = 0.3f;
|
||||
float theChanceOfPlayingSound = gpGlobals->frametime*theAlienSoundFreq*(theVelocity/((float)theMaxSpeed));
|
||||
if(RANDOM_FLOAT(0, 1) < theChanceOfPlayingSound)
|
||||
{
|
||||
float theVolume = RANDOM_FLOAT(.5, 1.0)*theSilenceVolumeFactor;
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
#include "../common/cvardef.h"
|
||||
|
||||
extern cvar_t avh_blockscripts;
|
||||
extern cvar_t avh_jumpmode;
|
||||
extern cvar_t avh_combattime;
|
||||
extern cvar_t *avh_cheats;
|
||||
extern cvar_t avh_defaultteam;
|
||||
|
@ -143,5 +144,6 @@ float ns_cvar_float(const cvar_t *cvar);
|
|||
#define kvMapVoteRatio "mp_mapvoteratio"
|
||||
|
||||
#define kvBlockScripts "mp_blockscripts"
|
||||
#define kvJumpMode "sv_jumpmode"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -50,7 +50,9 @@
|
|||
#define kJetpackSprite "jetpack"
|
||||
|
||||
#define kAlienEnergySprite "a-energy"
|
||||
#define kAlienEnergySpriteNL "sprites/nl/640a-energy.spr"
|
||||
#define kAlienCloakSprite "a-cloak"
|
||||
#define kAlienCloakSpriteNL "sprites/nl/640a-cloak.spr"
|
||||
#define kAlienResourceSprite "a-resources"
|
||||
|
||||
#define kCombatExperienceSprite "experience"
|
||||
|
@ -60,27 +62,46 @@
|
|||
//#define kHiveSprite "hive"
|
||||
//#define kLifeformSprite "alien"
|
||||
#define kAlienUpgradeSprite "alienupgrades"
|
||||
#define kAlienUpgradeSpriteNL "sprites/nl/640alienupgrades.spr"
|
||||
#define kAlienUpgradeCategory "alienupgradecategories"
|
||||
|
||||
#define kOrdersSprite "order"
|
||||
#define kOrdersSpriteNL "sprites/nl/640order.spr"
|
||||
|
||||
#define kAlienCursorSprite "sprites/aliencursor.spr"
|
||||
|
||||
#define kTopDownBGSprite "sprites/topdownbg.spr"
|
||||
#define kTopDownBGSpriteNL "sprites/nl/topdownbg.spr"
|
||||
#define kTopDownTopHUDSprite "sprites/topdowntop.spr"
|
||||
#define kTopDownTopHUDSpriteNL "sprites/nl/topdowntop.spr"
|
||||
#define kTopDownTopHUDSpriteMin "sprites/minimal/topdowntop.spr"
|
||||
#define kTopDownBottomHUDSprite "sprites/topdownbottom.spr"
|
||||
#define kTopDownBottomHUDSpriteNL "sprites/nl/topdownbottom.spr"
|
||||
#define kTopDownBottomHUDSpriteMin "sprites/minimal/topdownbottom.spr"
|
||||
#define kMarineTopHUDSprite "sprites/mainhud.spr"
|
||||
#define kMarineTopHUDSpriteNL "sprites/nl/mainhud.spr"
|
||||
#define kMarineTopHUDSpriteMin "sprites/minimal/mainhud.spr"
|
||||
#define kLogoutSprite "sprites/logout.spr"
|
||||
#define kLogoutSpriteNL "sprites/nl/logout.spr"
|
||||
#define kHiveInfoSprite "sprites/hiveinfo.spr"
|
||||
#define kHiveInfoSpriteNL "sprites/nl/hiveinfo.spr"
|
||||
#define kHiveHealthSprite "sprites/hivehealth.spr"
|
||||
#define kHiveHealthSpriteNL "sprites/nl/hivehealth.spr"
|
||||
#define kCursorsSprite "sprites/cursors.spr"
|
||||
#define kCommandButtonSprite "sprites/commandbutton.spr"
|
||||
#define kCommandButtonSpriteNL "sprites/nl/commandbutton.spr"
|
||||
#define kCommandStatusSprite "sprites/commandstatus.spr"
|
||||
#define kCommandStatusSprite "sprites/commandstatus.spr"
|
||||
#define kCommandStatusSpriteNL "sprites/nl/commandstatus.spr"
|
||||
#define kCommandStatusSpriteMin "sprites/minimal/commandstatus.spr"
|
||||
#define kSelectAllSprite "sprites/selectall.spr"
|
||||
#define kSelectAllSpriteNL "sprites/nl/selectall.spr"
|
||||
#define kSelectAllSpriteMin "sprites/minimal/selectall.spr"
|
||||
|
||||
#define kMarineOrderSprite "sprites/hudorder.spr"
|
||||
#define kMarineOrderSpriteNL "sprites/nl/hudorder.spr"
|
||||
#define kMarineUpgradesSprite "sprites/upgrades.spr"
|
||||
#define kMarineUpgradesSpriteNL "sprites/nl/upgrades.spr"
|
||||
|
||||
#define kAlienBuildSprite "sprites/ba-build.spr"
|
||||
#define kMarineBuildSprite "sprites/b-build.spr"
|
||||
|
@ -116,6 +137,7 @@
|
|||
|
||||
#define kOverwatchCenterSprite "sprites/overwatch-center.spr"
|
||||
#define kReticleSprite "sprites/reticle.spr"
|
||||
#define kReticleSpriteNL "sprites/nl/reticle.spr"
|
||||
#define kMarinePlayersSprite "sprites/iplayerm.spr"
|
||||
#define kAlienPlayersSprite "sprites/iplayera.spr"
|
||||
#define kStructuresSprite "sprites/itech.spr"
|
||||
|
|
|
@ -159,6 +159,7 @@ extern int gBlinkEffectSuccessEventID;
|
|||
#include "../mod/AvHSelectionHelper.h"
|
||||
|
||||
int gHeightLevel = 0;
|
||||
int JpEventTimer = 0;
|
||||
|
||||
const float kMarineBackpedalSpeedScalar = .4f;
|
||||
const float kMarineSidestepSpeedScalar = 1.0f;
|
||||
|
@ -5334,12 +5335,13 @@ void PM_Jump (void)
|
|||
{
|
||||
int i;
|
||||
qboolean tfc = false;
|
||||
|
||||
qboolean autojump = false;
|
||||
qboolean queuedjump = false;
|
||||
qboolean cansuperjump = false;
|
||||
|
||||
if (pmove->dead || GetHasUpgrade(pmove->iuser4, MASK_ENSNARED))
|
||||
{
|
||||
pmove->oldbuttons |= IN_JUMP ; // don't jump again until released
|
||||
pmove->flags |= FL_JUMPHELD;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5449,7 +5451,7 @@ void PM_Jump (void)
|
|||
// Flag that we jumped.
|
||||
// HACK HACK HACK
|
||||
// Remove this when the game .dll no longer does physics code!!!!
|
||||
pmove->oldbuttons |= IN_JUMP; // don't jump again until released
|
||||
//pmove->oldbuttons |= IN_JUMP; // don't jump again until released
|
||||
return; // in air, so no effect
|
||||
}
|
||||
|
||||
|
@ -5459,8 +5461,20 @@ void PM_Jump (void)
|
|||
// if ( pmove->oldbuttons & IN_JUMP && (pmove->velocity[0] == 0 || !theIsAlien || pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3) )
|
||||
//return; // don't pogo stick
|
||||
|
||||
if ( pmove->oldbuttons & IN_JUMP )
|
||||
autojump = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "jm2"));
|
||||
queuedjump = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "jm1"));
|
||||
|
||||
if ((!autojump && !queuedjump) || pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3)
|
||||
{
|
||||
if (pmove->oldbuttons & IN_JUMP)
|
||||
return; // don't pogo stick
|
||||
}
|
||||
|
||||
if (queuedjump)
|
||||
{
|
||||
if (pmove->flags & FL_JUMPHELD)
|
||||
return;
|
||||
}
|
||||
|
||||
// In the air now.
|
||||
pmove->onground = -1;
|
||||
|
@ -5513,7 +5527,8 @@ void PM_Jump (void)
|
|||
PM_FixupGravityVelocity();
|
||||
|
||||
// Flag that we jumped.
|
||||
pmove->oldbuttons |= IN_JUMP; // don't jump again until released
|
||||
//pmove->oldbuttons |= IN_JUMP; // don't jump again until released
|
||||
pmove->flags |= FL_JUMPHELD;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -6364,11 +6379,17 @@ void PM_Jetpack()
|
|||
pmove->velocity[1] += (theWishVelocity[1] / pmove->clientmaxspeed) * (theTimePassed * theWeightScalar*kJetpackForce);
|
||||
pmove->velocity[2] += theTimePassed*theWeightScalar*kJetpackForce;
|
||||
|
||||
// Play an event every so often
|
||||
if(pmove->runfuncs /*&& (pmove->RandomLong(0, 2) == 0)*/)
|
||||
{
|
||||
pmove->PM_PlaybackEventFull(0, pmove->player_index, gJetpackEventID, 0, (float *)pmove->origin, (float *)pmove->origin, 0.0, 0.0, /*theWeaponIndex*/ 0, 0, 0, 0 );
|
||||
}
|
||||
//FPS independent jetpack event. Scales with FPS without timer.
|
||||
JpEventTimer += pmove->cmd.msec;
|
||||
if (JpEventTimer > 7)
|
||||
{
|
||||
// Play an event every so often
|
||||
if (pmove->runfuncs /*&& (pmove->RandomLong(0, 2) == 0)*/)
|
||||
{
|
||||
pmove->PM_PlaybackEventFull(0, pmove->player_index, gJetpackEventID, 0, (float *)pmove->origin, (float *)pmove->origin, 0.0, 0.0, /*theWeaponIndex*/ 0, 0, 0, 0);
|
||||
}
|
||||
JpEventTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
float theJetpackEnergy = pmove->fuser3/kNormalizationNetworkFactor;
|
||||
|
@ -6678,6 +6699,7 @@ void PM_PlayerMove ( qboolean server )
|
|||
else
|
||||
{
|
||||
pmove->oldbuttons &= ~IN_JUMP;
|
||||
pmove->flags &= ~FL_JUMPHELD;
|
||||
}
|
||||
|
||||
// Fricion is handled before we add in any base velocity. That way, if we are on a conveyor,
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
#define kGameHDSpaceNeeded 300
|
||||
#define kGameVersionMajor 3
|
||||
#define kGameVersionMinor 2
|
||||
#define kGameVersionRevision 1
|
||||
#define kGameVersionRevision 2
|
||||
#define kGestateBaseArmor 150
|
||||
#define kGestateHealth 200
|
||||
#define kGorgeArmorUpgrade 50
|
||||
|
|
BIN
main/sprites/640nlhud7.spr
Normal file
BIN
main/sprites/640nlhud7.spr
Normal file
Binary file not shown.
149
main/sprites/hudnl.txt
Normal file
149
main/sprites/hudnl.txt
Normal file
|
@ -0,0 +1,149 @@
|
|||
148
|
||||
selection 320 320hud1 160 220 80 20
|
||||
bucket1 320 320hud2 108 16 12 12
|
||||
bucket2 320 320hud2 108 28 12 12
|
||||
bucket3 320 320hud2 108 40 12 12
|
||||
bucket4 320 320hud2 108 52 12 12
|
||||
bucket5 320 320hud2 108 64 12 12
|
||||
bucket0 320 320hud2 108 76 12 12
|
||||
dmg_bio 320 320hud4 0 0 32 32
|
||||
dmg_poison 320 320hud4 0 0 32 32
|
||||
dmg_chem 320 320hud4 32 0 32 32
|
||||
dmg_cold 320 320hud4 64 0 32 32
|
||||
dmg_drown 320 320hud4 96 0 32 32
|
||||
dmg_heat 320 320hud4 128 0 32 32
|
||||
dmg_gas 320 320hud4 160 0 32 32
|
||||
dmg_rad 320 320hud4 192 0 32 32
|
||||
dmg_shock 320 320hud4 224 0 32 32
|
||||
number_0 320 320hud2 0 0 12 16
|
||||
number_1 320 320hud2 12 0 12 16
|
||||
number_2 320 320hud2 24 0 12 16
|
||||
number_3 320 320hud2 36 0 12 16
|
||||
number_4 320 320hud2 48 0 12 16
|
||||
number_5 320 320hud2 60 0 12 16
|
||||
number_6 320 320hud2 72 0 12 16
|
||||
number_7 320 320hud2 84 0 12 16
|
||||
number_8 320 320hud2 96 0 12 16
|
||||
number_9 320 320hud2 108 0 12 16
|
||||
divider 320 320hud2 120 0 1 20
|
||||
cross 320 320hud2 0 72 16 16
|
||||
d_skull 320 640hud7 72 25 12 12
|
||||
flash_full 320 320hud2 16 72 18 16
|
||||
flash_empty 320 320hud2 34 72 18 16
|
||||
flash_beam 320 320hud2 52 72 6 16
|
||||
title_half 320 320hud3 0 48 128 16
|
||||
title_life 320 320hud3 128 48 116 16
|
||||
d_knife 320 640aw3-s 100 232 64 24
|
||||
d_handgrenade 320 640aw1 192 231 64 24
|
||||
d_grenade 320 640aw3-s 192 192 64 24
|
||||
d_grenadegun 320 640aw3-s 192 192 64 24
|
||||
d_machinegun 320 640aw3-s 192 96 64 24
|
||||
d_pistol 320 640aw3-s 192 168 64 24
|
||||
d_heavymachinegun 320 640aw3-s 0 230 101 26
|
||||
d_shotgun 320 640aw3-s 164 231 80 26
|
||||
d_tripmine 320 640aw3-s 192 145 64 24
|
||||
d_item_mine 320 640aw3-s 192 145 64 24
|
||||
d_welder 320 640aw3-s 192 120 64 24
|
||||
d_turret 320 640aw3-s 172 0 18 32
|
||||
d_offensechamber 320 640aw3-s 192 24 64 24
|
||||
d_sporegunprojectile 320 640aw3-s 192 0 64 24
|
||||
d_healingspray 320 640aw3-s 192 72 64 24
|
||||
d_parasite 320 640aw3-s 192 48 64 24
|
||||
d_siegeturret 320 640aw3 143 224 48 32
|
||||
d_spitgunspit 320 640aw3 192 102 64 24
|
||||
d_claws 320 640aw3 176 48 80 32
|
||||
d_bitegun 320 640aw3 192 0 64 24
|
||||
d_bite2gun 320 640aw3 192 24 64 24
|
||||
d_spikegun 320 640aw3 192 183 64 24
|
||||
d_spikeprojectile 320 640aw3 192 183 64 24
|
||||
d_swipe 320 640aw3 0 225 64 24
|
||||
d_divinewind 320 640aw3 192 127 64 24
|
||||
d_bilebomb 320 640aw3 192 207 64 24
|
||||
d_acidrocket 320 640aw3 61 225 64 24
|
||||
d_leap 320 640aw3 192 80 64 24
|
||||
d_charge 320 640aw3 176 151 80 32
|
||||
d_babblerprojectile 320 640aw3 192 231 64 24
|
||||
d_devour 320 640aw3 192 231 64 24
|
||||
d_nuke 320 320w-s 80 160 32 32
|
||||
d_tracktrain 320 320w-s 112 160 32 16
|
||||
d_team_advturretfactory 320 320w-s 80 240 32 16
|
||||
d_team_turretfactory 320 320w-s 80 240 32 16
|
||||
d_resourcetower 320 320w-s 80 240 32 16
|
||||
suit_full 320 320hud2 0 88 16 16
|
||||
suit_empty 320 320hud2 16 88 16 16
|
||||
|
||||
//===========================================
|
||||
|
||||
selection 640 640hud3 0 180 170 45
|
||||
bucket1 640 640nlhud7 168 72 20 20
|
||||
bucket2 640 640nlhud7 188 72 20 20
|
||||
bucket3 640 640nlhud7 208 72 20 20
|
||||
bucket4 640 640nlhud7 168 92 20 20
|
||||
bucket5 640 640nlhud7 188 92 20 20
|
||||
bucket0 640 640nlhud7 208 92 20 20
|
||||
dmg_poison 640 640hud8 128 0 64 64
|
||||
dmg_bio 640 640hud8 128 0 64 64
|
||||
dmg_chem 640 640hud8 0 0 64 64
|
||||
dmg_drown 640 640hud8 64 0 64 64
|
||||
dmg_gas 640 640hud9 0 0 64 64
|
||||
dmg_cold 640 640hud9 64 0 64 64
|
||||
dmg_heat 640 640hud9 128 0 64 64
|
||||
dmg_rad 640 640hud9 192 0 64 64
|
||||
dmg_shock 640 640hud8 192 0 64 64
|
||||
number_0 640 640nlhud7 0 0 24 25
|
||||
number_1 640 640nlhud7 24 0 24 25
|
||||
number_2 640 640nlhud7 48 0 24 25
|
||||
number_3 640 640nlhud7 72 0 24 25
|
||||
number_4 640 640nlhud7 96 0 24 25
|
||||
number_5 640 640nlhud7 120 0 24 25
|
||||
number_6 640 640nlhud7 144 0 24 25
|
||||
number_7 640 640nlhud7 168 0 24 25
|
||||
number_8 640 640nlhud7 192 0 24 25
|
||||
number_9 640 640nlhud7 216 0 24 25
|
||||
divider 640 640nlhud7 240 0 2 40
|
||||
cross 640 640nlhud7 48 25 24 24
|
||||
d_skull 640 640nlhud7 72 25 12 12
|
||||
flash_full 640 640nlhud7 160 25 32 32
|
||||
flash_empty 640 640nlhud7 112 25 32 32
|
||||
flash_beam 640 640nlhud7 144 25 16 32
|
||||
title_half 640 640hud4 0 226 256 30
|
||||
title_life 640 640hud5 0 226 220 30
|
||||
d_knife 640 640aw3-s 100 232 64 24
|
||||
d_handgrenade 640 640aw1 192 231 64 24
|
||||
d_grenade 640 640aw3-s 192 192 64 24
|
||||
d_grenadegun 640 640aw3-s 192 192 64 24
|
||||
d_machinegun 640 640aw3-s 192 96 64 24
|
||||
d_pistol 640 640aw3-s 192 168 64 24
|
||||
d_heavymachinegun 640 640aw3-s 0 230 101 26
|
||||
d_shotgun 640 640aw3-s 164 231 80 26
|
||||
d_tripmine 640 640aw3-s 192 145 64 24
|
||||
d_item_mine 640 640aw3-s 192 145 64 24
|
||||
d_welder 640 640aw3-s 192 120 64 24
|
||||
d_turret 640 640aw3-s 172 0 18 32
|
||||
d_offensechamber 640 640aw3-s 192 24 64 24
|
||||
d_sporegunprojectile 640 640aw3-s 192 0 64 24
|
||||
d_healingspray 640 640aw3-s 192 72 64 24
|
||||
d_parasite 640 640aw3-s 192 48 64 24
|
||||
d_siegeturret 640 640aw3 143 224 48 32
|
||||
d_spitgunspit 640 640aw3 192 102 64 24
|
||||
d_claws 640 640aw3 176 48 80 32
|
||||
d_bitegun 640 640aw3 192 0 64 24
|
||||
d_bite2gun 640 640aw3 192 24 64 24
|
||||
d_spikegun 640 640aw3 192 183 64 17
|
||||
d_spikeprojectile 640 640aw3 192 183 64 17
|
||||
d_swipe 640 640aw3 0 225 64 24
|
||||
d_divinewind 640 640aw3 192 127 64 24
|
||||
d_bilebomb 640 640aw3 192 200 64 25
|
||||
d_acidrocket 640 640aw3 61 225 64 24
|
||||
d_leap 640 640aw3 192 80 64 24
|
||||
d_charge 640 640aw3 176 151 80 32
|
||||
d_babblerprojectile 640 640aw3 192 231 64 24
|
||||
d_devour 640 640aw3 192 224 64 32
|
||||
d_nuke 640 320w-s 80 160 32 32
|
||||
d_tracktrain 640 640hud1 192 240 32 16
|
||||
d_team_advturretfactory 640 320w-s 80 240 32 16
|
||||
d_team_turretfactory 640 320w-s 80 240 32 16
|
||||
d_resourcetower 640 320w-s 80 240 32 16
|
||||
suit_full 640 640nlhud7 0 25 24 24
|
||||
suit_empty 640 640nlhud7 24 25 24 24
|
||||
|
BIN
main/sprites/minimal/commandstatus.spr
Normal file
BIN
main/sprites/minimal/commandstatus.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimal/mainhud.spr
Normal file
BIN
main/sprites/minimal/mainhud.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimal/selectall.spr
Normal file
BIN
main/sprites/minimal/selectall.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimal/topdownbottom.spr
Normal file
BIN
main/sprites/minimal/topdownbottom.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimal/topdowntop.spr
Normal file
BIN
main/sprites/minimal/topdowntop.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_altair_4.spr
Normal file
BIN
main/sprites/minimaps/ns_altair_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_altair_5.spr
Normal file
BIN
main/sprites/minimaps/ns_altair_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_ayumi_4.spr
Normal file
BIN
main/sprites/minimaps/ns_ayumi_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_ayumi_5.spr
Normal file
BIN
main/sprites/minimaps/ns_ayumi_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_bast_4.spr
Normal file
BIN
main/sprites/minimaps/ns_bast_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_bast_5.spr
Normal file
BIN
main/sprites/minimaps/ns_bast_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_caged_4.spr
Normal file
BIN
main/sprites/minimaps/ns_caged_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_caged_5.spr
Normal file
BIN
main/sprites/minimaps/ns_caged_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_eclipse_4.spr
Normal file
BIN
main/sprites/minimaps/ns_eclipse_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_eclipse_5.spr
Normal file
BIN
main/sprites/minimaps/ns_eclipse_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_eon_4.spr
Normal file
BIN
main/sprites/minimaps/ns_eon_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_eon_5.spr
Normal file
BIN
main/sprites/minimaps/ns_eon_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_hera_4.spr
Normal file
BIN
main/sprites/minimaps/ns_hera_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_hera_5.spr
Normal file
BIN
main/sprites/minimaps/ns_hera_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_lost_4.spr
Normal file
BIN
main/sprites/minimaps/ns_lost_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_lost_5.spr
Normal file
BIN
main/sprites/minimaps/ns_lost_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_lucid_4.spr
Normal file
BIN
main/sprites/minimaps/ns_lucid_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_lucid_5.spr
Normal file
BIN
main/sprites/minimaps/ns_lucid_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_machina_4.spr
Normal file
BIN
main/sprites/minimaps/ns_machina_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_machina_5.spr
Normal file
BIN
main/sprites/minimaps/ns_machina_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_metal_4.spr
Normal file
BIN
main/sprites/minimaps/ns_metal_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_metal_5.spr
Normal file
BIN
main/sprites/minimaps/ns_metal_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_nancy_4.spr
Normal file
BIN
main/sprites/minimaps/ns_nancy_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_nancy_5.spr
Normal file
BIN
main/sprites/minimaps/ns_nancy_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_nothing_4.spr
Normal file
BIN
main/sprites/minimaps/ns_nothing_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_nothing_5.spr
Normal file
BIN
main/sprites/minimaps/ns_nothing_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_orbital_cal_4.spr
Normal file
BIN
main/sprites/minimaps/ns_orbital_cal_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_orbital_cal_5.spr
Normal file
BIN
main/sprites/minimaps/ns_orbital_cal_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_origin_4.spr
Normal file
BIN
main/sprites/minimaps/ns_origin_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_origin_5.spr
Normal file
BIN
main/sprites/minimaps/ns_origin_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_shiva_4.spr
Normal file
BIN
main/sprites/minimaps/ns_shiva_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_shiva_5.spr
Normal file
BIN
main/sprites/minimaps/ns_shiva_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_tanith_4.spr
Normal file
BIN
main/sprites/minimaps/ns_tanith_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_tanith_5.spr
Normal file
BIN
main/sprites/minimaps/ns_tanith_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_veil_4.spr
Normal file
BIN
main/sprites/minimaps/ns_veil_4.spr
Normal file
Binary file not shown.
BIN
main/sprites/minimaps/ns_veil_5.spr
Normal file
BIN
main/sprites/minimaps/ns_veil_5.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/640a-cloak.spr
Normal file
BIN
main/sprites/nl/640a-cloak.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/640a-energy.spr
Normal file
BIN
main/sprites/nl/640a-energy.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/640alienupgrades.spr
Normal file
BIN
main/sprites/nl/640alienupgrades.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/640order.spr
Normal file
BIN
main/sprites/nl/640order.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/commandbutton.spr
Normal file
BIN
main/sprites/nl/commandbutton.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/commandstatus.spr
Normal file
BIN
main/sprites/nl/commandstatus.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/font_arial.dat
Normal file
BIN
main/sprites/nl/font_arial.dat
Normal file
Binary file not shown.
BIN
main/sprites/nl/font_arial.spr
Normal file
BIN
main/sprites/nl/font_arial.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/font_arialsmall.dat
Normal file
BIN
main/sprites/nl/font_arialsmall.dat
Normal file
Binary file not shown.
BIN
main/sprites/nl/font_arialsmall.spr
Normal file
BIN
main/sprites/nl/font_arialsmall.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/hivehealth.spr
Normal file
BIN
main/sprites/nl/hivehealth.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/hiveinfo.spr
Normal file
BIN
main/sprites/nl/hiveinfo.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/hudorder.spr
Normal file
BIN
main/sprites/nl/hudorder.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/logout.spr
Normal file
BIN
main/sprites/nl/logout.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/mainhud.spr
Normal file
BIN
main/sprites/nl/mainhud.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/reticle.spr
Normal file
BIN
main/sprites/nl/reticle.spr
Normal file
Binary file not shown.
BIN
main/sprites/nl/selectall.spr
Normal file
BIN
main/sprites/nl/selectall.spr
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue