Commit Graph

105 Commits

Author SHA1 Message Date
Bulat Fatykh 18d97acbce Merge current upstream master to retain landed IWD diagnostics
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	crates/asset_transport/src/iwd.rs
2026-10-01 22:39:33 +03:00
vtroc7 bfe3c2aa70 Breath, shields, crossbow, car destruction, remote animation and GSC services
Scoped weapons hold breath with recovery feedback and sound. Riot shields
block and deflect bullets in hand and on the back; explosive crossbow bolts,
destructible map cars with round resets, and T5 map model collision work.
Remote players show last stand, weapon change, jump, mantle, landing,
ladder and stun animations, and server hitboxes follow the shared torso tree.

GSC gains spectator follow cameras, chat, kick, vehicle paths and flight
controls, physics spheres, slow motion, slide and mantle movers, damage
triggers, music, ambience, rumble and live audio fades over a shared mixer.

IW5 and T5 maps get sun shadows with per-stage sun selection; post-fx
pipelines compile before a vision blend needs them. The lobby browser keeps
focus and selection, and rooms can be password protected. Console supply
and give commands search every item category. Frames and replays decode
only the current wire protocol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 19:18:44 +03:00
vtroc7 9dad890c20 Merge pull requests #33 #35 #38 #39 #40 #41 #42 #43 #44 #45 #46 #47 #48 #49 from gitoutofthere 2026-10-01 19:07:17 +03:00
Bulat Fatykh abe1b4e91c Validate IWD entry lengths before returning resource bytes 2026-10-01 17:46:39 +03:00
Bulat Fatykh 6a6069a589 Escape interior NUL in Perfetto debug strings 2026-10-01 17:43:47 +03:00
Bulat Fatykh ed92dbdbf2 Preserve unreadable user settings during autosave 2026-10-01 17:40:29 +03:00
Bulat Fatykh e21be0c4fb Preserve string token kinds in GSC parsing 2026-10-01 17:34:18 +03:00
Bulat Fatykh 1644e60a87 Validate incoming master room option requests before state changes 2026-10-01 17:32:55 +03:00
Bulat Fatykh bcebc2f038 Remove the redundant master binary declaration 2026-10-01 17:10:57 +03:00
Bulat Fatykh 38ba1b4c56 Clarify IWD entry failures with operation and archive 2026-10-01 17:09:08 +03:00
Bulat Fatykh 7aafeae990 Reuse incremental FNV hashing in the artifact cache [skip ci] 2026-10-01 17:07:36 +03:00
Bulat Fatykh 8c5457bc68 docs: clarify master settings for players 2026-10-01 17:07:23 +03:00
Bulat Fatykh fb3d79d608 docs: explain IW4L capabilities and first-run setup 2026-10-01 16:53:35 +03:00
Bulat Fatykh 74f0dbef96 Bind localized string table lookups by row 2026-10-01 16:41:40 +03:00
Bulat Fatykh 00a0e3ab2d Reuse the packed unit vector decoder for asset models
Adapt the shared decoding idea from Nathan Safran's commit
598bcabba508c40b4476d3265970637398b51b81 in nsafran1217/iw4L.
Delegate the complete asset-model decoder to the existing dpvs_iw4
function; leave the source commit's scale table and other changes out.

Source: https://github.com/nsafran1217/iw4L/commit/598bcabba508c40b4476d3265970637398b51b81
Co-authored-by: Nathan Safran <nsafran1217@gmail.com>
2026-10-01 16:38:26 +03:00
Bulat Fatykh fd9b8f8174 Remove the Rust match-end decision retired by script-driven matches 2026-10-01 16:34:39 +03:00
Bulat Fatykh d5fd9cc3f5 Make the glass lookup change independent of decoder transactions 2026-10-01 16:32:39 +03:00
Bulat Fatykh 2202707e8d Search existing glass rows without building a full index
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 16:32:38 +03:00
Bulat Fatykh 4babe8e897 Keep snapshot decoders unchanged on wire errors 2026-10-01 16:32:38 +03:00
Bulat Fatykh 029a5e634e Limit the decoder fix to projectile state on read errors 2026-10-01 16:31:54 +03:00
Bulat Fatykh 212557c871 Keep snapshot decoders unchanged on wire errors 2026-10-01 16:31:54 +03:00
vc ff7369ffa6 Merge pull request #26 from gitoutofthere/fix/snapshot-delta-length
Check a snapshot delta's length against its frame before allocating it
2026-10-01 13:12:15 +03:00
vc 2768169e6e Merge pull request #25 from gitoutofthere/fix/gsc-nonfinite-text
Turn a non-finite GSC number into a script error, not a panic, when it meets text
2026-10-01 13:12:08 +03:00
vc 1f3df639f4 Merge pull request #24 from gitoutofthere/fix/usercmd-host-panics
Keep a client's usercmd from panicking the host step
2026-10-01 13:11:10 +03:00
vc 89957e170f Merge pull request #22 from Intelios/skip-appledouble-files
Skip macOS AppleDouble files when indexing IWD archives
2026-10-01 13:08:58 +03:00
vc 4452be47f2 Merge pull request #31 from awsms/fix/manyshit
Improve controller aiming and restore MW2 reload ADS timing
2026-10-01 12:43:22 +03:00
vtroc7 41713bb762 Remove controller and weapon research comments 2026-10-01 12:42:43 +03:00
vc dac17be04a Merge pull request #30 from Wet-Shoelace/master
Fix weapon bob tilt when walking
2026-10-01 12:37:11 +03:00
vc 2ed90f1c73 Merge pull request #23 from gitoutofthere/cleanup/pm-flags-literals
Name the single pm_flags bits in movement_iw4
2026-10-01 12:15:03 +03:00
awsms 581832c62b Enable akimbo wrist twist and righty tighty
Restore the akimbo sprint/reload and rapid weapon-cycle behavior needed for
wrist twist and righty tighty. Independent sprint checks previously replaced
one hand's reload animation while processing the other hand.

Prepare both hands and decay their timers before making one shared sprint
transition decision. Follow the original MW2 state checks: firing,
rechambering or melee in either hand can block the transition, while the
primary hand determines whether both hands enter or leave sprint. This
preserves the left reload pose through a rapid weapon-cycle cancellation
without a dedicated wrist-twist animation exception.

Allow combined use/reload to coexist with akimbo sprint while the primary
hand is not reloading. Account for the RELOAD bit added by the current
client when no interaction is targeted. Once the primary hand reloads,
restore normal sprint interruption so reloading both weapons cannot trigger
the left-only wrist twist. Keep ordinary reload-button sprint interruption.

Validation: play build, targeted formatting and diff checks passed. A
temporary probe matched 1,922 state/flag combinations against the original
MW2 sprint-decision instruction block. Lifecycle probes covered left-only,
right-only and both-hand reloads with tapped and held input, including ammo
completion and non-restarting reload timers. Rapid weapon cycling and the
previous held-fire/reload regression probes passed. The user confirmed the
resulting behavior in game. No temporary probes are included.
2026-10-01 08:33:20 +02:00
awsms ba25d47245 Restore held fire and reload behavior
Reload requests were only accepted on a new button press, so holding reload
could not restart it after firing or canceling a weapon switch. Semi-auto
fire also required a new press even when a reload had rearmed the weapon.

Evaluate the held reload request through the existing reload eligibility
checks. Use the semi-auto shot count to gate firing, resetting it on trigger
release and reusing the existing resets during reloads and weapon changes.
Holding fire alone still produces one semi-auto shot, while holding fire
and reload repeats the shot/reload cycle. Holding reload through a double
weapon switch restarts the reload when the weapon becomes eligible again.
The shared simulation change applies to keyboard and controller input.

Validation: play build, targeted rustfmt and diff checks passed. Temporary
probes reproduced both failures before the change and passed afterward,
including normal and fast reloads, canceled and completed weapon switches,
semi-auto release/repress, reload eligibility, bolt actions and both akimbo
hands. The user confirmed the resulting behavior matches MW2 in game.
Temporary probes are excluded from the commit.
2026-10-01 08:21:14 +02:00
awsms 32d6dae721 Fix reload ADS timing
Holding aim originally allowed zooming throughout a reload. The blanket
reload-state restriction added in a2093b9 overcorrected this by blocking
ADS until the entire reload finished, delaying the return to aim compared
to MW2.

Replace that restriction with the original engine's ADS fraction logic.
Decode WeaponDef::iPositionReloadTransTime from IW4 assets and carry it
through the weapon catalog, combat facts and shared movement context.
Include the field in the simulation content fingerprint.

Magazine reloads suppress ADS while remaining weapon time exceeds the
weapon's authored transition window. Segmented reloads suppress ADS during
the start and insertion states, then use that window during reload end.
Keep ADS intent available so holding aim resumes the blend at the original
boundary. The comparison uses weapon-timer milliseconds, preserving the
existing Sleight of Hand timer scaling without an extra fixed delay.

Validation: play build, targeted formatting and diff checks passed. A
temporary reference probe compared 4,704 cases against the original
MW2/IW4x instruction block at 0x4a84ab..0x4a8513, including transition
boundaries and segmented reloads. Runtime traces verified authored windows
and early ADS recovery on M9, USP, Intervention and Barrett with Sleight
of Hand. The user confirmed the resulting behavior in game.

Temporary diagnostics and probes are excluded. The runtime test encountered
the previously observed shutdown SIGSEGV after process_exit code=0; this
change does not address that shutdown issue.
2026-10-01 08:06:24 +02:00
awsms a2093b931c Block aiming down sights during weapon reloads
The shared ADS permission check excluded weapon switches, melee and offhand
states but omitted the reload family. Holding or requesting ADS during a
reload could therefore keep raising the weapon and zooming the view.

Reject ADS throughout Reloading, ReloadingInterrupt, ReloadStart,
ReloadStartInterrupt and ReloadEnd using the existing weapon-state helper.
The normal ADS intent/fraction update then lowers the weapon at its ADS-out
rate and prevents re-entry until the reload ends. The same permission check
runs in authoritative simulation and client prediction, covering keyboard
reload and controller use/reload without changing their bindings.

Validation: play build, targeted rustfmt and diff checks passed. A temporary
probe reproduced the permissive behavior with the previous implementation,
then verified ADS exit and blocked entry for all five reload states with
RELOAD and USE_RELOAD inputs. It also checked ADS recovery when ready and
preserved firing/rechamber permissions. No in-game visual retest was run.
2026-10-01 07:49:58 +02:00
awsms d75aa4181a Fix controller trigger hands for akimbo weapons
The weapon simulation fires the right akimbo hand with THROW and the left
with ATTACK. Default controller bindings therefore fired the opposite hand:
RT used ATTACK while LT used speed_throw.

Port the hand-mapping behavior from the local Xbox branch to the unified
binding system. Resolve akimbo state from the predicted local player, with
a presented-snapshot fallback, and swap controller attack/speed_throw actions
when installing gameplay bindings. Preserve saved bindings, keyboard/mouse
controls and unrelated controller actions. Lefty and custom layouts follow
their assigned fire/aim actions rather than hard-coded physical triggers.

Use the existing binding-change path to release the old action and block a
held button until release when switching between single and dual weapons.

Validation: play build and diff checks passed. A temporary probe covered
right/left/both triggers, releases, normal fire/ADS bindings, Lefty and custom
assignments, mouse preservation, and release-before-remap weapon transitions.
No physical-controller gameplay retest was performed.
2026-10-01 07:46:01 +02:00
awsms b7661e1a0a Match IW4x controller turn acceleration
The turn-speed limit scaled with sensitivity while acceleration scaled
with FOV. Increasing sensitivity therefore lengthened the ramp, unlike
the local IW4x controller implementation.

Scale acceleration by the base controller sensitivity multiplier instead
of FOV, matching IW4x's default 1200 degrees/s squared times sensitivity.
Keep ADS and FOV scaling on the requested turn speed. Ramp the absolute
speed before applying the requested direction, matching IW4x's integrator
when the stick reverses direction during a ramp. Deceleration and disabled
acceleration remain immediate.

Validation: the play build, targeted rustfmt and diff checks passed.
A temporary reference probe passed 216 combinations of sensitivity, FOV,
ADS blend, frame rate and acceleration mode, including direction reversals,
release and disabling acceleration. No game relaunch or physical-controller
feel test was performed.
2026-10-01 07:42:51 +02:00
awsms 72b4c08c33 Separate controller presets from custom sensitivity
The fine sensitivity slider reused the 1-10 setting, conflating console
preset numbers with a continuous speed control. Selecting a preset must
leave the player's custom slider value available for later use.

Store the selected preset and custom multiplier independently. Add Custom
and integer choices 1 through 10 to the Controller menu. Use the IW4x
pc_options_gamepad.menu preset table: 0.6, 1.0, 1.4, 1.8, 2.0, 2.2, 2.6,
3.0, 3.5 and 4.0. Custom uses the local controller slider's 0.1-5.0 multiplier
range with 0.1 steps. Editing the slider selects Custom; selecting a preset
never overwrites the saved custom value.

Resolve the active multiplier before applying controller aiming. Persist
both settings and migrate the previous pad_sensitivity value to Custom
using its old value/3 speed mapping, preserving existing effective speed.
The acceleration toggle remains independent.

Validation: play build, targeted formatting and diff checks passed.
Temporary probes verified all ten preset multipliers, custom-value retention,
settings save/reload and legacy migration, and menu inheritance/choices.
Aiming probes also passed for acceleration on/off and ADS/FOV scaling at
30, 60 and 144 Hz. Gameplay feel and visual layout were not retested.
2026-10-01 07:39:30 +02:00
awsms e8d07d1a12 Allow fine controller sensitivity adjustments
The controller sensitivity slider advanced in steps of 0.5 and displayed
only whole numbers, hiding the selected fractional value.

Use 0.1 steps, matching the granularity of the earlier local controller
slider while retaining master's 1-10 sensitivity scale and speed mapping.
Add an optional decimal precision field to menu sliders and display one
decimal for controller look sensitivity. Other sliders retain their default
integer formatting; the renderer caps requested precision at six places.

Validation: the play build, targeted formatting and diff checks passed.
Temporary probes verified the controller menu's inherited slider definition,
its 1-10 bounds and 0.1 step, decimal precision, and preservation of fractional
sensitivity through settings sanitization. No permanent tests were added.
2026-10-01 07:34:07 +02:00
awsms 05e8075c59 Add a controller look acceleration toggle
Controller aiming always ramped toward the requested turn rate, preventing
players from choosing an immediate response to right-stick input.

Add an Enabled/Disabled Look Acceleration control to the Controller menu
and persist it through settings load/save and native menu dvars. Forward
the setting to the aiming code: disabling it applies the requested angular
velocity immediately, including when switching off an active ramp.

Keep acceleration enabled by default for existing configurations. Preserve
response curves, sensitivity scaling, ADS blending and FOV scaling.

Validation: the play build and targeted formatting checks passed. Temporary
probes checked immediate turning, the existing acceleration ramp, switching
off mid-ramp, and ADS/FOV scaling at 30, 60 and 144 Hz. Menu inheritance and
the toggle choices were also checked. Physical-controller feel has not
been retested in game.
2026-10-01 07:33:59 +02:00
Wet Shoelace a6ef49f1c7 Fixed weapon bob angle calculation in placement.rs
Currently, first-person weapon models are tilted to the right when walking forward, and to the left when walking backward. In MW2 however, the weapon only cants to the right or left when strafing in that direction. This PR fixes that small inaccuracy.
2026-09-30 21:20:47 -06:00
Bulat Fatykh 5b20792e3c Check a snapshot delta's length against its frame before allocating it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 01:28:56 +03:00
Bulat Fatykh 0484c02517 Turn a non-finite GSC number into a script error, not a panic, when it meets text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 01:28:56 +03:00
Bulat Fatykh 77ed5a0af2 Start a melee charge only toward a finite yaw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:41:09 +03:00
Bulat Fatykh b3e49ec1e5 Treat a hold-cancel for an offhand the player does not hold as no cancel
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:36:20 +03:00
Bulat Fatykh 15d9f001e7 Name the single pm_flags bits in movement_iw4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:30:11 +03:00
Intelios 10125feef0 Skip macOS AppleDouble files when indexing IWD archives
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:34:12 +01:00
vtroc7 11514ea37d Keep relayed matches through short link loss; stop browser polling in a lobby
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:23:24 +03:00
vtroc7 03016c48d6 Script-driven post effects, fog and earthquakes; equipment recovery, akimbo viewmodels, end-game leave and scope edges
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:01:29 +03:00
awsms 23f6c1aacc Fix retail settings menu startup and pause responses after class changes (#17)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:01:29 +03:00
Bulat Fatykh 77aafbf1cd Remove the direct UDP mode (#20)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:54:24 +03:00
Bulat Fatykh 6e0e184b07 Name each pm_flags bit once, in playerstate_iw4::pm_flags (#19)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:54:23 +03:00