mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Fix error
This commit is contained in:
parent
c085df6ffd
commit
7a90868645
@ -29,7 +29,6 @@ SRCS+=../dlls/crossbow.cpp
|
|||||||
SRCS+=../dlls/crowbar.cpp
|
SRCS+=../dlls/crowbar.cpp
|
||||||
SRCS+=../dlls/egon.cpp
|
SRCS+=../dlls/egon.cpp
|
||||||
SRCS+=./ev_hldm.cpp
|
SRCS+=./ev_hldm.cpp
|
||||||
SRCS+=../dlls/sniper.cpp
|
|
||||||
SRCS+=../dlls/gauss.cpp
|
SRCS+=../dlls/gauss.cpp
|
||||||
SRCS+=../dlls/handgrenade.cpp
|
SRCS+=../dlls/handgrenade.cpp
|
||||||
SRCS+=./hl/hl_baseentity.cpp
|
SRCS+=./hl/hl_baseentity.cpp
|
||||||
@ -45,14 +44,12 @@ SRCS+=../dlls/shotgun.cpp
|
|||||||
SRCS+=../dlls/squeakgrenade.cpp
|
SRCS+=../dlls/squeakgrenade.cpp
|
||||||
SRCS+=../dlls/tripmine.cpp
|
SRCS+=../dlls/tripmine.cpp
|
||||||
SRCS+=../dlls/glock.cpp
|
SRCS+=../dlls/glock.cpp
|
||||||
SRCS+=../dlls/sawnoff.cpp
|
|
||||||
#SRCS+=../game_shared/voice_banmgr.cpp
|
#SRCS+=../game_shared/voice_banmgr.cpp
|
||||||
#SRCS+=../game_shared/voice_status.cpp
|
#SRCS+=../game_shared/voice_status.cpp
|
||||||
SRCS+=./ammo.cpp
|
SRCS+=./ammo.cpp
|
||||||
SRCS+=./ammo_secondary.cpp
|
SRCS+=./ammo_secondary.cpp
|
||||||
SRCS+=./ammohistory.cpp
|
SRCS+=./ammohistory.cpp
|
||||||
SRCS+=./battery.cpp
|
SRCS+=./battery.cpp
|
||||||
SRCS+=./zoom.cpp
|
|
||||||
SRCS+=./cdll_int.cpp
|
SRCS+=./cdll_int.cpp
|
||||||
SRCS+=./com_weapons.cpp
|
SRCS+=./com_weapons.cpp
|
||||||
SRCS+=./death.cpp
|
SRCS+=./death.cpp
|
||||||
|
@ -68,8 +68,6 @@ void EV_EgonStop( struct event_args_s *args );
|
|||||||
void EV_HornetGunFire( struct event_args_s *args );
|
void EV_HornetGunFire( struct event_args_s *args );
|
||||||
void EV_TripmineFire( struct event_args_s *args );
|
void EV_TripmineFire( struct event_args_s *args );
|
||||||
void EV_SnarkFire( 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 );
|
void EV_TrainPitchAdjust( struct event_args_s *args );
|
||||||
}
|
}
|
||||||
@ -1181,61 +1179,6 @@ void EV_Crowbar( event_args_t *args )
|
|||||||
// CROWBAR END
|
// 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
|
// CROSSBOW START
|
||||||
//======================
|
//======================
|
||||||
|
@ -17,7 +17,6 @@ typedef enum
|
|||||||
BULLET_PLAYER_357, // python
|
BULLET_PLAYER_357, // python
|
||||||
BULLET_PLAYER_BUCKSHOT, // shotgun
|
BULLET_PLAYER_BUCKSHOT, // shotgun
|
||||||
BULLET_PLAYER_CROWBAR, // crowbar swipe
|
BULLET_PLAYER_CROWBAR, // crowbar swipe
|
||||||
BULLET_PLAYER_SNIPARS,
|
|
||||||
|
|
||||||
BULLET_MONSTER_9MM,
|
BULLET_MONSTER_9MM,
|
||||||
BULLET_MONSTER_MP5,
|
BULLET_MONSTER_MP5,
|
||||||
|
@ -38,8 +38,6 @@ void EV_EgonStop( struct event_args_s *args );
|
|||||||
void EV_HornetGunFire( struct event_args_s *args );
|
void EV_HornetGunFire( struct event_args_s *args );
|
||||||
void EV_TripmineFire( struct event_args_s *args );
|
void EV_TripmineFire( struct event_args_s *args );
|
||||||
void EV_SnarkFire( 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 );
|
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/firehornet.sc", EV_HornetGunFire );
|
||||||
gEngfuncs.pfnHookEvent( "events/tripfire.sc", EV_TripmineFire );
|
gEngfuncs.pfnHookEvent( "events/tripfire.sc", EV_TripmineFire );
|
||||||
gEngfuncs.pfnHookEvent( "events/snarkfire.sc", EV_SnarkFire );
|
gEngfuncs.pfnHookEvent( "events/snarkfire.sc", EV_SnarkFire );
|
||||||
gEngfuncs.pfnHookEvent( "events/snipars.sc", EV_FireSnipars );
|
|
||||||
}
|
}
|
||||||
|
@ -67,8 +67,6 @@ CHandGrenade g_HandGren;
|
|||||||
CSatchel g_Satchel;
|
CSatchel g_Satchel;
|
||||||
CTripmine g_Tripmine;
|
CTripmine g_Tripmine;
|
||||||
CSqueak g_Snark;
|
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_Satchel, &player );
|
||||||
HUD_PrepEntity( &g_Tripmine, &player );
|
HUD_PrepEntity( &g_Tripmine, &player );
|
||||||
HUD_PrepEntity( &g_Snark, &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:
|
case WEAPON_SNARK:
|
||||||
pWeapon = &g_Snark;
|
pWeapon = &g_Snark;
|
||||||
break;
|
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
|
// Store pointer to our destination entity_state_t so we can get our origin, etc. from it
|
||||||
|
@ -229,7 +229,6 @@ void CHud::Init( void )
|
|||||||
m_StatusIcons.Init();
|
m_StatusIcons.Init();
|
||||||
m_MOTD.Init();
|
m_MOTD.Init();
|
||||||
m_Scoreboard.Init();
|
m_Scoreboard.Init();
|
||||||
m_Zoom.Init();
|
|
||||||
|
|
||||||
m_Menu.Init();
|
m_Menu.Init();
|
||||||
|
|
||||||
@ -399,7 +398,6 @@ void CHud::VidInit( void )
|
|||||||
m_StatusIcons.VidInit();
|
m_StatusIcons.VidInit();
|
||||||
m_Scoreboard.VidInit();
|
m_Scoreboard.VidInit();
|
||||||
m_MOTD.VidInit();
|
m_MOTD.VidInit();
|
||||||
m_Zoom.VidInit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CHud::MsgFunc_Logo( const char *pszName, int iSize, void *pbuf )
|
int CHud::MsgFunc_Logo( const char *pszName, int iSize, void *pbuf )
|
||||||
|
17
cl_dll/hud.h
17
cl_dll/hud.h
@ -519,22 +519,6 @@ private:
|
|||||||
int m_HUD_title_half;
|
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;
|
CHudStatusIcons m_StatusIcons;
|
||||||
CHudScoreboard m_Scoreboard;
|
CHudScoreboard m_Scoreboard;
|
||||||
CHudMOTD m_MOTD;
|
CHudMOTD m_MOTD;
|
||||||
CHudZoom m_Zoom;
|
|
||||||
|
|
||||||
void Init( void );
|
void Init( void );
|
||||||
void VidInit( void );
|
void VidInit( void );
|
||||||
|
@ -100,12 +100,6 @@ int CHud::Redraw( float flTime, int intermission )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_iIntermission = intermission;
|
m_iIntermission = intermission;
|
||||||
if(m_Zoom.m_iHudMode > 0)
|
|
||||||
{
|
|
||||||
m_Zoom.Draw( flTime );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// if no redrawing is necessary
|
// if no redrawing is necessary
|
||||||
// return 0;
|
// return 0;
|
||||||
|
@ -993,7 +993,7 @@ void CHudSpectator::DrawOverviewLayer()
|
|||||||
if ( hasMapImage)
|
if ( hasMapImage)
|
||||||
{
|
{
|
||||||
i = m_MapSprite->numframes / (4*3);
|
i = m_MapSprite->numframes / (4*3);
|
||||||
i = sqrt(i);
|
i = sqrt(float(i));
|
||||||
xTiles = i*4;
|
xTiles = i*4;
|
||||||
yTiles = i*3;
|
yTiles = i*3;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ float rel_pitch;
|
|||||||
#define IMPULSE_DOWN 2
|
#define IMPULSE_DOWN 2
|
||||||
#define IMPULSE_UP 4
|
#define IMPULSE_UP 4
|
||||||
|
|
||||||
bool CL_IsDead();
|
int CL_IsDead( void );
|
||||||
Vector dead_viewangles(0, 0, 0);
|
Vector dead_viewangles(0, 0, 0);
|
||||||
|
|
||||||
void IN_ToggleButtons( float forwardmove, float sidemove )
|
void IN_ToggleButtons( float forwardmove, float sidemove )
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
|
|
||||||
extern vec3_t vec3_origin;
|
extern vec3_t vec3_origin;
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
vec3_t vec3_origin;
|
||||||
|
#endif
|
||||||
|
|
||||||
double sqrt( double x );
|
double sqrt( double x );
|
||||||
|
|
||||||
float Length( const float *v )
|
float Length( const float *v )
|
||||||
|
@ -1324,7 +1324,6 @@ int V_FindViewModelByWeaponModel( int weaponindex )
|
|||||||
{ "models/p_tripmine.mdl", "models/v_tripmine.mdl" },
|
{ "models/p_tripmine.mdl", "models/v_tripmine.mdl" },
|
||||||
{ "models/p_satchel_radio.mdl", "models/v_satchel_radio.mdl" },
|
{ "models/p_satchel_radio.mdl", "models/v_satchel_radio.mdl" },
|
||||||
{ "models/p_satchel.mdl", "models/v_satchel.mdl" },
|
{ "models/p_satchel.mdl", "models/v_satchel.mdl" },
|
||||||
{ "models/p_sniper.mdl", "models/v_sniper.mdl" },
|
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
103
cl_dll/zoom.cpp
103
cl_dll/zoom.cpp
@ -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 <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user