misaligment fixes

This commit is contained in:
nillerusr
2022-05-15 21:09:59 +03:00
parent 1218fa659c
commit 3a73624b7e
39 changed files with 7592 additions and 6056 deletions
+2 -2
View File
@@ -166,7 +166,7 @@ void GenerateSquareWaveEffect( RumbleWaveform_t *pWaveform, const WaveGenParams_
while( i < NUM_WAVE_SAMPLES )
{
for( j = 0 ; j < steps ; j++ )
for( j = 0 ; j < steps && i < NUM_WAVE_SAMPLES; j++ )
{
if( params.leftChannel )
{
@@ -177,7 +177,7 @@ void GenerateSquareWaveEffect( RumbleWaveform_t *pWaveform, const WaveGenParams_
pWaveform->amplitude_right[i++] = params.minAmplitude;
}
}
for( j = 0 ; j < steps ; j++ )
for( j = 0 ; j < steps && i < NUM_WAVE_SAMPLES; j++ )
{
if( params.leftChannel )
{
+2 -2
View File
@@ -33,7 +33,7 @@ void C_VoteController::RecvProxy_VoteType( const CRecvProxyData *pData, void *pS
if( pMe->m_iActiveIssueIndex == pData->m_Value.m_Int )
return;
pMe->m_iActiveIssueIndex = pData->m_Value.m_Int;
memcpy( &pMe->m_iActiveIssueIndex, &pData->m_Value.m_Int, sizeof(pData->m_Value.m_Int) );
pMe->m_bTypeDirty = true;
// Since the contents of a new vote are in three parts, we can't directly send an event to the Hud
@@ -186,4 +186,4 @@ void C_VoteController::FireGameEvent( IGameEvent *event )
}
}
}
}
}
+109
View File
@@ -0,0 +1,109 @@
//-----------------------------------------------------------------------------
// CLIENT_HL1MP.VPC
//
// Project Script
//-----------------------------------------------------------------------------
$Macro SRCDIR "..\.."
$Macro GAMENAME "hl1mp"
$Include "$SRCDIR\game\client\client_base.vpc"
$Configuration
{
$Compiler
{
$AdditionalIncludeDirectories "$BASE;.\hl1,.\hl2,.\hl2\elements,$SRCDIR\game\shared\hl1,$SRCDIR\game\shared\hl2"
$PreprocessorDefinitions "$BASE;HL1_CLIENT_DLL;HL1MP_CLIENT_DLL"
}
}
$Project "Client (HL1MP)"
{
$Folder "Source Files"
{
-$File "geiger.cpp"
-$File "history_resource.cpp"
-$File "train.cpp"
$File "c_team_objectiveresource.cpp"
$File "c_team_objectiveresource.h"
$File "hud_chat.cpp"
$File "$SRCDIR\game\shared\predicted_viewmodel.cpp"
$File "$SRCDIR\game\shared\predicted_viewmodel.h"
$Folder "HL2 DLL"
{
$File "hl2\c_antlion_dust.cpp"
$File "hl2\c_basehelicopter.cpp"
$File "hl2\c_basehelicopter.h"
$File "hl2\c_basehlcombatweapon.h"
$File "hl2\c_corpse.cpp"
$File "hl2\c_corpse.h"
$File "hl2\c_hl2_playerlocaldata.h"
$File "hl2\c_rotorwash.cpp"
$File "$SRCDIR\game\shared\hl2\citadel_effects_shared.h"
$File "$SRCDIR\game\shared\hl2\env_headcrabcanister_shared.h"
$File "hl2\fx_bugbait.cpp"
$File "$SRCDIR\game\shared\hl2\hl2_shareddefs.h"
$File "hl2\hl_in_main.cpp"
$File "hl2\hl_prediction.cpp"
$File "hl2\vgui_rootpanel_hl2.cpp"
}
$Folder "HL1 DLL"
{
$File "hl1\hl1_c_legacytempents.cpp"
$File "hl1\hl1_c_player.cpp"
$File "hl1\hl1_c_player.h"
$File "hl1\hl1_c_rpg_rocket.cpp"
$File "hl1\hl1_c_weapon__stubs.cpp"
$File "hl1\hl1_clientmode.cpp"
$File "hl1\hl1_clientmode.h"
$File "hl1\hl1_clientscoreboard.cpp"
$File "hl1\hl1_hud_deathnotice.cpp"
$File "hl1\hl1_fx_gauss.cpp"
$File "hl1\hl1_fx_gibs.cpp"
$File "hl1\hl1_fx_impacts.cpp"
$File "hl1\hl1_fx_shelleject.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.h"
$File "hl1\hl1_hud_ammo.cpp"
$File "hl1\hl1_hud_battery.cpp"
$File "hl1\hl1_hud_damageindicator.cpp"
$File "hl1\hl1_hud_damagetiles.cpp"
$File "hl1\hl1_hud_flashlight.cpp"
$File "hl1\hl1_hud_geiger.cpp"
$File "hl1\hl1_hud_health.cpp"
$File "hl1\hl1_hud_history_resource.cpp"
$File "hl1\hl1_hud_numbers.cpp"
$File "hl1\hl1_hud_numbers.h"
$File "hl1\hl1_hud_train.cpp"
$File "hl1\hl1_hud_weaponselection.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_basecombatweapon_shared.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_gamerules.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.h"
$File "$SRCDIR\game\shared\hl1\hl1_usermessages.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_357.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_crossbow.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_egon.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_gauss.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_glock.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_handgrenade.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_hornetgun.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_mp5.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_rpg.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_sachel.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_shotgun.cpp"
$File "$SRCDIR\game\server\hl1\hl1_weapon_crowbar.cpp"
}
$Folder "HL1MP DLL"
{
$File "hl1\c_hl1mp_player.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_basecombatweapon_shared.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_gamerules.cpp"
}
}
}
+3
View File
@@ -119,6 +119,9 @@ class CHudVote : public vgui::EditablePanel, public CHudElement
{
DECLARE_CLASS_SIMPLE( CHudVote, vgui::EditablePanel );
public:
DECLARE_MULTIPLY_INHERITED();
CHudVote( const char *pElementName );
virtual void LevelInit( void );
+1 -1
View File
@@ -4010,7 +4010,7 @@ void CRendering3dView::DrawOpaqueRenderables( ERenderDepthMode DepthMode )
}
}
if ( 0 && r_threaded_renderables.GetBool() )
if ( r_threaded_renderables.GetBool() )
{
ParallelProcess( "BoneSetupNpcsLast", arrBoneSetupNpcsLast.Base() + numOpaqueEnts - numNpcs, numNpcs, &SetupBonesOnBaseAnimating );
ParallelProcess( "BoneSetupNpcsLast NonNPCs", arrBoneSetupNpcsLast.Base(), numNonNpcsAnimating, &SetupBonesOnBaseAnimating );
+1 -1
View File
@@ -17,7 +17,7 @@ games = {
'hl1': ['client_base.vpc', 'client_hl1.vpc'],
'episodic': ['client_base.vpc', 'client_episodic.vpc'],
'portal': ['client_base.vpc', 'client_portal.vpc'],
'hl1mp': ['client_base.vpc', 'client_hl1.vpc'],
'hl1mp': ['client_base.vpc', 'client_hl1mp.vpc'],
'cstrike': ['client_base.vpc', 'client_cstrike.vpc'],
'dod': ['client_base.vpc', 'client_dod.vpc']
}
+2 -2
View File
@@ -93,7 +93,7 @@ private:
CUtlRBTree< CritEntry_t, short > m_Lookup;
};
#pragma pack(1)
//#pragma pack(1)
template<typename T>
struct response_interval_t
{
@@ -150,7 +150,7 @@ struct AI_ResponseParams
responseparams_interval_t predelay; //21
};
#pragma pack()
//#pragma pack()
//-----------------------------------------------------------------------------
// Purpose: Generic container for a response to a match to a criteria set
-2
View File
@@ -44,7 +44,6 @@ inline static char *CopyString( const char *in )
return out;
}
#pragma pack(1)
class Matcher
{
public:
@@ -542,7 +541,6 @@ struct Rule
bool m_bMatchOnce : 1;
bool m_bEnabled : 1;
};
#pragma pack()
//-----------------------------------------------------------------------------
// Purpose:
+179
View File
@@ -0,0 +1,179 @@
//-----------------------------------------------------------------------------
// SERVER_HL1MP.VPC
//
// Project Script
//-----------------------------------------------------------------------------
$Macro SRCDIR "..\.."
$Macro GAMENAME "hl1mp"
$Include "$SRCDIR\game\server\server_base.vpc"
$Configuration
{
$Compiler
{
$AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\hl1,$SRCDIR\game\shared\hl2,.\hl1,.\hl2"
$PreprocessorDefinitions "$BASE;HL1_DLL;HL1MP_DLL"
}
}
$Project "Server (HL1MP)"
{
$Folder "Source Files"
{
$File "hl1\hl1mp_gameinterface.cpp"
$File "basegrenade_concussion.cpp"
$File "basegrenade_contact.cpp"
$File "basegrenade_timed.cpp"
$File "hl2\Func_Monitor.cpp"
$File "GrenadeThrown.cpp"
$File "GrenadeThrown.h"
$File "h_cycler.cpp"
$File "$SRCDIR\game\shared\predicted_viewmodel.cpp"
$File "$SRCDIR\game\shared\predicted_viewmodel.h"
$File "$SRCDIR\game\shared\hl2\survival_gamerules.cpp"
$File "team_spawnpoint.cpp"
$File "team_spawnpoint.h"
$File "$SRCDIR\game\shared\weapon_parse_default.cpp"
$Folder "HL2 DLL"
{
$File "hl2\ai_behavior_police.h"
$File "hl2\ai_goal_police.h"
$File "hl2\ai_interactions.h"
$File "hl2\antlion_maker.h"
$File "hl2\CBaseSpriteProjectile.cpp"
$File "hl2\CBaseSpriteProjectile.h"
$File "$SRCDIR\game\shared\hl2\citadel_effects_shared.h"
$File "hl2\energy_wave.h"
$File "$SRCDIR\game\shared\hl2\env_alyxemp_shared.h"
$File "$SRCDIR\game\shared\hl2\hl2_shareddefs.h"
$File "$SRCDIR\game\shared\hl2\hl_movedata.h"
$File "hl2\look_door.cpp"
$File "hl2\monster_dummy.cpp"
$File "hl2\npc_metropolice.h"
$File "hl2\npc_playercompanion.h"
$File "npc_Talker.cpp"
$File "npc_Talker.h"
$File "hl2\prop_combine_ball.h"
$File "hl2\script_intro.h"
$File "hl2\vehicle_crane.h"
$File "hl2\weapon_crowbar.h"
$File "hl2\weapon_physcannon.h"
$File "hl2\weapon_stunstick.h"
$Folder "unused"
{
$File "hl2\grenade_beam.cpp"
$File "hl2\grenade_beam.h"
$File "hl2\grenade_homer.cpp"
$File "hl2\grenade_homer.h"
}
}
$Folder "HL1 DLL"
{
$File "actanimating.cpp"
$File "actanimating.h"
$File "hl1\hl1_ai_basenpc.cpp"
$File "hl1\hl1_ai_basenpc.h"
$File "hl1\hl1_basecombatweapon.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_basecombatweapon_shared.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_basecombatweapon_shared.h"
$File "hl1\hl1_basegrenade.cpp"
$File "hl1\hl1_basegrenade.h"
$File "hl1_CBaseHelicopter.h"
$File "hl1\hl1_client.cpp"
$File "hl1\hl1_ents.cpp"
$File "hl1\hl1_env_speaker.cpp"
$File "hl1\hl1_eventlog.cpp"
$File "hl1\hl1_func_recharge.cpp"
$File "hl1\hl1_func_tank.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.h"
$File "$SRCDIR\game\shared\hl1\hl1_gamerules.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_gamerules.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_gamerules.h"
$File "hl1\hl1_grenade_mp5.cpp"
$File "hl1\hl1_grenade_mp5.h"
$File "hl1\hl1_grenade_spit.cpp"
$File "hl1\hl1_grenade_spit.h"
$File "hl1\hl1_item_ammo.cpp"
$File "hl1\hl1_item_battery.cpp"
$File "hl1\hl1_item_healthkit.cpp"
$File "hl1\hl1_item_longjump.cpp"
$File "hl1\hl1_item_suit.cpp"
$File "hl1\hl1_items.cpp"
$File "hl1\hl1_items.h"
$File "hl1\hl1_monstermaker.cpp"
$File "hl1\hl1_monstermaker.h"
$File "hl1\hl1_npc_aflock.cpp"
$File "hl1\hl1_npc_agrunt.cpp"
$File "hl1\hl1_npc_apache.cpp"
$File "hl1\hl1_npc_barnacle.cpp"
$File "hl1\hl1_npc_barnacle.h"
$File "hl1\hl1_npc_barney.cpp"
$File "hl1\hl1_npc_barney.h"
$File "hl1\hl1_npc_bigmomma.cpp"
$File "hl1\hl1_npc_bloater.cpp"
$File "hl1\hl1_npc_bullsquid.cpp"
$File "hl1\hl1_npc_bullsquid.h"
$File "hl1\hl1_npc_controller.cpp"
$File "hl1\hl1_npc_gargantua.cpp"
$File "hl1\hl1_npc_gargantua.h"
$File "hl1\hl1_npc_gman.cpp"
$File "hl1\hl1_npc_hassassin.cpp"
$File "hl1\hl1_npc_headcrab.cpp"
$File "hl1\hl1_npc_headcrab.h"
$File "hl1\hl1_npc_hgrunt.cpp"
$File "hl1\hl1_npc_hgrunt.h"
$File "hl1\hl1_npc_hornet.cpp"
$File "hl1\hl1_npc_hornet.h"
$File "hl1\hl1_npc_houndeye.cpp"
$File "hl1\hl1_npc_houndeye.h"
$File "hl1\hl1_npc_ichthyosaur.cpp"
$File "hl1\hl1_npc_ichthyosaur.h"
$File "hl1\hl1_npc_leech.cpp"
$File "hl1\hl1_npc_nihilanth.cpp"
$File "hl1\hl1_npc_osprey.cpp"
$File "hl1\hl1_npc_roach.cpp"
$File "hl1\hl1_npc_scientist.cpp"
$File "hl1\hl1_npc_scientist.h"
$File "hl1\hl1_npc_snark.cpp"
$File "hl1\hl1_npc_snark.h"
$File "hl1\hl1_npc_talker.cpp"
$File "hl1\hl1_npc_talker.h"
$File "hl1\hl1_npc_tentacle.cpp"
$File "hl1\hl1_npc_turret.cpp"
$File "hl1\hl1_npc_vortigaunt.cpp"
$File "hl1\hl1_npc_vortigaunt.h"
$File "hl1\hl1_npc_zombie.cpp"
$File "hl1\hl1_npc_zombie.h"
$File "hl1\hl1_player.cpp"
$File "hl1\hl1_player.h"
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.h"
$File "hl1\hl1_playermove.cpp"
$File "$SRCDIR\game\shared\hl1\hl1_usermessages.cpp"
$File "hl1\hl1_weapon_snark.cpp"
$File "hl1\hl1_weapon_tripmine.cpp"
$File "hl1\hl1_weaponbox.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_basecombatweapon_shared.cpp"
$File "hl1\hl1mp_bot_temp.cpp"
$File "hl1\hl1mp_player.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_357.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_crossbow.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_egon.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_gauss.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_glock.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_handgrenade.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_hornetgun.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_mp5.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_rpg.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_sachel.cpp"
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_shotgun.cpp"
$File "$SRCDIR\game\server\hl1\hl1_weapon_crowbar.cpp"
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ games = {
'hl2mp': ['server_base.vpc', 'server_hl2mp.vpc'],
'portal': ['server_base.vpc', 'server_portal.vpc'],
'hl1': ['server_base.vpc', 'server_hl1.vpc'],
'hl1mp': ['server_base.vpc', 'server_hl1.vpc'],
'hl1mp': ['server_base.vpc', 'server_hl1mp.vpc'],
'cstrike': ['server_base.vpc', 'server_cstrike.vpc', 'nav_mesh.vpc'],
'dod': ['server_base.vpc', 'server_dod.vpc'],
'tf': [
+2 -1
View File
@@ -203,6 +203,7 @@ CSave::CSave( CSaveRestoreData *pdata )
inline int CSave::DataEmpty( const char *pdata, int size )
{
static int void_data = 0;
if ( size != 4 )
{
const char *pLimit = pdata + size;
@@ -214,7 +215,7 @@ inline int CSave::DataEmpty( const char *pdata, int size )
return 1;
}
return ( *((int *)pdata) == 0 );
return memcmp(pdata, &void_data, sizeof(int)) == 0;
}
//-----------------------------------------------------------------------------