Skip to content

Commit

Permalink
Merge branch 'opfor' into opforfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Jul 17, 2023
2 parents 4ce187e + ee12570 commit 9bcc5fb
Show file tree
Hide file tree
Showing 36 changed files with 677 additions and 68 deletions.
16 changes: 3 additions & 13 deletions cl_dll/ev_hldm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,8 @@ void EV_FireM249( event_args_t *args )

AngleVectors( angles, forward, right, up );

shell = gEngfuncs.pEventAPI->EV_FindModelIndex( "models/saw_shell.mdl" );// brass shell
const bool bAlternatingEject = args->bparam1 != 0;
shell = bAlternatingEject ? gEngfuncs.pEventAPI->EV_FindModelIndex("models/saw_link.mdl") : gEngfuncs.pEventAPI->EV_FindModelIndex( "models/saw_shell.mdl" );// brass shell

if( EV_IsLocal( idx ) )
{
Expand All @@ -1999,18 +2000,7 @@ void EV_FireM249( event_args_t *args )

EV_EjectBrass( ShellOrigin, ShellVelocity, angles[YAW], shell, TE_BOUNCE_SHELL );

switch( gEngfuncs.pfnRandomLong( 0, 2 ) )
{
case 0:
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/saw_fire1.wav", 1, ATTN_NORM, 0, PITCH_NORM);
break;
case 1:
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/saw_fire2.wav", 1, ATTN_NORM, 0, PITCH_NORM);
break;
case 2:
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/saw_fire3.wav", 1, ATTN_NORM, 0, PITCH_NORM);
break;
}
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/saw_fire1.wav", 1, ATTN_NORM, 0, PITCH_NORM);

EV_GetGunPosition( args, vecSrc, origin );
VectorCopy( forward, vecAiming );
Expand Down
5 changes: 1 addition & 4 deletions cl_dll/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ extern client_sprite_t *GetSpriteList( client_sprite_t *pList, const char *psz,
extern cvar_t *sensitivity;
cvar_t *cl_lw = NULL;
cvar_t *cl_viewbob = NULL;
cvar_t *cl_rollspeed;
cvar_t *cl_rollangle;

void ShutdownInput( void );

Expand Down Expand Up @@ -383,8 +381,7 @@ void CHud::Init( void )
m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE );
cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" );
cl_viewbob = CVAR_CREATE( "cl_viewbob", "0", FCVAR_ARCHIVE );
cl_rollangle = gEngfuncs.pfnRegisterVariable( "cl_rollangle", "0", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );
cl_rollspeed = gEngfuncs.pfnRegisterVariable( "cl_rollspeed", "200", FCVAR_CLIENTDLL | FCVAR_ARCHIVE );

m_pSpriteList = NULL;

// Clear any old HUD list
Expand Down
Loading

0 comments on commit 9bcc5fb

Please sign in to comment.