Skip to content

network_test branch compatibility#60

Draft
marchc1 wants to merge 3 commits intomainfrom
network_test_compat
Draft

network_test branch compatibility#60
marchc1 wants to merge 3 commits intomainfrom
network_test_compat

Conversation

@marchc1
Copy link
Copy Markdown
Owner

@marchc1 marchc1 commented Mar 19, 2026

Some of this stuff may be done already. A lot of it is increasing CurTime to double precision, which was already being done from the start in-engine. I'm sure some stuff is missing though so I will leave things unchecked until confirmed otherwise.

  • CurTime to double - List of changed symbols: (float=>double)

  • CBaseServer::GetTime, GetTickInterval, m_flTickInterval

  • IServer::GetTime, GetTickInterval

  • CClientState::GetTime, m_tickRemainder

  • C_BasePlayer:GetTimeBase

  • CPrediction::RunSimulation

  • CBasePlayer::SetTimeBase, CBasePlayer::GetTimeBase

  • CGlobalVarsBase::curtime, interval_per_tick

  • C_BaseEntity::BaseInterpolatePart1

  • C_BaseEntity::Interpolate, CBaseEntity::Interpolate (and other entities)

  • C_BasePlayer::GetFinalPredictedTime

  • CBaseCombatWeapon::m_flNextPrimaryAttack, m_flNextSecondaryAttack, m_flTimeWeaponIdle

  • Fixed networking of ammo types for weapons

  • Bump steam.inf (we pull this from gmod already)

  • Remove lua_matproxy_nobindmat

  • Removed dummy user messages for removed haptics stuff

  • Change ScreenFade network to just use floats

  • Get rid of CHudMenu & its usermsg

  • Remove dummy vote HUD user messages

  • Changes around sv_visiblemaxplayers - It is now networked to clients and used for the loading screen data (in place of maxplayers), also appears in server_spawn event (on client?)

  • Add convar limits to sv_visiblemaxplayers (-1 to 128)

  • Nuking SVC_Menu

  • Improve networking precision of world clicker - This fixes VERY jumpy tool ghosts in singleplayer when using context menu aiming, especially close to crosshair.

  • undef svc_Menu

  • Fixed CurTime being clamped to float serverside

  • Fix viewmodel bob spazzing out at high curtimes

  • Remove test_effect and env_physwire - Useless entities that do nothing

  • Remove trigger_cdaudio and target_cdaudio entities

  • Remove env_particlefire (does nothing)

  • Increase FOV networking bits from 8 to 16 - Since they are floats, they need a bit extra to maintain precision

  • Network CallOnClient and HUDWeaponPickedUp using EHANDLE - It was using EntIndex, which is not reliable and could cause wrong entities to be used for those hooks.

  • Increase RADAR_CONTACT_TYPE_BITS from 3 to 4 (for sign bit)

  • Delete networked m_iPlayerSoundType and related stuff

  • Removed a bunch of HL2MP_Player methods that were unused or overwritten (evaluate what this meant, if we need to do this on our end)

  • Delete unused networked value m_szLastPlaceName - Deletes CBasePlayer::GetLastKnownPlaceName

  • Remove unused CBasePlayer.m_fOnTarget networked property

  • Removes CBasePlayer.ResetAutoaim, GetAutoaimScore, AutoaimDeflection, IsOnTarget

  • Removes CBaseCombatWeapon::GetSpriteAutoaim, GetSpriteZoomedAutoaim

  • Removes unused autoaim_max_deflect convar

  • Delete CBasePlayer.m_szAnimExtension (unused)

  • Deletes C_BasePlayer::SetAnimation, m_flPhysics, m_szAnimExtension, SetAnimationExtension

  • Deletes CBasePlayer.m_szAnimExtension, SetAnimation, SetAnimationExtension, SetWeaponAnimType, m_szAnimExtension

  • Deletes CBaseCombatWeapon::GetAnimPrefix, last argument of CBaseCombatWeapon::DefaultDeploy

  • Removed ent_autoaim concommand (I don't think this is applicable, we probably don't have this)

  • View model vgui screens stuff

  • Remove CBaseCombatWeapon::GetBulletType, CBaseCombatWeapon::GetControlPanelInfo, CBaseCombatWeapon::GetControlPanelClassName, GetMaxAutoAimDeflection, WeaponAutoAimScale, ShouldShowControlPanels, IsInBadPosition, RepositionWeapon
    Remvoed CBaseViewModel.SpawnControlPanels, DestroyControlPanels, SetControlPanelsActive, ShowControlPanells, m_sAnimationPrefix, m_hScreens

  • Remove some unused NPC networking stuff- Removes CAI_BaseNPC.StartPingEffect, m_flTimePingEffect, m_iSpeedModSpeed, m_iSpeedModRadius, m_bSpeedModActive

  • ActivateSpeedModifier, DisableSpeedModifier, SetSpeedModRadius, SetSpeedModSpeed hammer inputs are removed. They never worked because the some client code for it is never compiled in any Source game.

  • Apply some changes to increase network transfer speeds - In my (Rubat's) limited tests, file transfers can reach 600KB/s now @ default settings, which is must higher than the 20-40? kb before @ default settings

  • Microoptimization to SVC_CreateStringTable bandwidth usage (?)

  • BaseCombatWeapon netwokring changes - Send local player exclusive data to spectators as well, such as clip1 and clip2

  • Reduce network bit count for m_iState

  • Remove CHudTexture methods from server builds

  • Nextbot networking changes

  • Network m_lifeState (Entity:Alive), same as NPCs

  • Fixed health/maxhealth not networking in singleplayer

  • Remove some unused networked fields from vehicles - m_nScannerDisabledWeapons and m_nScannerDisabledVehicle

  • Also fix singleplayer networking of health for NPCs

  • Player text chat cleanups - Removes unused usermessage SayText2

  • Get rid of unused VoiceSubtitle usermessage

  • Unregister unused usermessages & their handlers - HintText, KeyHintText, AmmoDenied

  • Deletes CHudHistoryResource

  • Remove the unused, never working Hint system - Removes CBasePlayer::Hints, ShouldShowHints, HintMessage, StartHintTimer, StopHintTimer, RemoveHintTimer - Removes C_BasePlayer::Hints, ShouldShowHints, HintMessage

  • Bump network version

  • Network punch angle at full precision - Since its networked only to the local player (and spectators?), it should be fine to full blast it

  • Switch more interpolation code to doubles - Fixes jittery viewpunch at high uptime - C_BaseEntity::Interp_Interpolate, m_lastInterpolationTime IInterpolatedVar::Interpolate (we probably already did this)

  • Some improvements to high curtime weapon firing - float=>double for C_BaseAnimating::GetAnimTimeInterval, C_BaseCombatCharacter ::GetNextAttack, SetNextAttack, m_flNextAttack, CBaseEntity::GetAnimTime, SetAnimTime, m_flAnimTime, m_flOldAnimTime, m_flPrevAnimTime, CBaseCombatWeapon::GetWeaponIdleTime, SetWeaponIdleTime (we probably already did this)

  • Switch entity thinking to doubles - CBaseEntity.ThinkSet, SetNextThink, GetNextThink, GetLastThink, SetLastThink (we probably already did this)

  • Switch HUD animations to double curtime (we probably already did this)

  • Switch suit chargers to doubles

  • Switch ENT:ExpressionFinished to use doubles for timing (not a concern right now?)

  • Fixed NPC turning overshooting (not a concern right now)

  • CAI_Component.GetLastThink float to double

  • New FIELD types & networking for doubles - Use new field/networking types for doubles where needed. All the fields that were switched from float to double now use correct FIELD and networking types

  • Switch map IO and forced ladder movement to doubles - EventQueuePrioritizedEvent_t.m_flFireTime, LadderMove_t.m_flStartTime & m_flArrivalTime, CBeam.m_flFireTime

  • More doubleage, for matproxies and some other pieces - IVEngineClient013:GetLastTimeStamp, CClientState.m_flLastServerTickTime, GetAnimationStartTime, some client interpolation stuff s_flLastTimeStamp, m_flOldLastTimeStamp, g_flLastPacketTimestamp - C_BaseEntity.m_flSpawnTime, m_flLastMessageTime, SpawnTime(), GetTextureAnimationStartTime()

  • Applies a modulo hack to LinearRamp matproxy, it doesn't seem to want to work properly with just doubles (probably not applicable right now, we dont have this matproxy yet)

  • Remove C_BaseEntity.GetCreateTime (unused) - GetCreateTime, m_flCreateTime, SetCreateTime, GetCreationTick, m_nCreationTick

  • Fixed some interpolation code still using floats

  • SimulationTime and NPC shooting to doubles

  • Turn more things to doubles - C_BaseAnimating.ForceSetupBonesAtTime & C_BaseEntity.LastBoneChangedTime, CAnimationLayer.GetFadeout, m_flLayerAnimtime

  • Health charger and headcrab canisters now use doubles

  • env_wind near infinite loop fix

  • CEnvWindShared::ComputeWindVariation, m_flVariationTime are now doubles

  • Switch client thinking to doubles

  • Fix clientside ragdolls update rate

  • SetupBones now use double precision time

  • FOV transitions now also use doubles

  • HL2 Intro entity uses doubles for timing

  • More conversions to double - CTriggerHurt, Airboat, CViewEffects Fade and ScreenShake , Geiger counter, temp entities delays

  • Fixed airboat wake trail - Fixes the die time, and fixes the color, fixed first entry to water creating trail from Z pos of 0

  • SpriteTrails use doubles

  • Bone cache and dlights use doubles

  • Fixed NPC look targets spazzing out due to high curtime

  • Switch CAI_Senses::GetTimeLastUpdate to use doubles

  • Switch Snark/Tripmine/Satchel to HL1MP base for prediction

  • Jiggle bones, NPC blinking and IK to use doubles

  • HL:S weapon high curtime fixes

  • More double curtime work - CBaseEntity GroundChangeTime stuff, AddStepDiscontinuity, grenade timers, CAnimationLayer::m_flLastAccess, C_AnimationLayer, PhysGetSyncCreateTime. CSequenceTransitioner::UpdateCurrent, animevent_t::eventtime

  • Some NPC improvements at high curtime - Scanners, Task/Schedule system, gargantua, hunter, gravity gun

  • Change beam related variables to doubles

  • Player anim state doubles

  • More bone setup conversion to doubles - C_BaseAnimating::AccumulateLayers, StandardBlendingRules, C_BaseAnimatingOverlay::CheckForLayerChanges

  • Particle system doubles

  • Apply fmod for CurrentTime matproxy - Since materials deal with floats, we gotta do hacky stuff to keep it working smoothly

  • Double curtime for closecaptions

  • Switch EmitSound delays to doubles

  • Send/RecvPropInt => Sent/RecvPropBool where appropriate for players

  • Reduce network bits of various net props - These have unnecessarily large (32bit) networked properties, so we reduce them to only as large as needed

  • CBaseCombatCharacter, CColorCorrectionVolume, CEnvProjectedTexture, CEnvScreenEffect, CFish, CTEBaseBeam, CTEExplosion, CTEMuzzleFlash

  • SLAM, Pistol, Gravity Gun, HL2 Machine Guns, Grenade, CBaseCombatWeapon, CPhysGunBeam

  • HLS shotty, satchel, hornet gun, gauss gun

  • CNPC_Puppet, CHL2PlayerLocalData, CPropAirboat, CNPC_Portal_FloorTurret, CNPC_RocketTurret, SmokeTrail, RocketTrail, CSteamJet, CBaseToggle, CCollisionProperty, CGMODRules

  • Delete TE_Impact (seems unused?)

  • Removing unused stuff

  • Removed UTIL_MuzzleFlash (unused)

  • Removed CWorld.m_flWaveHeight, m_bColdWorld (networked, unused)

  • Removed CBaseDoor.m_flWaveHeight (networked, unused)

  • Network m_bLocked for prop doors to clients

  • Network m_bLocked for vehicles and prisoner pod to clients

  • Network prop door m_eDoorState to clients - For mods to do with as they please

marchc1 and others added 3 commits March 19, 2026 16:12
I want to make a checklist on a PR and I need one commit for that so I'm doing it the lazy way
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants