Merge pull request #15 from ENSL/pierow-fixes

Various features/fixes - crosshair system, sv_jumpmode, cl_ambientsound...
This commit is contained in:
pierow 2018-08-15 03:00:44 -04:00 committed by GitHub
commit f64ea6b025
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
115 changed files with 1403 additions and 164 deletions

5
main/alienofficial.cfg Normal file
View 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.

View file

@ -6,10 +6,7 @@ bind "TAB" "+showscores"
bind "ENTER" "messagemode" bind "ENTER" "messagemode"
bind "ESCAPE" "cancelselect" bind "ESCAPE" "cancelselect"
bind "SPACE" "+jump" bind "SPACE" "+jump"
bind "'" "+moveup"
bind "+" "sizeup"
bind "," "impulse 123" bind "," "impulse 123"
bind "-" "sizedown"
bind "." "impulse 124" bind "." "impulse 124"
bind "/" "impulse 125" bind "/" "impulse 125"
bind "0" "slot10" bind "0" "slot10"
@ -22,10 +19,6 @@ bind "6" "slot6"
bind "7" "slot7" bind "7" "slot7"
bind "8" "slot8" bind "8" "slot8"
bind "9" "slot9" bind "9" "slot9"
bind ";" "+mlook"
bind "=" "sizeup"
bind "[" "invprev"
bind "]" "invnext"
bind "`" "toggleconsole" bind "`" "toggleconsole"
bind "a" "+moveleft" bind "a" "+moveleft"
bind "c" "+showmap" bind "c" "+showmap"
@ -35,13 +28,14 @@ bind "f" "impulse 100"
bind "g" "impulse 3" bind "g" "impulse 3"
bind "l" "impulse 105" bind "l" "impulse 105"
bind "q" "lastinv" bind "q" "lastinv"
bind "r" "+reload" bind "r" "+movement"
bind "s" "+back" bind "s" "+back"
bind "t" "impulse 201" bind "b" "impulse 11"
bind "t" "+popupmenu"
bind "u" "messagemode2" bind "u" "messagemode2"
bind "v" "impulse 9" bind "v" "impulse 10"
bind "w" "+forward" bind "w" "+forward"
bind "x" "impulse 81" bind "x" "impulse 14"
bind "y" "messagemode" bind "y" "messagemode"
bind "z" "impulse 80" bind "z" "impulse 80"
bind "~" "toggleconsole" bind "~" "toggleconsole"
@ -52,47 +46,50 @@ bind "RIGHTARROW" "+right"
bind "ALT" "+voicerecord" bind "ALT" "+voicerecord"
bind "CTRL" "+duck" bind "CTRL" "+duck"
bind "SHIFT" "+speed" bind "SHIFT" "+speed"
bind "F1" "jointeamone" alias "marinecfg" "exec marineofficial.cfg"
bind "F2" "jointeamtwo" alias "aliencfg" "exec alienofficial.cfg"
bind "F1" "jointeamone;marinecfg"
bind "F2" "jointeamtwo;aliencfg"
bind "F3" "autoassign" bind "F3" "autoassign"
bind "F4" "readyroom" bind "F4" "readyroom"
bind "F5" "snapshot" bind "F5" "snapshot"
bind "F6" "save quick"
bind "F7" "load quick"
bind "F10" "quit prompt"
bind "INS" "+klook"
bind "PGDN" "+lookdown" bind "PGDN" "+lookdown"
bind "PGUP" "+lookup" bind "PGUP" "+lookup"
bind "END" "centerview" bind "END" "centerview"
bind "MWHEELDOWN" "invnext" bind "MWHEELDOWN" "invnext"
bind "MWHEELUP" "invprev" bind "MWHEELUP" "invprev"
bind "MOUSE1" "+attack" bind "MOUSE1" "+attack"
bind "MOUSE2" "+popupmenu" bind "MOUSE2" "+movement"
bind "MOUSE3" "+popupmenu" bind "MOUSE3" "+popupmenu"
bind "MOUSE4" "lastinv" bind "MOUSE4" "lastinv"
bind "PAUSE" "pause" bind "PAUSE" "pause"
_snd_mixahead "0.1" _snd_mixahead "0.1"
ati_npatch "1.0" ati_npatch "0"
ati_subdiv "2.0" ati_subdiv "0"
bgmvolume "1.000000" bgmvolume "1.000000"
bottomcolor "144.889999" bottomcolor "144.889999"
brightness "1.000000" brightness "5"
cl_allowdownload "1" cl_allowdownload "1"
cl_allowupload "1" cl_allowupload "1"
cl_autohelp "1.0" cl_autohelp "1.0"
cl_buildmessages "1" cl_buildmessages "1"
cl_centerentityid "0.0" cl_centerentityid "0.0"
cl_cmdbackup "2" cl_cmdbackup "2"
cl_cmdrate "30" cl_cmdrate "100"
cl_cmhotkeys "qwerasdfzxcv" cl_cmhotkeys "qwerasdfzxcv"
cl_customcrosshair "0"
cl_dlmax "128" cl_dlmax "128"
cl_download_ingame "1" cl_download_ingame "1"
cl_dynamiclights "1" cl_dynamiclights "0"
cl_forcedefaultfov "0" cl_forcedefaultfov "0"
cl_gammaramp "1" cl_gammaramp "0"
cl_highdetail "1" cl_highdetail "1"
cl_himodels "0" cl_himodels "0"
cl_iconb "221"
cl_icong "149"
cl_iconr "0"
cl_idealpitchscale "0.8" cl_idealpitchscale "0.8"
cl_labelhivesight "1"
cl_labelmaps "1" cl_labelmaps "1"
cl_lc "1" cl_lc "1"
cl_logocolor "#Valve_Orange" cl_logocolor "#Valve_Orange"
@ -100,24 +97,26 @@ cl_logofile "lambda"
cl_lw "1" cl_lw "1"
cl_musicdelay "90" cl_musicdelay "90"
cl_musicdirectory "" cl_musicdirectory ""
cl_musicenabled "1.0"
cl_musicvolume "155" cl_musicvolume "155"
cl_musicenabled "0"
cl_particleinfo "0" cl_particleinfo "0"
cl_quickselecttime ".15" cl_quickselecttime ".15"
cl_timeout "60" cl_timeout "60"
cl_updaterate "20" cl_updaterate "100"
cl_vsmoothing "0.05" cl_vsmoothing "0.05"
con_color "255 180 30" con_color "255 180 30"
console "1.000000" console "1.000000"
crosshair "1.000000" crosshair "0"
fps_max "72.0" fps_max "250"
fps_override "1"
fps_modem "0.0" fps_modem "0.0"
gamma "2.500000" gamma "3"
gl_vsync "0"
gl_dither "1" gl_dither "1"
gl_flipmatrix "0" gl_flipmatrix "0"
gl_fog "1" gl_fog "1"
gl_monolights "0" gl_monolights "0"
gl_overbright "0" gl_overbright "1"
gl_polyoffset "0.1" gl_polyoffset "0.1"
hisound "1" hisound "1"
hpk_maxsize "4" hpk_maxsize "4"
@ -125,7 +124,7 @@ hud_capturemouse "1"
hud_centerid "0" hud_centerid "0"
hud_classautokill "1" hud_classautokill "1"
hud_draw "1" hud_draw "1"
hud_fastswitch "0" hud_fastswitch "1"
hud_takesshots "0" hud_takesshots "0"
joystick "0" joystick "0"
lookspring "0.000000" lookspring "0.000000"
@ -137,7 +136,7 @@ m_side "0.8"
m_yaw "0.022" m_yaw "0.022"
model "barney" model "barney"
MP3FadeTime "2.0" MP3FadeTime "2.0"
MP3Volume "0.8" MP3Volume "0"
mp_decals "300" mp_decals "300"
name "NSPlayer" name "NSPlayer"
net_graph "0" net_graph "0"
@ -162,7 +161,7 @@ s_refdelay "4"
s_refgain "0.4" s_refgain "0.4"
s_rolloff "1.0" s_rolloff "1.0"
s_verbwet "0.25" s_verbwet "0.25"
sensitivity "4.960000" sensitivity "2"
skin "" skin ""
suitvolume "0.250000" suitvolume "0.250000"
sv_aim "0" sv_aim "0"
@ -174,7 +173,14 @@ voice_enable "1"
voice_forcemicrecord "1" voice_forcemicrecord "1"
voice_modenable "1" voice_modenable "1"
voice_scale "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 +mlook
+jlook
exec userconfig.cfg exec userconfig.cfg

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
View 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
View 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
View 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

View file

@ -4,6 +4,7 @@
#include "chudmisc.h" #include "chudmisc.h"
#include "hud_spectator.h" #include "hud_spectator.h"
#include "AvHFont.h" #include "AvHFont.h"
#include "hud_crosshairs.h"
class CHud class CHud
@ -82,7 +83,8 @@ public:
CHudAmmoSecondary m_AmmoSecondary; CHudAmmoSecondary m_AmmoSecondary;
CHudTextMessage m_TextMessage; CHudTextMessage m_TextMessage;
CHudStatusIcons m_StatusIcons; CHudStatusIcons m_StatusIcons;
CHudCrosshairs m_Crosshairs;
AvHFont mFont; AvHFont mFont;
AvHFont mSmallFont; AvHFont mSmallFont;

View file

@ -72,7 +72,7 @@
<ShowIncludes>false</ShowIncludes> <ShowIncludes>false</ShowIncludes>
</ClCompile> </ClCompile>
<Link> <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> <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> <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> <IgnoreSpecificDefaultLibraries>
@ -170,6 +170,10 @@
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization> <Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </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"> <ClCompile Include="hud_msg.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization> <Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -190,6 +194,10 @@
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization> <Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </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"> <ClCompile Include="in_camera.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization> <Optimization Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">MaxSpeed</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -805,6 +813,8 @@
<ClInclude Include="GameStudioModelRenderer.h" /> <ClInclude Include="GameStudioModelRenderer.h" />
<ClInclude Include="health.h" /> <ClInclude Include="health.h" />
<ClInclude Include="hud.h" /> <ClInclude Include="hud.h" />
<ClInclude Include="hudgl.h" />
<ClInclude Include="hud_crosshairs.h" />
<ClInclude Include="hud_iface.h" /> <ClInclude Include="hud_iface.h" />
<ClInclude Include="hud_servers.h" /> <ClInclude Include="hud_servers.h" />
<ClInclude Include="hud_servers_priv.h" /> <ClInclude Include="hud_servers_priv.h" />

View file

@ -594,6 +594,12 @@
<ClCompile Include="cdll_int.cpp"> <ClCompile Include="cdll_int.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="hud_crosshairs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hudgl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\mod\AvHAlienAbilities.h"> <ClInclude Include="..\mod\AvHAlienAbilities.h">
@ -1040,6 +1046,12 @@
<ClInclude Include="..\textrep\TRTagValuePair.h"> <ClInclude Include="..\textrep\TRTagValuePair.h">
<Filter>textrep</Filter> <Filter>textrep</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="hud_crosshairs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hudgl.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Library Include="..\lib\public\game_controls.lib" /> <Library Include="..\lib\public\game_controls.lib" />

View file

@ -203,15 +203,15 @@ void CHud :: Init( void )
g_bDuckToggled = false; 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 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 );
m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE );
m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE );
cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" );
CVAR_CREATE( "cl_showspeed", "0", 0); CVAR_CREATE( "cl_showspeed", "0", 0);
CVAR_CREATE( kvLabelMaps, "1", FCVAR_ARCHIVE); CVAR_CREATE( kvLabelMaps, "3", FCVAR_ARCHIVE);
CVAR_CREATE( kvGammaRamp, "1", FCVAR_ARCHIVE); CVAR_CREATE( kvGammaRamp, "0", FCVAR_ARCHIVE);
CVAR_CREATE( kvCustomCrosshair, "1", FCVAR_ARCHIVE); CVAR_CREATE( kvCustomCrosshair, "1", FCVAR_ARCHIVE);
CVAR_CREATE( kvHudMapZoom, "3", FCVAR_ARCHIVE); CVAR_CREATE( kvHudMapZoom, "3", FCVAR_ARCHIVE);
CVAR_CREATE( kvLabelHivesight, "1", FCVAR_ARCHIVE); CVAR_CREATE( kvLabelHivesight, "1", FCVAR_ARCHIVE);
@ -251,6 +251,7 @@ void CHud :: Init( void )
m_AmmoSecondary.Init(); m_AmmoSecondary.Init();
m_TextMessage.Init(); m_TextMessage.Init();
m_StatusIcons.Init(); m_StatusIcons.Init();
m_Crosshairs.Init();
m_Spectator.m_chatEnabled = (m_SayText.m_HUD_saytext->value!=0); m_Spectator.m_chatEnabled = (m_SayText.m_HUD_saytext->value!=0);
@ -315,8 +316,16 @@ void CHud :: VidInit( void )
gHUD.SetViewport(theViewPort); gHUD.SetViewport(theViewPort);
mFont.Load("sprites/font_arial"); if (CVAR_GET_FLOAT("hud_style") == 2.0f)
mSmallFont.Load("sprites/font_arialsmall"); {
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 // Load Sprites
@ -335,6 +344,9 @@ void CHud :: VidInit( void )
if ( !m_pSpriteList ) if ( !m_pSpriteList )
{ {
// we need to load the hud.txt, and all sprites within // 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); m_pSpriteList = SPR_GetList("sprites/hud.txt", &m_iSpriteCountAllRes);
if (m_pSpriteList) if (m_pSpriteList)
@ -414,6 +426,7 @@ void CHud :: VidInit( void )
m_AmmoSecondary.VidInit(); m_AmmoSecondary.VidInit();
m_TextMessage.VidInit(); m_TextMessage.VidInit();
m_StatusIcons.VidInit(); m_StatusIcons.VidInit();
m_Crosshairs.VidInit();
GetClientVoiceMgr()->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 // the clients fov is actually set in the client data update section of the hud
// Set a new sensitivity // Set a new sensitivity
if ( m_iFOV == def_fov ) if ( m_iFOV == def_fov || CVAR_GET_FLOAT("senslock") == 1.0f)
{ {
// reset to saved sensitivity // reset to saved sensitivity
m_flMouseSensitivity = 0; m_flMouseSensitivity = 0;

View 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;
}

View 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);
};

View file

@ -70,7 +70,7 @@ void CHud::Think(void)
// the clients fov is actually set in the client data update section of the hud // the clients fov is actually set in the client data update section of the hud
// Set a new sensitivity // 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 // reset to saved sensitivity
m_flMouseSensitivity = 0; m_flMouseSensitivity = 0;

View 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

View 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
};

View file

@ -138,6 +138,9 @@ cvar_t *cl_dynamiclights;
cvar_t *cl_buildmessages; cvar_t *cl_buildmessages;
cvar_t *cl_particleinfo; cvar_t *cl_particleinfo;
cvar_t *cl_widescreen; 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_autohelp = gEngfuncs.pfnRegisterVariable ( kvAutoHelp, "1.0", FCVAR_ARCHIVE );
cl_centerentityid = gEngfuncs.pfnRegisterVariable ( kvCenterEntityID, "0.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_musicvolume = gEngfuncs.pfnRegisterVariable ( kvMusicVolume, "155", FCVAR_ARCHIVE );
cl_musicdir = gEngfuncs.pfnRegisterVariable ( kvMusicDirectory, "", FCVAR_ARCHIVE); cl_musicdir = gEngfuncs.pfnRegisterVariable ( kvMusicDirectory, "", FCVAR_ARCHIVE);
cl_musicdelay = gEngfuncs.pfnRegisterVariable ( kvMusicDelay, "90", 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_forcedefaultfov = gEngfuncs.pfnRegisterVariable ( kvForceDefaultFOV, "0", FCVAR_ARCHIVE );
cl_particleinfo = gEngfuncs.pfnRegisterVariable ( kvParticleInfo, "0", FCVAR_ARCHIVE ); cl_particleinfo = gEngfuncs.pfnRegisterVariable ( kvParticleInfo, "0", FCVAR_ARCHIVE );
cl_widescreen = gEngfuncs.pfnRegisterVariable ( kvWidescreen, "1", 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. // Initialize third person camera controls.
CAM_Init(); CAM_Init();

View file

@ -161,10 +161,10 @@ void SpectatorPanel::Initialize()
Font* font = pSchemes->getFont(hSmallScheme); Font* font = pSchemes->getFont(hSmallScheme);
//m_TopBorder = new CTransparentPanel(64, 0, 0, ScreenWidth, YRES(PANEL_HEIGHT)); //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_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); m_BottomBorder->setParent(this);
setPaintBackgroundEnabled(false); setPaintBackgroundEnabled(false);
@ -259,8 +259,8 @@ void SpectatorPanel::Initialize()
m_overviewButton->setFont(font); m_overviewButton->setFont(font);
m_overviewButton->setParent( m_BottomBorder ); m_overviewButton->setParent( m_BottomBorder );
m_overviewButton->SetText("Overview"); m_overviewButton->SetText("Overview");
m_overviewButton->setPos(XRES(10), YRES(6)); m_overviewButton->setPos(XRES(150), YRES(6));
m_overviewButton->setSize(XRES(100), YRES(20)); m_overviewButton->setSize(XRES(50), YRES(20));
m_overviewButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga"); m_overviewButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga");
m_overviewButton->SetHandler(new Spectator_CheckButtonHandler(this)); m_overviewButton->SetHandler(new Spectator_CheckButtonHandler(this));
m_overviewButton->SetTextColor(colorR, colorG, colorB, 0); m_overviewButton->SetTextColor(colorR, colorG, colorB, 0);
@ -269,8 +269,8 @@ void SpectatorPanel::Initialize()
m_firstPersonButton->setFont(font); m_firstPersonButton->setFont(font);
m_firstPersonButton->setParent( m_BottomBorder ); m_firstPersonButton->setParent( m_BottomBorder );
m_firstPersonButton->SetText("First person"); m_firstPersonButton->SetText("First person");
m_firstPersonButton->setPos(XRES(10 + 100), YRES(6)); m_firstPersonButton->setPos(XRES(150 + 50), YRES(6));
m_firstPersonButton->setSize(XRES(100), YRES(20)); m_firstPersonButton->setSize(XRES(50), YRES(20));
m_firstPersonButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga"); m_firstPersonButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga");
m_firstPersonButton->SetHandler(new Spectator_CheckButtonHandler(this)); m_firstPersonButton->SetHandler(new Spectator_CheckButtonHandler(this));
m_firstPersonButton->SetTextColor(colorR, colorG, colorB, 0); m_firstPersonButton->SetTextColor(colorR, colorG, colorB, 0);
@ -279,8 +279,8 @@ void SpectatorPanel::Initialize()
m_autoDirectorButton->setFont(font); m_autoDirectorButton->setFont(font);
m_autoDirectorButton->setParent( m_BottomBorder ); m_autoDirectorButton->setParent( m_BottomBorder );
m_autoDirectorButton->SetText("Auto-director"); m_autoDirectorButton->SetText("Auto-director");
m_autoDirectorButton->setPos(XRES(10 + 200), YRES(6)); m_autoDirectorButton->setPos(XRES(150 + 100), YRES(6));
m_autoDirectorButton->setSize(XRES(100), YRES(20)); m_autoDirectorButton->setSize(XRES(50), YRES(20));
m_autoDirectorButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga"); m_autoDirectorButton->SetImages("gfx/vgui/640_checkset.tga", "gfx/vgui/640_checkunset.tga");
m_autoDirectorButton->SetHandler(new Spectator_CheckButtonHandler(this)); m_autoDirectorButton->SetHandler(new Spectator_CheckButtonHandler(this));
m_autoDirectorButton->SetTextColor(colorR, colorG, colorB, 0); m_autoDirectorButton->SetTextColor(colorR, colorG, colorB, 0);

View file

@ -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 // // Adjust the viewport so that the letterbox spectator mode
// doesn't cut anything off. // // doesn't cut anything off.
//
pparams->viewport[1] += YRES(32); // pparams->viewport[1] += YRES(32);
pparams->viewport[3] -= YRES(32 * 2); //pparams->viewport[3] -= YRES(32 * 2);
//
} // }
if ( gHUD.m_Spectator.IsInOverviewMode()) if ( gHUD.m_Spectator.IsInOverviewMode())
{ {

View file

@ -40,7 +40,8 @@
// UNDONE: Do we need these? // UNDONE: Do we need these?
#define FL_IMMUNE_WATER (1<<17) #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_IMMUNE_LAVA (1<<19)
#define FL_PROXY (1<<20) // This is a spectator proxy #define FL_PROXY (1<<20) // This is a spectator proxy
@ -67,7 +68,7 @@
// edict->movetype values // edict->movetype values
#define MOVETYPE_NONE 0 // never moves #define MOVETYPE_NONE 0 // never moves
//#define MOVETYPE_ANGLENOCLIP 1 //#define MOVETYPE_ANGLENOCLIP 1
//#define MOVETYPE_ANGLECLIP 2 //#define MOVETYPE_JUMPHELD 2
#define MOVETYPE_WALK 3 // Player only - moving on the ground #define MOVETYPE_WALK 3 // Player only - moving on the ground
#define MOVETYPE_STEP 4 // gravity, special edge handling -- monsters use this #define MOVETYPE_STEP 4 // gravity, special edge handling -- monsters use this
#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff #define MOVETYPE_FLY 5 // No gravity, but still collides with stuff

View file

@ -121,6 +121,7 @@ cvar_t avh_autoconcede = {kvAutoConcede, "4", FCVAR_SERVER};
cvar_t avh_combattime = {kvCombatTime, "10", FCVAR_SERVER}; cvar_t avh_combattime = {kvCombatTime, "10", FCVAR_SERVER};
cvar_t avh_mapvoteratio = {kvMapVoteRatio, ".6", FCVAR_SERVER}; cvar_t avh_mapvoteratio = {kvMapVoteRatio, ".6", FCVAR_SERVER};
cvar_t avh_blockscripts = {kvBlockScripts, "1", FCVAR_SERVER}; cvar_t avh_blockscripts = {kvBlockScripts, "1", FCVAR_SERVER};
cvar_t avh_jumpmode = {kvJumpMode, "1", FCVAR_SERVER};
#ifdef DEBUG #ifdef DEBUG
cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER}; cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER};
#endif #endif
@ -230,6 +231,7 @@ void GameDLLInit( void )
CVAR_REGISTER (&avh_combattime); CVAR_REGISTER (&avh_combattime);
CVAR_REGISTER (&avh_mapvoteratio); CVAR_REGISTER (&avh_mapvoteratio);
CVAR_REGISTER (&avh_blockscripts); CVAR_REGISTER (&avh_blockscripts);
CVAR_REGISTER (&avh_jumpmode);
// TODO: Remove // TODO: Remove
CVAR_REGISTER (&avh_ironman); CVAR_REGISTER (&avh_ironman);

View file

@ -3156,6 +3156,16 @@ void CBasePlayer::Spawn( void )
g_engfuncs.pfnSetPhysicsKeyValue( edict(), "slj", "0" ); g_engfuncs.pfnSetPhysicsKeyValue( edict(), "slj", "0" );
g_engfuncs.pfnSetPhysicsKeyValue( edict(), "hl", "1" ); 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. pev->fov = m_iFOV = 0;// init field of view.
m_iClientFOV = -1; // make sure fov reset is sent m_iClientFOV = -1; // make sure fov reset is sent

View file

@ -240,8 +240,17 @@ void CAmbientGeneric :: Precache( void )
} }
if ( m_fActive ) 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); (m_dpv.vol * 0.01), m_flAttenuation, SND_SPAWNING, m_dpv.pitch);
}
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1;
} }
@ -433,8 +442,18 @@ void CAmbientGeneric :: RampThink( void )
if (pitch == PITCH_NORM) if (pitch == PITCH_NORM)
pitch = PITCH_NORM + 1; // don't send 'no pitch' ! 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); (vol * 0.01), m_flAttenuation, flags, pitch);
}
} }
// update ramps at 5hz // update ramps at 5hz
@ -631,8 +650,17 @@ void CAmbientGeneric :: ToggleUse ( CBaseEntity *pActivator, CBaseEntity *pCalle
InitModulationParms(); 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); (m_dpv.vol * 0.01), m_flAttenuation, 0, m_dpv.pitch);
}
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1;

View file

@ -31,7 +31,7 @@ ELF-GC-DYNSTR=./elf-gc-dynstr
ifeq ($(OS),Linux) ifeq ($(OS),Linux)
CC="gcc -m32" 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 CPP_LIB:=-L$(shell g++ -m32 -print-file-name=libstdc++.so | xargs dirname) -lstdc++ -ldl -lpthread
endif endif

View file

@ -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 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) 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 else
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -lpng -lz -lfmod-3.75 -L$(CFG) vgui.so -L. libSDL2-2.0.so.0 -L. libparticleMP.a LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -lpng -lz -lfmod-3.75 -L$(CFG) vgui.so -L. libSDL2-2.0.so.0 -L. libparticleMP.a
endif endif
@ -60,11 +60,13 @@ HL1_OBJS = \
$(HL1_OBJ_DIR)/GameStudioModelRenderer.o \ $(HL1_OBJ_DIR)/GameStudioModelRenderer.o \
$(HL1_OBJ_DIR)/geiger.o \ $(HL1_OBJ_DIR)/geiger.o \
$(HL1_OBJ_DIR)/hud.o \ $(HL1_OBJ_DIR)/hud.o \
$(HL1_OBJ_DIR)/hud_crosshairs.o \
$(HL1_OBJ_DIR)/hud_msg.o \ $(HL1_OBJ_DIR)/hud_msg.o \
$(HL1_OBJ_DIR)/hud_redraw.o \ $(HL1_OBJ_DIR)/hud_redraw.o \
$(HL1_OBJ_DIR)/hud_servers.o \ $(HL1_OBJ_DIR)/hud_servers.o \
$(HL1_OBJ_DIR)/hud_spectator.o \ $(HL1_OBJ_DIR)/hud_spectator.o \
$(HL1_OBJ_DIR)/hud_update.o \ $(HL1_OBJ_DIR)/hud_update.o \
$(HL1_OBJ_DIR)/hudgl.o \
$(HL1_OBJ_DIR)/in_camera.o \ $(HL1_OBJ_DIR)/in_camera.o \
$(HL1_OBJ_DIR)/input.o \ $(HL1_OBJ_DIR)/input.o \
$(HL1_OBJ_DIR)/inputw32.o \ $(HL1_OBJ_DIR)/inputw32.o \

View file

@ -36,7 +36,7 @@ extern cvar_t* cl_musicdir;
// Variables // Variables
#define kvAutoHelp "cl_autohelp" #define kvAutoHelp "cl_autohelp"
// : 1064 The cl var that controls the display of labelled minimaps // : 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 // : 0001070 - enables forced gamma ramp loading
#define kvGammaRamp "cl_gammaramp" #define kvGammaRamp "cl_gammaramp"
@ -48,6 +48,7 @@ extern cvar_t* cl_musicdir;
#define kvCMHotKeys "cl_cmhotkeys" #define kvCMHotKeys "cl_cmhotkeys"
#define kvForceDefaultFOV "cl_forcedefaultfov" #define kvForceDefaultFOV "cl_forcedefaultfov"
#define kvWidescreen "cl_widescreen" #define kvWidescreen "cl_widescreen"
#define kvAmbientSound "cl_ambientsound"
#define kvCenterEntityID "cl_centerentityid" #define kvCenterEntityID "cl_centerentityid"
#define kvHighDetail "cl_highdetail" #define kvHighDetail "cl_highdetail"
#define kvCMHotkeys "cl_cmhotkeys" #define kvCMHotkeys "cl_cmhotkeys"

View file

@ -428,6 +428,7 @@ extern const char* getModName(void);
#define kSpriteDirectory "sprites" #define kSpriteDirectory "sprites"
#define kMiniMapSpritesDirectory "sprites/minimaps" #define kMiniMapSpritesDirectory "sprites/minimaps"
#define kTechTreeSpriteDirectory "sprites/techtree" #define kTechTreeSpriteDirectory "sprites/techtree"
#define kTechTreeSpriteDirectoryNL "sprites/nl/techtree"
#define kTechTreeSpritePrefix "tech" #define kTechTreeSpritePrefix "tech"
#define kScriptsDirectory "scripts" #define kScriptsDirectory "scripts"
#define kSoundDirectory "sound" #define kSoundDirectory "sound"

View file

@ -684,11 +684,18 @@ void AvHNoBuild::Spawn()
AvHMP3Audio::AvHMP3Audio() AvHMP3Audio::AvHMP3Audio()
{ {
this->mUseState = false; 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; this->mLooping = false;
} }
@ -706,7 +713,16 @@ void AvHMP3Audio::KeyValue( KeyValueData* pkvd )
} }
else if(FStrEq(pkvd->szKeyName, "soundvolume")) 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; pkvd->fHandled = TRUE;
} }
else if(FStrEq(pkvd->szKeyName, "fadedistance")) else if(FStrEq(pkvd->szKeyName, "fadedistance"))

View file

@ -328,6 +328,7 @@ AvHGamerules::AvHGamerules() : mTeamA(TEAM_ONE), mTeamB(TEAM_TWO)
this->mSpawnEntity = NULL; this->mSpawnEntity = NULL;
RegisterServerVariable(&avh_blockscripts); RegisterServerVariable(&avh_blockscripts);
RegisterServerVariable(&avh_jumpmode);
RegisterServerVariable(&avh_tournamentmode); RegisterServerVariable(&avh_tournamentmode);
RegisterServerVariable(&avh_team1damagepercent); RegisterServerVariable(&avh_team1damagepercent);
RegisterServerVariable(&avh_team2damagepercent); RegisterServerVariable(&avh_team2damagepercent);

View file

@ -36,7 +36,7 @@ const float kPlayerStatusStatusSpacing = .02f;
// health armor inset (it is inset by the alien energy indicator for aliens) // health armor inset (it is inset by the alien energy indicator for aliens)
const float kHealthLeftInset = .05f; const float kHealthLeftInset = .05f;
const float kArmorLeftInset = .2f; const float kArmorLeftInset = .1f;
// blip size // blip size
const float kWorldBlipScale = 100; const float kWorldBlipScale = 100;

View file

@ -2192,7 +2192,11 @@ AVHHSPRITE AvHHud::GetTechTreeSprite(AvHMessageID inMessageID)
char theMessageNumberString[16]; char theMessageNumberString[16];
sprintf(theMessageNumberString, "%d", (int)theMessageNumber); sprintf(theMessageNumberString, "%d", (int)theMessageNumber);
//string theSpriteName = kTechTreeSpriteDirectory + string("/") + kTechTreeSpritePrefix + string(theMessageIDString) + string(".spr"); //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()); AVHHSPRITE theSpriteHandle = SPR_Load(theSpriteName.c_str());
// Sprite handle can be 0, as I don't have sprites for all tech yet // 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); // string theSpriteName = "sprites/level1_hud.spr";//UINameToSprite(theBaseName, theScreenWidth, true);
// this->mAlienUILifeforms[i] = SPR_Load(theSpriteName.c_str()); // 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]; char theBaseName[128];
sprintf(theBaseName, "%s", kAlienUpgradeSprite);
theSpriteName = UINameToSprite(theBaseName, theScreenWidth);
this->mAlienUIUpgrades = SPR_Load(theSpriteName.c_str());
sprintf(theBaseName, "%s", kAlienUpgradeCategory); sprintf(theBaseName, "%s", kAlienUpgradeCategory);
theSpriteName = UINameToSprite(theBaseName, theScreenWidth); theSpriteName = UINameToSprite(theBaseName, theScreenWidth);
this->mAlienUIUpgradeCategories = SPR_Load(theSpriteName.c_str()); this->mAlienUIUpgradeCategories = SPR_Load(theSpriteName.c_str());
@ -4385,25 +4469,6 @@ void AvHHud::VidInit(void)
theSpriteName = UINameToSprite(kJetpackSprite, theScreenWidth); theSpriteName = UINameToSprite(kJetpackSprite, theScreenWidth);
this->mMarineUIJetpackSprite = SPR_Load(theSpriteName.c_str()); 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/distorttest.spr");
//this->mTopDownBottomSprite = SPR_Load("sprites/ns.spr"); //this->mTopDownBottomSprite = SPR_Load("sprites/ns.spr");
//this->mTopDownBottomSprite = SPR_Load("sprites/distorttest.spr"); //this->mTopDownBottomSprite = SPR_Load("sprites/distorttest.spr");
@ -4412,17 +4477,9 @@ void AvHHud::VidInit(void)
this->mMembraneSprite = SPR_Load(kMembraneSprite); this->mMembraneSprite = SPR_Load(kMembraneSprite);
this->mDigestingSprite = SPR_Load(kDigestingSprite); 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 // Load cursor sprite
this->mMarineCursor = SPR_Load(kCursorsSprite); this->mMarineCursor = SPR_Load(kCursorsSprite);
this->mAlienCursor = SPR_Load(kAlienCursorSprite); this->mAlienCursor = SPR_Load(kAlienCursorSprite);
this->mMarineOrderIndicator = SPR_Load(kMarineOrderSprite);
this->mMarineUpgradesSprite = SPR_Load(kMarineUpgradesSprite);
//this->mMappingTechSprite = SPR_Load("sprites/ns.spr"); //this->mMappingTechSprite = SPR_Load("sprites/ns.spr");
this->mAlienBuildSprite = SPR_Load(kAlienBuildSprite); this->mAlienBuildSprite = SPR_Load(kAlienBuildSprite);

View file

@ -224,23 +224,28 @@ string AvHMiniMap::GetSpriteNameFromMap(int inSpriteWidth, const string& inMapNa
sprintf(theWidthString, "%d", inSpriteWidth); sprintf(theWidthString, "%d", inSpriteWidth);
// : 1064 // : 1064
// insert _labelled into the filename before ".spr" // insert _labelled into the filename before ".spr"
string extraname=""; string extraname = "";
switch ( useLabels ) { switch (useLabels) {
case 1: case 1:
extraname="_1"; extraname = "_1";
break; break;
case 2: case 2:
extraname="_2"; extraname = "_2";
break; break;
case 3: case 3:
extraname="_3"; extraname = "_3";
break; break;
default: case 4:
break; extraname = "_4";
break;
case 5:
extraname = "_5";
break;
default:
break;
} }
string theMiniMapName = kMiniMapSpritesDirectory + string("/") /*+ string(theWidthString)*/ + inMapName + extraname + string(".spr"); string theMiniMapName = kMiniMapSpritesDirectory + string("/") /*+ string(theWidthString)*/ + inMapName + extraname + string(".spr");
// : return theMiniMapName;
return theMiniMapName;
} }
void AvHMiniMap::InitializePalette() void AvHMiniMap::InitializePalette()

View file

@ -44,6 +44,7 @@
#include "AvHCommandConstants.h" #include "AvHCommandConstants.h"
#include "../engine/cdll_int.h" #include "../engine/cdll_int.h"
#include "../types.h" #include "../types.h"
#include <SDL2/SDL_mouse.h>
#include <string> #include <string>
using std::string; using std::string;
@ -118,7 +119,7 @@ void AvHPieMenuHandler::ClosePieMenu(void)
// Reset the mouse cursor to the center of the screen so // Reset the mouse cursor to the center of the screen so
// that the view doesn't jog once the pie menu is closed. // that the view doesn't jog once the pie menu is closed.
IN_ResetMouse(); IN_ResetMouse();
gHUD.ShowCrosshair(); gHUD.ShowCrosshair();
@ -136,6 +137,10 @@ void AvHPieMenuHandler::InternalClosePieMenu(void)
if(!gHUD.GetInTopDownMode()) if(!gHUD.GetInTopDownMode())
{ {
gHUD.GetManager().SetMouseVisibility(false); gHUD.GetManager().SetMouseVisibility(false);
//attempt at fixing OS cursor appearing over game's cursor
#ifdef WIN32
ShowCursor(TRUE);
#endif
} }
theMarineMenu->SetFadeState(false); theMarineMenu->SetFadeState(false);
@ -145,6 +150,11 @@ void AvHPieMenuHandler::InternalClosePieMenu(void)
} }
sLastNodeHighlighted = NULL; sLastNodeHighlighted = NULL;
if (CVAR_GET_FLOAT("m_rawinput") != 0)
{
SDL_SetRelativeMouseMode(SDL_TRUE);
}
// if(sTheDebugBool) // if(sTheDebugBool)
// { // {
// AvHTeamHierarchy* theHierarchyComponent = NULL; // AvHTeamHierarchy* theHierarchyComponent = NULL;
@ -175,10 +185,23 @@ void AvHPieMenuHandler::OpenPieMenu(void)
if(!gHUD.GetInTopDownMode()) if(!gHUD.GetInTopDownMode())
{ {
gHUD.GetManager().SetMouseVisibility(true); gHUD.GetManager().SetMouseVisibility(true);
//attempt at fixing OS cursor appearing over game's cursor
#ifdef WIN32
ShowCursor(FALSE);
#endif
} }
gHUD.HideCrosshair(); 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 // Only do this when in full screen
//App::getInstance()->setCursorPos(ScreenWidth/2, ScreenHeight/2); //App::getInstance()->setCursorPos(ScreenWidth/2, ScreenHeight/2);
@ -189,7 +212,7 @@ void AvHPieMenuHandler::OpenPieMenu(void)
sTimeLastNodeHighlighted = sTimeMenuOpened; sTimeLastNodeHighlighted = sTimeMenuOpened;
sPieMenuOpen = true; sPieMenuOpen = true;
// if(sTheDebugBool) // if(sTheDebugBool)
// { // {
// AvHTeamHierarchy* theHierarchyComponent = NULL; // AvHTeamHierarchy* theHierarchyComponent = NULL;

View file

@ -9329,8 +9329,8 @@ void AvHPlayer::UpdateAmbientSounds()
int theBaseSpeed, theMaxSpeed; int theBaseSpeed, theMaxSpeed;
this->GetSpeeds(theBaseSpeed, theMaxSpeed); this->GetSpeeds(theBaseSpeed, theMaxSpeed);
float theAlienSoundFreq = 0.003f; float theAlienSoundFreq = 0.3f;
float theChanceOfPlayingSound = theAlienSoundFreq*(theVelocity/((float)theMaxSpeed)); float theChanceOfPlayingSound = gpGlobals->frametime*theAlienSoundFreq*(theVelocity/((float)theMaxSpeed));
if(RANDOM_FLOAT(0, 1) < theChanceOfPlayingSound) if(RANDOM_FLOAT(0, 1) < theChanceOfPlayingSound)
{ {
float theVolume = RANDOM_FLOAT(.5, 1.0)*theSilenceVolumeFactor; float theVolume = RANDOM_FLOAT(.5, 1.0)*theSilenceVolumeFactor;

View file

@ -67,6 +67,7 @@
#include "../common/cvardef.h" #include "../common/cvardef.h"
extern cvar_t avh_blockscripts; extern cvar_t avh_blockscripts;
extern cvar_t avh_jumpmode;
extern cvar_t avh_combattime; extern cvar_t avh_combattime;
extern cvar_t *avh_cheats; extern cvar_t *avh_cheats;
extern cvar_t avh_defaultteam; extern cvar_t avh_defaultteam;
@ -143,5 +144,6 @@ float ns_cvar_float(const cvar_t *cvar);
#define kvMapVoteRatio "mp_mapvoteratio" #define kvMapVoteRatio "mp_mapvoteratio"
#define kvBlockScripts "mp_blockscripts" #define kvBlockScripts "mp_blockscripts"
#define kvJumpMode "sv_jumpmode"
#endif #endif

View file

@ -50,7 +50,9 @@
#define kJetpackSprite "jetpack" #define kJetpackSprite "jetpack"
#define kAlienEnergySprite "a-energy" #define kAlienEnergySprite "a-energy"
#define kAlienEnergySpriteNL "sprites/nl/640a-energy.spr"
#define kAlienCloakSprite "a-cloak" #define kAlienCloakSprite "a-cloak"
#define kAlienCloakSpriteNL "sprites/nl/640a-cloak.spr"
#define kAlienResourceSprite "a-resources" #define kAlienResourceSprite "a-resources"
#define kCombatExperienceSprite "experience" #define kCombatExperienceSprite "experience"
@ -60,27 +62,46 @@
//#define kHiveSprite "hive" //#define kHiveSprite "hive"
//#define kLifeformSprite "alien" //#define kLifeformSprite "alien"
#define kAlienUpgradeSprite "alienupgrades" #define kAlienUpgradeSprite "alienupgrades"
#define kAlienUpgradeSpriteNL "sprites/nl/640alienupgrades.spr"
#define kAlienUpgradeCategory "alienupgradecategories" #define kAlienUpgradeCategory "alienupgradecategories"
#define kOrdersSprite "order" #define kOrdersSprite "order"
#define kOrdersSpriteNL "sprites/nl/640order.spr"
#define kAlienCursorSprite "sprites/aliencursor.spr" #define kAlienCursorSprite "sprites/aliencursor.spr"
#define kTopDownBGSprite "sprites/topdownbg.spr" #define kTopDownBGSprite "sprites/topdownbg.spr"
#define kTopDownBGSpriteNL "sprites/nl/topdownbg.spr"
#define kTopDownTopHUDSprite "sprites/topdowntop.spr" #define kTopDownTopHUDSprite "sprites/topdowntop.spr"
#define kTopDownTopHUDSpriteNL "sprites/nl/topdowntop.spr"
#define kTopDownTopHUDSpriteMin "sprites/minimal/topdowntop.spr"
#define kTopDownBottomHUDSprite "sprites/topdownbottom.spr" #define kTopDownBottomHUDSprite "sprites/topdownbottom.spr"
#define kTopDownBottomHUDSpriteNL "sprites/nl/topdownbottom.spr"
#define kTopDownBottomHUDSpriteMin "sprites/minimal/topdownbottom.spr"
#define kMarineTopHUDSprite "sprites/mainhud.spr" #define kMarineTopHUDSprite "sprites/mainhud.spr"
#define kMarineTopHUDSpriteNL "sprites/nl/mainhud.spr"
#define kMarineTopHUDSpriteMin "sprites/minimal/mainhud.spr"
#define kLogoutSprite "sprites/logout.spr" #define kLogoutSprite "sprites/logout.spr"
#define kLogoutSpriteNL "sprites/nl/logout.spr"
#define kHiveInfoSprite "sprites/hiveinfo.spr" #define kHiveInfoSprite "sprites/hiveinfo.spr"
#define kHiveInfoSpriteNL "sprites/nl/hiveinfo.spr"
#define kHiveHealthSprite "sprites/hivehealth.spr" #define kHiveHealthSprite "sprites/hivehealth.spr"
#define kHiveHealthSpriteNL "sprites/nl/hivehealth.spr"
#define kCursorsSprite "sprites/cursors.spr" #define kCursorsSprite "sprites/cursors.spr"
#define kCommandButtonSprite "sprites/commandbutton.spr" #define kCommandButtonSprite "sprites/commandbutton.spr"
#define kCommandButtonSpriteNL "sprites/nl/commandbutton.spr"
#define kCommandStatusSprite "sprites/commandstatus.spr" #define kCommandStatusSprite "sprites/commandstatus.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 kSelectAllSprite "sprites/selectall.spr"
#define kSelectAllSpriteNL "sprites/nl/selectall.spr"
#define kSelectAllSpriteMin "sprites/minimal/selectall.spr"
#define kMarineOrderSprite "sprites/hudorder.spr" #define kMarineOrderSprite "sprites/hudorder.spr"
#define kMarineOrderSpriteNL "sprites/nl/hudorder.spr"
#define kMarineUpgradesSprite "sprites/upgrades.spr" #define kMarineUpgradesSprite "sprites/upgrades.spr"
#define kMarineUpgradesSpriteNL "sprites/nl/upgrades.spr"
#define kAlienBuildSprite "sprites/ba-build.spr" #define kAlienBuildSprite "sprites/ba-build.spr"
#define kMarineBuildSprite "sprites/b-build.spr" #define kMarineBuildSprite "sprites/b-build.spr"
@ -116,6 +137,7 @@
#define kOverwatchCenterSprite "sprites/overwatch-center.spr" #define kOverwatchCenterSprite "sprites/overwatch-center.spr"
#define kReticleSprite "sprites/reticle.spr" #define kReticleSprite "sprites/reticle.spr"
#define kReticleSpriteNL "sprites/nl/reticle.spr"
#define kMarinePlayersSprite "sprites/iplayerm.spr" #define kMarinePlayersSprite "sprites/iplayerm.spr"
#define kAlienPlayersSprite "sprites/iplayera.spr" #define kAlienPlayersSprite "sprites/iplayera.spr"
#define kStructuresSprite "sprites/itech.spr" #define kStructuresSprite "sprites/itech.spr"

View file

@ -159,6 +159,7 @@ extern int gBlinkEffectSuccessEventID;
#include "../mod/AvHSelectionHelper.h" #include "../mod/AvHSelectionHelper.h"
int gHeightLevel = 0; int gHeightLevel = 0;
int JpEventTimer = 0;
const float kMarineBackpedalSpeedScalar = .4f; const float kMarineBackpedalSpeedScalar = .4f;
const float kMarineSidestepSpeedScalar = 1.0f; const float kMarineSidestepSpeedScalar = 1.0f;
@ -5334,12 +5335,13 @@ void PM_Jump (void)
{ {
int i; int i;
qboolean tfc = false; qboolean tfc = false;
qboolean autojump = false;
qboolean queuedjump = false;
qboolean cansuperjump = false; qboolean cansuperjump = false;
if (pmove->dead || GetHasUpgrade(pmove->iuser4, MASK_ENSNARED)) if (pmove->dead || GetHasUpgrade(pmove->iuser4, MASK_ENSNARED))
{ {
pmove->oldbuttons |= IN_JUMP ; // don't jump again until released pmove->flags |= FL_JUMPHELD;
return; return;
} }
@ -5449,7 +5451,7 @@ void PM_Jump (void)
// Flag that we jumped. // Flag that we jumped.
// HACK HACK HACK // HACK HACK HACK
// Remove this when the game .dll no longer does physics code!!!! // 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 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) ) // if ( pmove->oldbuttons & IN_JUMP && (pmove->velocity[0] == 0 || !theIsAlien || pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3) )
//return; // don't pogo stick //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 return; // don't pogo stick
}
if (queuedjump)
{
if (pmove->flags & FL_JUMPHELD)
return;
}
// In the air now. // In the air now.
pmove->onground = -1; pmove->onground = -1;
@ -5513,7 +5527,8 @@ void PM_Jump (void)
PM_FixupGravityVelocity(); PM_FixupGravityVelocity();
// Flag that we jumped. // 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[1] += (theWishVelocity[1] / pmove->clientmaxspeed) * (theTimePassed * theWeightScalar*kJetpackForce);
pmove->velocity[2] += theTimePassed*theWeightScalar*kJetpackForce; pmove->velocity[2] += theTimePassed*theWeightScalar*kJetpackForce;
// Play an event every so often //FPS independent jetpack event. Scales with FPS without timer.
if(pmove->runfuncs /*&& (pmove->RandomLong(0, 2) == 0)*/) JpEventTimer += pmove->cmd.msec;
{ if (JpEventTimer > 7)
pmove->PM_PlaybackEventFull(0, pmove->player_index, gJetpackEventID, 0, (float *)pmove->origin, (float *)pmove->origin, 0.0, 0.0, /*theWeaponIndex*/ 0, 0, 0, 0 ); {
} // 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; float theJetpackEnergy = pmove->fuser3/kNormalizationNetworkFactor;
@ -6678,6 +6699,7 @@ void PM_PlayerMove ( qboolean server )
else else
{ {
pmove->oldbuttons &= ~IN_JUMP; 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, // Fricion is handled before we add in any base velocity. That way, if we are on a conveyor,

View file

@ -121,7 +121,7 @@
#define kGameHDSpaceNeeded 300 #define kGameHDSpaceNeeded 300
#define kGameVersionMajor 3 #define kGameVersionMajor 3
#define kGameVersionMinor 2 #define kGameVersionMinor 2
#define kGameVersionRevision 1 #define kGameVersionRevision 2
#define kGestateBaseArmor 150 #define kGestateBaseArmor 150
#define kGestateHealth 200 #define kGestateHealth 200
#define kGorgeArmorUpgrade 50 #define kGorgeArmorUpgrade 50

BIN
main/sprites/640nlhud7.spr Normal file

Binary file not shown.

149
main/sprites/hudnl.txt Normal file
View 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
main/sprites/nl/logout.spr Normal file

Binary file not shown.

BIN
main/sprites/nl/mainhud.spr Normal file

Binary file not shown.

BIN
main/sprites/nl/reticle.spr Normal file

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more