diff --git a/cl_dll/Android.mk b/cl_dll/Android.mk index b5743fb7..94489844 100644 --- a/cl_dll/Android.mk +++ b/cl_dll/Android.mk @@ -29,7 +29,6 @@ SRCS+=../dlls/crossbow.cpp SRCS+=../dlls/crowbar.cpp SRCS+=../dlls/egon.cpp SRCS+=./ev_hldm.cpp -SRCS+=../dlls/sniper.cpp SRCS+=../dlls/gauss.cpp SRCS+=../dlls/handgrenade.cpp SRCS+=./hl/hl_baseentity.cpp @@ -45,14 +44,12 @@ SRCS+=../dlls/shotgun.cpp SRCS+=../dlls/squeakgrenade.cpp SRCS+=../dlls/tripmine.cpp SRCS+=../dlls/glock.cpp -SRCS+=../dlls/sawnoff.cpp #SRCS+=../game_shared/voice_banmgr.cpp #SRCS+=../game_shared/voice_status.cpp SRCS+=./ammo.cpp SRCS+=./ammo_secondary.cpp SRCS+=./ammohistory.cpp SRCS+=./battery.cpp -SRCS+=./zoom.cpp SRCS+=./cdll_int.cpp SRCS+=./com_weapons.cpp SRCS+=./death.cpp diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index 3224e636..9787a839 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -68,8 +68,6 @@ void EV_EgonStop( struct event_args_s *args ); void EV_HornetGunFire( struct event_args_s *args ); void EV_TripmineFire( struct event_args_s *args ); void EV_SnarkFire( struct event_args_s *args ); -void EV_SawnoffFire( struct event_args_s *args ); -void EV_FireSnipars( struct event_args_s *args );//Новая строчка void EV_TrainPitchAdjust( struct event_args_s *args ); } @@ -1181,61 +1179,6 @@ void EV_Crowbar( event_args_t *args ) // CROWBAR END //====================== -//====================== -// RIFLE START -//====================== -enum sniperrifle_e -{ -SNIPERRIFLE_DRAW = 0, -SNIPERRIFLE_SLOWIDLE, -SNIPERRIFLE_FIRE1, -SNIPERRIFLE_FIRELASTROUND, -SNIPERRIFLE_RELOAD, -SNIPERRIFLE_RELOAD2, -SNIPERRIFLE_SLOWIDLEEMPTY, -SNIPERRIFLE_HOLSTER, -}; - -void EV_FireSnipars( event_args_t *args ) -{ -int idx; -int empty; -vec3_t origin; -vec3_t angles; -vec3_t velocity; - -vec3_t vecSrc, vecAiming; -vec3_t up, right, forward; -float flSpread = 0.01; - -idx = args->entindex; -VectorCopy( args->origin, origin ); -VectorCopy( args->angles, angles ); -VectorCopy( args->velocity, velocity ); -empty = args->bparam1; - -AngleVectors( angles, forward, right, up ); - -if ( EV_IsLocal( idx ) ) -{ -EV_MuzzleFlash(); -gEngfuncs.pEventAPI->EV_WeaponAnimation( empty ? SNIPERRIFLE_FIRELASTROUND : SNIPERRIFLE_FIRE1, 2 ); - -V_PunchAxis( 0, -20.0 ); -} - -gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/sniper_fire1.wav", gEngfuncs.pfnRandomFloat(0.8, 0.9), ATTN_NORM, 0, PITCH_NORM ); - -EV_GetGunPosition( args, vecSrc, origin ); - -VectorCopy( forward, vecAiming ); - -EV_HLDM_FireBullets( idx, forward, right, up, 3, vecSrc, vecAiming, 8192, BULLET_PLAYER_SNIPARS, 0, 0, args->fparam1, args->fparam2 ); -} -//====================== -// RIFLE END -//===================== - //====================== // CROSSBOW START //====================== diff --git a/cl_dll/ev_hldm.h b/cl_dll/ev_hldm.h index 66b9c4f7..bff43b1e 100644 --- a/cl_dll/ev_hldm.h +++ b/cl_dll/ev_hldm.h @@ -17,7 +17,6 @@ typedef enum BULLET_PLAYER_357, // python BULLET_PLAYER_BUCKSHOT, // shotgun BULLET_PLAYER_CROWBAR, // crowbar swipe -BULLET_PLAYER_SNIPARS, BULLET_MONSTER_9MM, BULLET_MONSTER_MP5, diff --git a/cl_dll/hl/hl_events.cpp b/cl_dll/hl/hl_events.cpp index 0ea7b8a9..c79279dd 100644 --- a/cl_dll/hl/hl_events.cpp +++ b/cl_dll/hl/hl_events.cpp @@ -38,8 +38,6 @@ void EV_EgonStop( struct event_args_s *args ); void EV_HornetGunFire( struct event_args_s *args ); void EV_TripmineFire( struct event_args_s *args ); void EV_SnarkFire( struct event_args_s *args ); -void EV_SawnoffFire( struct event_args_s *args ); -void EV_FireSnipars( struct event_args_s *args ); void EV_TrainPitchAdjust( struct event_args_s *args ); } @@ -78,5 +76,4 @@ void Game_HookEvents( void ) gEngfuncs.pfnHookEvent( "events/firehornet.sc", EV_HornetGunFire ); gEngfuncs.pfnHookEvent( "events/tripfire.sc", EV_TripmineFire ); gEngfuncs.pfnHookEvent( "events/snarkfire.sc", EV_SnarkFire ); -gEngfuncs.pfnHookEvent( "events/snipars.sc", EV_FireSnipars ); } diff --git a/cl_dll/hl/hl_weapons.cpp b/cl_dll/hl/hl_weapons.cpp index 0d2eefd2..5a17e858 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -67,8 +67,6 @@ CHandGrenade g_HandGren; CSatchel g_Satchel; CTripmine g_Tripmine; CSqueak g_Snark; -CSawnoff g_Sawnoff; -CSnipars g_Snipars; /* ====================== @@ -639,8 +637,6 @@ void HUD_InitClientWeapons( void ) HUD_PrepEntity( &g_Satchel, &player ); HUD_PrepEntity( &g_Tripmine, &player ); HUD_PrepEntity( &g_Snark, &player ); - HUD_PrepEntity( &g_Sawnoff , &player ); -HUD_PrepEntity( &g_Snipars , &player ); } /* @@ -746,12 +742,6 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm case WEAPON_SNARK: pWeapon = &g_Snark; break; - case WEAPON_SAWNOFF: - pWeapon = &g_Sawnoff; - break; -case WEAPON_SNIPARS: -pWeapon = &g_Snipars; -break; } // Store pointer to our destination entity_state_t so we can get our origin, etc. from it diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index a480fee4..0f3b45bc 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -229,7 +229,6 @@ void CHud::Init( void ) m_StatusIcons.Init(); m_MOTD.Init(); m_Scoreboard.Init(); - m_Zoom.Init(); m_Menu.Init(); @@ -399,7 +398,6 @@ void CHud::VidInit( void ) m_StatusIcons.VidInit(); m_Scoreboard.VidInit(); m_MOTD.VidInit(); -m_Zoom.VidInit(); } int CHud::MsgFunc_Logo( const char *pszName, int iSize, void *pbuf ) diff --git a/cl_dll/hud.h b/cl_dll/hud.h index 1c3c277a..ec236003 100644 --- a/cl_dll/hud.h +++ b/cl_dll/hud.h @@ -519,22 +519,6 @@ private: int m_HUD_title_half; }; -class CHudZoom: public CHudBase -{ -public: -int Init( void ); -int VidInit( void ); -int Draw(float flTime); -int MsgFunc_ZoomHUD(const char *pszName, int iSize, void *pbuf ); -int m_iHudMode; -private: -HSPRITE m_hBottom_Left; -HSPRITE m_hBottom_Right; -HSPRITE m_hTop_Left; -HSPRITE m_hTop_Right; -HSPRITE m_hBlack; -}; - // //----------------------------------------------------- // @@ -649,7 +633,6 @@ public: CHudStatusIcons m_StatusIcons; CHudScoreboard m_Scoreboard; CHudMOTD m_MOTD; -CHudZoom m_Zoom; void Init( void ); void VidInit( void ); diff --git a/cl_dll/hud_redraw.cpp b/cl_dll/hud_redraw.cpp index 56d1fbc9..aed98455 100644 --- a/cl_dll/hud_redraw.cpp +++ b/cl_dll/hud_redraw.cpp @@ -100,12 +100,6 @@ int CHud::Redraw( float flTime, int intermission ) } m_iIntermission = intermission; -if(m_Zoom.m_iHudMode > 0) -{ -m_Zoom.Draw( flTime ); -return 1; -} - // if no redrawing is necessary // return 0; diff --git a/cl_dll/hud_spectator.cpp b/cl_dll/hud_spectator.cpp index 91e8fa37..ff6eb8ff 100644 --- a/cl_dll/hud_spectator.cpp +++ b/cl_dll/hud_spectator.cpp @@ -993,7 +993,7 @@ void CHudSpectator::DrawOverviewLayer() if ( hasMapImage) { i = m_MapSprite->numframes / (4*3); - i = sqrt(i); + i = sqrt(float(i)); xTiles = i*4; yTiles = i*3; } diff --git a/cl_dll/input_xash3d.cpp b/cl_dll/input_xash3d.cpp index 033af962..63cdfbeb 100644 --- a/cl_dll/input_xash3d.cpp +++ b/cl_dll/input_xash3d.cpp @@ -54,7 +54,7 @@ float rel_pitch; #define IMPULSE_DOWN 2 #define IMPULSE_UP 4 -bool CL_IsDead(); +int CL_IsDead( void ); Vector dead_viewangles(0, 0, 0); void IN_ToggleButtons( float forwardmove, float sidemove ) diff --git a/cl_dll/util.cpp b/cl_dll/util.cpp index 52dc2f61..655bde64 100644 --- a/cl_dll/util.cpp +++ b/cl_dll/util.cpp @@ -32,6 +32,10 @@ extern vec3_t vec3_origin; +#ifdef _MSC_VER +vec3_t vec3_origin; +#endif + double sqrt( double x ); float Length( const float *v ) diff --git a/cl_dll/view.cpp b/cl_dll/view.cpp index 5664066f..b581cc82 100644 --- a/cl_dll/view.cpp +++ b/cl_dll/view.cpp @@ -1324,7 +1324,6 @@ int V_FindViewModelByWeaponModel( int weaponindex ) { "models/p_tripmine.mdl", "models/v_tripmine.mdl" }, { "models/p_satchel_radio.mdl", "models/v_satchel_radio.mdl" }, { "models/p_satchel.mdl", "models/v_satchel.mdl" }, -{ "models/p_sniper.mdl", "models/v_sniper.mdl" }, { NULL, NULL } }; diff --git a/cl_dll/zoom.cpp b/cl_dll/zoom.cpp deleted file mode 100644 index ce0ebb0d..00000000 --- a/cl_dll/zoom.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include "hud.h" -#include "cl_util.h" -#include "parsemsg.h" -#include "hud_servers.h" -#include "triangleapi.h" -#include "r_studioint.h" -#include "com_model.h" - -#include -#include - -extern engine_studio_api_t IEngineStudio; - -void DrawQuad(float xmin, float ymin, float xmax, float ymax) -{ -gEngfuncs.pTriAPI->TexCoord2f(0,0); -gEngfuncs.pTriAPI->Vertex3f(xmin, ymin, 0); -gEngfuncs.pTriAPI->TexCoord2f(0,1); -gEngfuncs.pTriAPI->Vertex3f(xmin, ymax, 0); -gEngfuncs.pTriAPI->TexCoord2f(1,1); -gEngfuncs.pTriAPI->Vertex3f(xmax, ymax, 0); -gEngfuncs.pTriAPI->TexCoord2f(1,0); -gEngfuncs.pTriAPI->Vertex3f(xmax, ymin, 0); -} - -DECLARE_MESSAGE(m_Zoom, ZoomHUD) - -int CHudZoom::Init() -{ -m_iHudMode = 0; HOOK_MESSAGE(ZoomHUD); - -m_iFlags |= HUD_ACTIVE; - -gHUD.AddHudElem(this); -return 1; -} - -int CHudZoom::VidInit() -{ -m_hBottom_Left = SPR_Load("sprites/snipars.spr"); -m_hBottom_Right = SPR_Load("sprites/snipars.spr"); -m_hTop_Left = SPR_Load("sprites/snipars.spr"); -m_hTop_Right = SPR_Load("sprites/snipars.spr"); -m_hBlack = SPR_Load("sprites/snipars.spr"); -m_iHudMode = 0; -return 1; -} - -int CHudZoom::MsgFunc_ZoomHUD (const char *pszName, int iSize, void *pbuf ) -{ -BEGIN_READ( pbuf, iSize ); -m_iHudMode = READ_BYTE(); -return 1; -} - -int CHudZoom::Draw(float flTime) -{ -if(!IEngineStudio.IsHardware() || !m_hBottom_Left || !m_hBottom_Right || !m_hTop_Left || !m_hTop_Right ) -return 0; - -if(!m_iHudMode) -return 0; - -gEngfuncs.pTriAPI->RenderMode(kRenderTransColor); -gEngfuncs.pTriAPI->Brightness(1.0); -gEngfuncs.pTriAPI->Color4ub(255, 255, 255, 255); -gEngfuncs.pTriAPI->CullFace(TRI_NONE); -float left = (ScreenWidth - ScreenHeight)/2; -float right = left + ScreenHeight; -float centerx = ScreenWidth/2; -float centery = ScreenHeight/2; - -gEngfuncs.pTriAPI->SpriteTexture((struct model_s *)gEngfuncs.GetSpritePointer( m_hTop_Left ), 0); -gEngfuncs.pTriAPI->Begin(TRI_QUADS); -DrawQuad(left, 0, centerx, centery); -gEngfuncs.pTriAPI->End(); - -gEngfuncs.pTriAPI->SpriteTexture((struct model_s *)gEngfuncs.GetSpritePointer( m_hTop_Right ), 0); -gEngfuncs.pTriAPI->Begin(TRI_QUADS); DrawQuad(centerx, 0, right, centery); -gEngfuncs.pTriAPI->End(); - -gEngfuncs.pTriAPI->SpriteTexture((struct model_s *)gEngfuncs.GetSpritePointer( m_hBottom_Right ), 0); -gEngfuncs.pTriAPI->Begin(TRI_QUADS); -DrawQuad(centerx, centery, right, ScreenHeight); -gEngfuncs.pTriAPI->End(); - -gEngfuncs.pTriAPI->SpriteTexture((struct model_s *)gEngfuncs.GetSpritePointer( m_hBottom_Left ), 0); -gEngfuncs.pTriAPI->Begin(TRI_QUADS); -DrawQuad(left, centery, centerx, ScreenHeight); -gEngfuncs.pTriAPI->End(); - -gEngfuncs.pTriAPI->SpriteTexture((struct model_s *)gEngfuncs.GetSpritePointer( m_hBlack ), 0); -gEngfuncs.pTriAPI->Begin(TRI_QUADS); -DrawQuad(0, 0, (left + 1), ScreenHeight); -gEngfuncs.pTriAPI->End(); - -gEngfuncs.pTriAPI->SpriteTexture((struct model_s *)gEngfuncs.GetSpritePointer( m_hBlack ), 0); -gEngfuncs.pTriAPI->Begin(TRI_QUADS); -DrawQuad((right - 1), 0, ScreenWidth, ScreenHeight); -gEngfuncs.pTriAPI->End(); - -return 1; -}