Fix weapons.

This commit is contained in:
Andrey Akhmichin 2020-05-17 09:15:38 +05:00
parent abd3eb5e9b
commit 7210cc8730
11 changed files with 19 additions and 25 deletions

View File

@ -97,7 +97,7 @@ SRCS+=./input_xash3d.cpp
SRCS+=./scoreboard.cpp
SRCS+=./MOTD.cpp
INCLUDES = -I../common -I. -I../game_shared -I../pm_shared -I../engine -I../dlls -I../utils/false_vgui/include
DEFINES = -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w -D_snprintf=snprintf
DEFINES = -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DCLIENT_DLL -w -D_snprintf=snprintf
LOCAL_C_INCLUDES := $(LOCAL_PATH)/. \
$(LOCAL_PATH)/../common \

View File

@ -267,15 +267,15 @@ int CHudAmmo::Init( void )
HOOK_MESSAGE( AmmoX );
HOOK_COMMAND( "slot1", Slot1 );
HOOK_COMMAND( "slot2", Slot1 );
HOOK_COMMAND( "slot3", Slot1 );
HOOK_COMMAND( "slot4", Slot1 );
HOOK_COMMAND( "slot5", Slot1 );
HOOK_COMMAND( "slot6", Slot1 );
HOOK_COMMAND( "slot7", Slot1 );
HOOK_COMMAND( "slot8", Slot1 );
HOOK_COMMAND( "slot9", Slot1 );
HOOK_COMMAND( "slot10", Slot1 );
HOOK_COMMAND( "slot2", Slot2 );
HOOK_COMMAND( "slot3", Slot3 );
HOOK_COMMAND( "slot4", Slot4 );
HOOK_COMMAND( "slot5", Slot5 );
HOOK_COMMAND( "slot6", Slot6 );
HOOK_COMMAND( "slot7", Slot7 );
HOOK_COMMAND( "slot8", Slot8 );
HOOK_COMMAND( "slot9", Slot9 );
HOOK_COMMAND( "slot10", Slot10 );
HOOK_COMMAND( "cancelselect", Close );
HOOK_COMMAND( "invnext", NextWeapon );
HOOK_COMMAND( "invprev", PrevWeapon );

View File

@ -13,7 +13,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard)
LOCAL_MODULE_FILENAME = libserver_hardfp
endif
LOCAL_CFLAGS += -D_LINUX -DCLIENT_WEAPONS -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf \
LOCAL_CFLAGS += -D_LINUX -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf \
-fno-exceptions -DNO_VOICEGAMEMGR -w
LOCAL_CPPFLAGS := $(LOCAL_CFLAGS)

View File

@ -31,8 +31,6 @@ if(HAVE_TGMATH_H)
add_definitions(-DHAVE_TGMATH_H)
endif()
add_definitions(-DCLIENT_WEAPONS)
if(NOT MSVC)
add_compile_options(-fno-exceptions) # GCC/Clang flag
add_compile_options(-Wno-invalid-offsetof) # GCC/Clang flag

View File

@ -72,7 +72,7 @@ int CCrowbar::GetItemInfo( ItemInfo *p )
p->iMaxAmmo2 = -1;
p->iMaxClip = WEAPON_NOCLIP;
p->iSlot = 0;
p->iPosition = 2;
p->iPosition = 3;
p->iId = WEAPON_CROWBAR;
p->iWeight = CROWBAR_WEIGHT;
return 1;
@ -203,7 +203,7 @@ int CCrowbar::Swing( int fFirst )
if( tr.flFraction >= 1.0f )
{
if( fFirst )
// if( fFirst )
{
// miss
SendWeaponAnim( CROWBAR_RELEASEMISS );

View File

@ -79,7 +79,7 @@ int CGlock::GetItemInfo( ItemInfo *p )
p->iMaxAmmo2 = -1;
p->iMaxClip = GLOCK_MAX_CLIP;
p->iSlot = 0;
p->iPosition = 3;
p->iPosition = 4;
p->iFlags = 0;
p->iId = m_iId = WEAPON_GLOCK;
p->iWeight = GLOCK_WEIGHT;

View File

@ -103,7 +103,7 @@ int CMP5::GetItemInfo( ItemInfo *p )
p->iMaxAmmo2 = -1;
p->iMaxClip = MP5_MAX_CLIP;
p->iSlot = 0;
p->iPosition = 4;
p->iPosition = 5;
p->iFlags = 0;
p->iId = m_iId = WEAPON_MP5;
p->iWeight = MP5_WEIGHT;

View File

@ -66,7 +66,7 @@ int CHolster::GetItemInfo( ItemInfo *p )
p->iMaxAmmo2 = -1;
p->iMaxClip = WEAPON_NOCLIP;
p->iSlot = 0;
p->iPosition = 0;
p->iPosition = 1;
p->iId = WEAPON_HOLSTER;
p->iWeight = HOLSTER_WEIGHT;

View File

@ -53,7 +53,7 @@ void CTorch::Precache()
PRECACHE_SOUND( "items/flashlight1.wav" );
UTIL_PrecacheOther( "light_spot2" );
UTIL_PrecacheOther( "wall_spot2" );
UTIL_PrecacheOther( "wall_spot" );
}
int CTorch::GetItemInfo( ItemInfo *p )
@ -65,7 +65,7 @@ int CTorch::GetItemInfo( ItemInfo *p )
p->iMaxAmmo2 = -1;
p->iMaxClip = WEAPON_NOCLIP;
p->iSlot = 0;
p->iPosition = 1;
p->iPosition = 2;
p->iId = WEAPON_TORCH;
p->iWeight = TORCH_WEIGHT;

View File

@ -102,7 +102,7 @@ int CShotgun::GetItemInfo( ItemInfo *p )
p->iMaxAmmo2 = -1;
p->iMaxClip = SHOTGUN_MAX_CLIP;
p->iSlot = 0;
p->iPosition = 5;
p->iPosition = 6;
p->iFlags = 0;
p->iId = m_iId = WEAPON_SHOTGUN;
p->iWeight = SHOTGUN_WEIGHT;

View File

@ -339,10 +339,6 @@ void W_Precache( void )
// mp5
UTIL_PrecacheOtherWeapon( "weapon_9mmAR" );
UTIL_PrecacheOther( "ammo_9mmAR" );
UTIL_PrecacheOther( "ammo_ARgrenades" );
// 9mm ammo box
UTIL_PrecacheOther( "ammo_9mmbox" );
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
if( g_pGameRules->IsDeathmatch() )