mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Merge branch 'master' into hlfixed
This commit is contained in:
commit
d4d390422c
113
.github/workflows/manual.yml
vendored
Normal file
113
.github/workflows/manual.yml
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
name: manual build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
buildtype:
|
||||
type: choice
|
||||
description: Build Type
|
||||
options:
|
||||
- Release
|
||||
- Debug
|
||||
usevgui:
|
||||
type: choice
|
||||
description: Use VGUI
|
||||
options:
|
||||
- 'OFF'
|
||||
- 'ON'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
- os: windows-2019
|
||||
cc: cl
|
||||
cxx: cl
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout steam-runtime
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ValveSoftware/steam-runtime
|
||||
path: steam-runtime
|
||||
- name: Cache steam-runtime
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
id: cache-steam-runtime
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
|
||||
key: ${{ runner.os }}-steam-runtime
|
||||
- name: Download steam-runtime
|
||||
if: startsWith(matrix.os, 'ubuntu') && steps.cache-steam-runtime.outputs.cache-hit != 'true'
|
||||
run: wget --no-verbose https://repo.steampowered.com/steamrt-images-scout/snapshots/0.20210610.0/com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
|
||||
- name: Install steam runtime
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
sudo apt update
|
||||
./steam-runtime/setup_chroot.sh --i386 --tarball ./com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
|
||||
sudo sed -i 's/groups=sudo/groups=adm/g' /etc/schroot/chroot.d/steamrt_scout_i386.conf
|
||||
|
||||
- name: Copy vgui.so
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && github.event.inputs.usevgui == 'ON' }}
|
||||
run: |
|
||||
mkdir -p build/cl_dll
|
||||
cp vgui_support/vgui-dev/lib/vgui.so build/cl_dll
|
||||
- name: Build on Linux
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
schroot --chroot steamrt_scout_i386 -- cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DCMAKE_BUILD_TYPE=${{ github.event.inputs.buildtype }} -DCMAKE_INSTALL_PREFIX="$PWD/dist" -DUSE_VGUI=${{ github.event.inputs.usevgui }}
|
||||
schroot --chroot steamrt_scout_i386 -- cmake --build build --target all
|
||||
schroot --chroot steamrt_scout_i386 -- cmake --build build --target install
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
- name: Build on Windows
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
cmake -G "Visual Studio 16 2019" -A Win32 -B build -DCMAKE_INSTALL_PREFIX="dist" -DUSE_VGUI=${{ github.event.inputs.usevgui }}
|
||||
msbuild -verbosity:normal /property:Configuration=${{ github.event.inputs.buildtype }} build/INSTALL.vcxproj
|
||||
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/} | tr '/' '_')"
|
||||
id: extract_branch
|
||||
- name: Extract gamedir
|
||||
shell: bash
|
||||
run: echo "##[set-output name=gamedir;]$(grep build/CMakeCache.txt -Ee 'GAMEDIR:STRING=[a-z]+' | cut -d '=' -f 2)"
|
||||
id: extract_gamedir
|
||||
- name: Copy pdbs to dist dir
|
||||
if: ${{ startsWith(matrix.os, 'windows') && github.event.inputs.buildtype == 'Debug' }}
|
||||
run: |
|
||||
copy build/cl_dll/Debug/client.pdb dist/${{ steps.extract_gamedir.outputs.gamedir }}/cl_dlls/
|
||||
copy build/dlls/Debug/hl.pdb dist/${{ steps.extract_gamedir.outputs.gamedir }}/dlls/
|
||||
- name: Delete .lib files from dist
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
Remove-Item -Force -Path dist/${{ steps.extract_gamedir.outputs.gamedir }}/cl_dlls/client.lib
|
||||
Remove-Item -Force -Path dist/${{ steps.extract_gamedir.outputs.gamedir }}/dlls/hl.lib
|
||||
- name: Upload linux artifact
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-linux
|
||||
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}
|
||||
- name: Upload windows artifact
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-windows
|
||||
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}
|
||||
|
@ -137,7 +137,7 @@ void HUD_PlaybackEvent( int flags, const edict_t *pInvoker, unsigned short event
|
||||
|
||||
// Weapon prediction events are assumed to occur at the player's origin
|
||||
org = g_finalstate->playerstate.origin;
|
||||
ang = v_angles;
|
||||
ang = v_client_aimangles;
|
||||
gEngfuncs.pfnPlaybackEvent( flags, pInvoker, eventindex, delay, org, ang, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2 );
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ extern cvar_t *cl_lw;
|
||||
|
||||
extern int g_runfuncs;
|
||||
extern vec3_t v_angles;
|
||||
extern vec3_t v_client_aimangles;
|
||||
extern float g_lastFOV;
|
||||
extern struct local_state_s *g_finalstate;
|
||||
#endif
|
||||
|
@ -7,7 +7,7 @@ set PATH=%MSVCDir%\VC98\Bin;%MSVCDir%\Common\MSDev98\Bin\;%PATH%
|
||||
echo -- Compiler is MSVC6
|
||||
|
||||
set XASH3DSRC=..\..\Xash3D_original
|
||||
set INCLUDES=-I../common -I../engine -I../pm_shared -I../game_shared -I../public -I../external -I../dlls -I../utils/false_vgui/include
|
||||
set INCLUDES=-I../common -I../engine -I../pm_shared -I../game_shared -I../public -I../external -I../dlls -I../utils/fake_vgui/include
|
||||
set SOURCES=../dlls/crossbow.cpp ^
|
||||
../dlls/crowbar.cpp ^
|
||||
../dlls/egon.cpp ^
|
||||
|
@ -222,7 +222,7 @@ void DLLEXPORT HUD_TxferPredictionData( struct entity_state_s *ps, const struct
|
||||
VectorCopy( ppcd->vuser3, pcd->vuser3 );
|
||||
VectorCopy( ppcd->vuser4, pcd->vuser4 );
|
||||
|
||||
memcpy( wd, pwd, 32 * sizeof(weapon_data_t) );
|
||||
memcpy( wd, pwd, MAX_WEAPONS * sizeof(weapon_data_t) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -486,7 +486,7 @@ static void EV_FireGlock_Impl( event_args_t *args )
|
||||
if( EV_IsLocal( idx ) )
|
||||
{
|
||||
EV_MuzzleFlash();
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( empty ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT, 2 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( empty ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT, 0 );
|
||||
|
||||
V_PunchAxis( 0, -2.0 );
|
||||
}
|
||||
@ -549,7 +549,7 @@ void EV_FireShotGunDouble( event_args_t *args )
|
||||
{
|
||||
// Add muzzle flash to current weapon model
|
||||
EV_MuzzleFlash();
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOTGUN_FIRE2, 2 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOTGUN_FIRE2, 0 );
|
||||
V_PunchAxis( 0, -10.0 );
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ void EV_FireShotGunSingle( event_args_t *args )
|
||||
{
|
||||
// Add muzzle flash to current weapon model
|
||||
EV_MuzzleFlash();
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOTGUN_FIRE, 2 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( SHOTGUN_FIRE, 0 );
|
||||
|
||||
V_PunchAxis( 0, -5.0 );
|
||||
}
|
||||
@ -660,7 +660,7 @@ void EV_FireMP5( event_args_t *args )
|
||||
{
|
||||
// Add muzzle flash to current weapon model
|
||||
EV_MuzzleFlash();
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( MP5_FIRE1 + gEngfuncs.pfnRandomLong( 0, 2 ), 2 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( MP5_FIRE1 + gEngfuncs.pfnRandomLong( 0, 2 ), 0 );
|
||||
|
||||
V_PunchAxis( 0, gEngfuncs.pfnRandomFloat( -2, 2 ) );
|
||||
}
|
||||
@ -697,7 +697,7 @@ void EV_FireMP52( event_args_t *args )
|
||||
|
||||
if( EV_IsLocal( idx ) )
|
||||
{
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( MP5_LAUNCH, 2 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( MP5_LAUNCH, 0 );
|
||||
V_PunchAxis( 0, -10 );
|
||||
}
|
||||
|
||||
@ -862,7 +862,7 @@ void EV_FireGauss( event_args_t *args )
|
||||
if( EV_IsLocal( idx ) )
|
||||
{
|
||||
V_PunchAxis( 0.0f, -2.0f );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( GAUSS_FIRE2, 2 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( GAUSS_FIRE2, 0 );
|
||||
|
||||
if( m_fPrimaryFire == false )
|
||||
g_flApplyVel = flDamage;
|
||||
@ -1129,13 +1129,13 @@ void EV_Crowbar( event_args_t *args )
|
||||
switch( (g_iSwing++) % 3 )
|
||||
{
|
||||
case 0:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK1MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK1MISS, 0 );
|
||||
break;
|
||||
case 1:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK2MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK2MISS, 0 );
|
||||
break;
|
||||
case 2:
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK3MISS, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK3MISS, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1203,9 +1203,9 @@ void EV_FireCrossbow2( event_args_t *args )
|
||||
if( EV_IsLocal( idx ) )
|
||||
{
|
||||
if( args->iparam1 )
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 0 );
|
||||
else
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 0 );
|
||||
}
|
||||
|
||||
// Store off the old count
|
||||
@ -1279,9 +1279,9 @@ void EV_FireCrossbow( event_args_t *args )
|
||||
if( EV_IsLocal( idx ) )
|
||||
{
|
||||
if( args->iparam1 )
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE1, 0 );
|
||||
else
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROSSBOW_FIRE3, 0 );
|
||||
|
||||
V_PunchAxis( 0.0f, -2.0f );
|
||||
}
|
||||
@ -1321,7 +1321,7 @@ void EV_FireRpg( event_args_t *args )
|
||||
//Only play the weapon anims if I shot it.
|
||||
if( EV_IsLocal( idx ) )
|
||||
{
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( RPG_FIRE2, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( RPG_FIRE2, 0 );
|
||||
|
||||
V_PunchAxis( 0, -5.0 );
|
||||
}
|
||||
@ -1422,7 +1422,7 @@ void EV_EgonFire( event_args_t *args )
|
||||
|
||||
//Only play the weapon anims if I shot it.
|
||||
if( EV_IsLocal( idx ) )
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( g_fireAnims1[gEngfuncs.pfnRandomLong( 0, 3 )], 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( g_fireAnims1[gEngfuncs.pfnRandomLong( 0, 3 )], 0 );
|
||||
|
||||
if( iStartup == 1 && EV_IsLocal( idx ) && !( pBeam || pBeam2 || pFlare ) && cl_lw->value ) //Adrian: Added the cl_lw check for those lital people that hate weapon prediction.
|
||||
{
|
||||
@ -1564,7 +1564,7 @@ void EV_HornetGunFire( event_args_t *args )
|
||||
if( EV_IsLocal( idx ) )
|
||||
{
|
||||
V_PunchAxis( 0, gEngfuncs.pfnRandomLong( 0, 2 ) );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( HGUN_SHOOT, 1 );
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( HGUN_SHOOT, 0 );
|
||||
}
|
||||
|
||||
switch( gEngfuncs.pfnRandomLong( 0, 2 ) )
|
||||
@ -1609,6 +1609,7 @@ void EV_TripmineFire( event_args_t *args )
|
||||
pmtrace_t tr;
|
||||
|
||||
idx = args->entindex;
|
||||
const bool last = args->bparam1 != 0;
|
||||
VectorCopy( args->origin, vecSrc );
|
||||
VectorCopy( args->angles, angles );
|
||||
|
||||
@ -1631,7 +1632,7 @@ void EV_TripmineFire( event_args_t *args )
|
||||
gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc, vecSrc + forward * 128.0f, PM_NORMAL, -1, &tr );
|
||||
|
||||
//Hit something solid
|
||||
if( tr.fraction < 1.0f )
|
||||
if( tr.fraction < 1.0f && !last )
|
||||
gEngfuncs.pEventAPI->EV_WeaponAnimation ( TRIPMINE_DRAW, 0 );
|
||||
|
||||
gEngfuncs.pEventAPI->EV_PopPMStates();
|
||||
|
@ -36,7 +36,7 @@ extern globalvars_t *gpGlobals;
|
||||
extern int g_iUser1;
|
||||
|
||||
// Pool of client side entities/entvars_t
|
||||
static entvars_t ev[32];
|
||||
static entvars_t ev[MAX_WEAPONS];
|
||||
static int num_ents = 0;
|
||||
|
||||
// The entity we'll use to represent the local client
|
||||
@ -45,7 +45,7 @@ static CBasePlayer player;
|
||||
// Local version of game .dll global variables ( time, etc. )
|
||||
static globalvars_t Globals;
|
||||
|
||||
static CBasePlayerWeapon *g_pWpns[32];
|
||||
static CBasePlayerWeapon *g_pWpns[MAX_WEAPONS];
|
||||
|
||||
float g_flApplyVel = 0.0;
|
||||
int g_irunninggausspred = 0;
|
||||
@ -752,7 +752,7 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
|
||||
if( !pWeapon )
|
||||
return;
|
||||
|
||||
for( i = 0; i < 32; i++ )
|
||||
for( i = 0; i < MAX_WEAPONS; i++ )
|
||||
{
|
||||
pCurrent = g_pWpns[i];
|
||||
if( !pCurrent )
|
||||
@ -907,11 +907,7 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
|
||||
// over the wire ( fixes some animation glitches )
|
||||
if( g_runfuncs && ( HUD_GetWeaponAnim() != to->client.weaponanim ) )
|
||||
{
|
||||
int body = 2;
|
||||
|
||||
//Pop the model to body 0.
|
||||
if( pWeapon == &g_Tripmine )
|
||||
body = 0;
|
||||
int body = 0;
|
||||
|
||||
//Show laser sight/scope combo
|
||||
if( pWeapon == &g_Python && bIsMultiplayer() )
|
||||
@ -921,7 +917,7 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
|
||||
HUD_SendWeaponAnim( to->client.weaponanim, body, 1 );
|
||||
}
|
||||
|
||||
for( i = 0; i < 32; i++ )
|
||||
for( i = 0; i < MAX_WEAPONS; i++ )
|
||||
{
|
||||
pCurrent = g_pWpns[i];
|
||||
|
||||
|
@ -88,6 +88,7 @@ float v_cameraFocusAngle = 35.0f;
|
||||
int v_cameraMode = CAM_MODE_FOCUS;
|
||||
qboolean v_resetCamera = 1;
|
||||
|
||||
vec3_t v_client_aimangles;
|
||||
vec3_t g_ev_punchangle;
|
||||
|
||||
cvar_t *scr_ofsx;
|
||||
@ -724,6 +725,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams )
|
||||
|
||||
// Store off v_angles before munging for third person
|
||||
v_angles = pparams->viewangles;
|
||||
v_client_aimangles = pparams->cl_viewangles;
|
||||
v_lastAngles = pparams->viewangles;
|
||||
//v_cl_angles = pparams->cl_viewangles; // keep old user mouse angles !
|
||||
if( CL_IsThirdPerson() )
|
||||
|
@ -639,7 +639,7 @@ void CBaseButton::ButtonSpark( void )
|
||||
SetThink( &CBaseButton::ButtonSpark );
|
||||
pev->nextthink = pev->ltime + 0.1f + RANDOM_FLOAT( 0.0f, 1.5f );// spark again at random interval
|
||||
|
||||
DoSpark( pev, pev->mins );
|
||||
DoSpark( pev, pev->absmin );
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -734,7 +734,7 @@ void ServerActivate( edict_t *pEdictList, int edictCount, int clientMax )
|
||||
continue;
|
||||
|
||||
// Clients aren't necessarily initialized until ClientPutInServer()
|
||||
if( i < clientMax || !pEdictList[i].pvPrivateData )
|
||||
if( (i > 0 && i <= clientMax) || !pEdictList[i].pvPrivateData )
|
||||
continue;
|
||||
|
||||
pClass = CBaseEntity::Instance( &pEdictList[i] );
|
||||
@ -1627,6 +1627,7 @@ void RegisterEncoders( void )
|
||||
|
||||
int GetWeaponData( struct edict_s *player, struct weapon_data_s *info )
|
||||
{
|
||||
memset( info, 0, MAX_WEAPONS * sizeof(weapon_data_t) );
|
||||
#if CLIENT_WEAPONS
|
||||
int i;
|
||||
weapon_data_t *item;
|
||||
@ -1634,8 +1635,6 @@ int GetWeaponData( struct edict_s *player, struct weapon_data_s *info )
|
||||
CBasePlayer *pl = (CBasePlayer *)CBasePlayer::Instance( pev );
|
||||
CBasePlayerWeapon *gun;
|
||||
|
||||
memset( info, 0, 32 * sizeof(weapon_data_t) );
|
||||
|
||||
if( !pl )
|
||||
return 1;
|
||||
|
||||
@ -1656,7 +1655,7 @@ int GetWeaponData( struct edict_s *player, struct weapon_data_s *info )
|
||||
// Get The ID.
|
||||
gun->GetItemInfo( &II );
|
||||
|
||||
if( II.iId >= 0 && II.iId < 32 )
|
||||
if( II.iId >= 0 && II.iId < MAX_WEAPONS )
|
||||
{
|
||||
item = &info[II.iId];
|
||||
|
||||
@ -1682,8 +1681,6 @@ int GetWeaponData( struct edict_s *player, struct weapon_data_s *info )
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
memset( info, 0, 32 * sizeof(weapon_data_t) );
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
@ -3095,7 +3095,15 @@ void CBasePlayer::SelectItem( const char *pstr )
|
||||
|
||||
if( m_pActiveItem )
|
||||
{
|
||||
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(m_pActiveItem->GetWeaponPtr());
|
||||
if (weapon)
|
||||
weapon->m_ForceSendAnimations = true;
|
||||
|
||||
m_pActiveItem->Deploy();
|
||||
|
||||
if (weapon)
|
||||
weapon->m_ForceSendAnimations = false;
|
||||
|
||||
m_pActiveItem->UpdateItemInfo();
|
||||
}
|
||||
}
|
||||
@ -3121,7 +3129,16 @@ void CBasePlayer::SelectLastItem( void )
|
||||
CBasePlayerItem *pTemp = m_pActiveItem;
|
||||
m_pActiveItem = m_pLastItem;
|
||||
m_pLastItem = pTemp;
|
||||
|
||||
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(m_pActiveItem->GetWeaponPtr());
|
||||
if (weapon)
|
||||
weapon->m_ForceSendAnimations = true;
|
||||
|
||||
m_pActiveItem->Deploy();
|
||||
|
||||
if (weapon)
|
||||
weapon->m_ForceSendAnimations = false;
|
||||
|
||||
m_pActiveItem->UpdateItemInfo();
|
||||
}
|
||||
|
||||
@ -4592,8 +4609,16 @@ BOOL CBasePlayer::SwitchWeapon( CBasePlayerItem *pWeapon )
|
||||
}
|
||||
|
||||
m_pActiveItem = pWeapon;
|
||||
|
||||
CBasePlayerWeapon* weapon = (CBasePlayerWeapon*)(pWeapon->GetWeaponPtr());
|
||||
if (weapon)
|
||||
weapon->m_ForceSendAnimations = true;
|
||||
|
||||
pWeapon->Deploy();
|
||||
|
||||
if (weapon)
|
||||
weapon->m_ForceSendAnimations = false;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -639,6 +639,13 @@ void CScientist::HandleAnimEvent( MonsterEvent_t *pEvent )
|
||||
//=========================================================
|
||||
void CScientist::Spawn( void )
|
||||
{
|
||||
// We need to set it before precache so the right voice will be chosen
|
||||
if( pev->body == -1 )
|
||||
{
|
||||
// -1 chooses a random head
|
||||
pev->body = RANDOM_LONG( 0, NUM_SCIENTIST_HEADS - 1 );// pick a head, any head
|
||||
}
|
||||
|
||||
Precache();
|
||||
|
||||
SET_MODEL( ENT( pev ), "models/scientist.mdl" );
|
||||
@ -659,12 +666,6 @@ void CScientist::Spawn( void )
|
||||
// White hands
|
||||
pev->skin = 0;
|
||||
|
||||
if( pev->body == -1 )
|
||||
{
|
||||
// -1 chooses a random head
|
||||
pev->body = RANDOM_LONG( 0, NUM_SCIENTIST_HEADS - 1 );// pick a head, any head
|
||||
}
|
||||
|
||||
// Luther is black, make his hands black
|
||||
if( pev->body == HEAD_LUTHER )
|
||||
pev->skin = 1;
|
||||
@ -722,7 +723,7 @@ void CScientist::TalkInit()
|
||||
m_szGrp[TLK_MORTAL] = "SC_MORTAL";
|
||||
|
||||
// get voice for head
|
||||
switch( pev->body % 3 )
|
||||
switch( pev->body % NUM_SCIENTIST_HEADS )
|
||||
{
|
||||
default:
|
||||
case HEAD_GLASSES:
|
||||
|
@ -364,7 +364,12 @@ void CTripmine::Spawn()
|
||||
m_iId = WEAPON_TRIPMINE;
|
||||
SET_MODEL( ENT( pev ), "models/v_tripmine.mdl" );
|
||||
pev->frame = 0;
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
pev->body = 0;
|
||||
#else
|
||||
pev->body = 3;
|
||||
#endif
|
||||
pev->sequence = TRIPMINE_GROUND;
|
||||
// ResetSequenceInfo();
|
||||
pev->framerate = 0;
|
||||
@ -449,7 +454,7 @@ void CTripmine::PrimaryAttack( void )
|
||||
#else
|
||||
flags = 0;
|
||||
#endif
|
||||
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usTripFire, 0.0f, g_vecZero, g_vecZero, 0.0f, 0.0f, 0, 0, 0, 0 );
|
||||
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usTripFire, 0.0f, g_vecZero, g_vecZero, 0.0f, 0.0f, 0, 0, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] == 1, 0 );
|
||||
|
||||
if( tr.flFraction < 1.0f )
|
||||
{
|
||||
|
@ -820,7 +820,7 @@ int CBasePlayerWeapon::UpdateClientData( CBasePlayer *pPlayer )
|
||||
void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal, int body )
|
||||
{
|
||||
if( UseDecrement() )
|
||||
skiplocal = 1;
|
||||
skiplocal = !m_ForceSendAnimations;
|
||||
else
|
||||
skiplocal = 0;
|
||||
|
||||
|
@ -83,8 +83,6 @@ public:
|
||||
|
||||
#define WEAPON_SUIT 31 // ?????
|
||||
|
||||
#define MAX_WEAPONS 32
|
||||
|
||||
#define MAX_NORMAL_BATTERY 100
|
||||
|
||||
// weapon weight factors (for auto-switching) (-1 = noswitch)
|
||||
@ -351,6 +349,9 @@ public:
|
||||
// hle time creep vars
|
||||
float m_flPrevPrimaryAttack;
|
||||
float m_flLastFireTime;
|
||||
|
||||
//Hack so deploy animations work when weapon prediction is enabled.
|
||||
bool m_ForceSendAnimations;
|
||||
};
|
||||
|
||||
class CBasePlayerAmmo : public CBaseEntity
|
||||
|
@ -120,6 +120,20 @@ static char grgchTextureType[CTEXTURESMAX];
|
||||
|
||||
int g_onladder = 0;
|
||||
|
||||
static void PM_InitTrace( trace_t *trace, const vec3_t end )
|
||||
{
|
||||
memset( trace, 0, sizeof( *trace ));
|
||||
VectorCopy( end, trace->endpos );
|
||||
trace->allsolid = true;
|
||||
trace->fraction = 1.0f;
|
||||
}
|
||||
|
||||
static void PM_TraceModel( physent_t *pe, float *start, float *end, trace_t *trace )
|
||||
{
|
||||
PM_InitTrace( trace, end );
|
||||
pmove->PM_TraceModel(pe, start, end, trace);
|
||||
}
|
||||
|
||||
void PM_SwapTextures( int i, int j )
|
||||
{
|
||||
char chTemp;
|
||||
@ -2108,7 +2122,7 @@ void PM_LadderMove( physent_t *pLadder )
|
||||
onFloor = false;
|
||||
|
||||
pmove->gravity = 0;
|
||||
pmove->PM_TraceModel( pLadder, pmove->origin, ladderCenter, &trace );
|
||||
PM_TraceModel(pLadder, pmove->origin, ladderCenter, &trace);
|
||||
if( trace.fraction != 1.0f )
|
||||
{
|
||||
float forward = 0, right = 0;
|
||||
|
@ -20,12 +20,12 @@ import os
|
||||
import sys
|
||||
|
||||
ANDROID_NDK_ENVVARS = ['ANDROID_NDK_HOME', 'ANDROID_NDK']
|
||||
ANDROID_NDK_SUPPORTED = [10, 19, 20, 23]
|
||||
ANDROID_NDK_SUPPORTED = [10, 19, 20, 23, 25]
|
||||
ANDROID_NDK_HARDFP_MAX = 11 # latest version that supports hardfp
|
||||
ANDROID_NDK_GCC_MAX = 17 # latest NDK that ships with GCC
|
||||
ANDROID_NDK_UNIFIED_SYSROOT_MIN = 15
|
||||
ANDROID_NDK_SYSROOT_FLAG_MAX = 19 # latest NDK that need --sysroot flag
|
||||
ANDROID_NDK_API_MIN = { 10: 3, 19: 16, 20: 16, 23: 16 } # minimal API level ndk revision supports
|
||||
ANDROID_NDK_API_MIN = { 10: 3, 19: 16, 20: 16, 23: 16, 25: 19 } # minimal API level ndk revision supports
|
||||
|
||||
ANDROID_STPCPY_API_MIN = 21 # stpcpy() introduced in SDK 21
|
||||
ANDROID_64BIT_API_MIN = 21 # minimal API level that supports 64-bit targets
|
||||
|
Loading…
x
Reference in New Issue
Block a user