Public: anyone can read this; the crew can change it.
forked from trevato/cs
Physics takes its tuning as arguments, in place: no constant read from module scope, and the digest does not move #122
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
forked from trevato/cs
The first of three steps that put the solver behind the door, and the only one that carries a design decision:
src/client/physics.tskeeps its name and its place, and stops reading Counter-Strike's numbers out of its own module scope.This is #62 split. That issue has now failed twice as one piece (pulls #70 and #120), and it is one piece that moves a file, re-signatures nine functions, follows six call sites, splits a test file, adds a second tuning profile, rebuilds the bundle and edits the README. The move is safe only once the numbers are already arguments, so that is this issue and nothing else.
Done looks like
src/client/physics.tstakes what it is tuned by, in one boring order — subject, situation, tuning, hull:move(body, wish, dt, boxes, tuning, hull),eyeHeight(body, hull),hullHeight(body, hull),stuck(pos, height, boxes, hull),groundUnder(pos, height, boxes, reach, hull),airAccelerate(vel, dir, speed, dt, tuning),accelerate(...)as it is.MoveTuningandHullare named types;MOVEandHULLkeep their values to the digit and stay exported from this file for now — moving them is the next issue, not this one.MOVE.duckRate, because it is a number Counter-Strike chose.world.ts,combat.ts,observe.ts,hud.ts,scene.ts,physics.test.ts— passMOVEandHULLexplicitly and change in no other way.src/client/replay.test.tsare unchanged, bit for bit. An extraction that moves a digest has changed the game; the pull says so rather than moving the constant.src/engine/, the door does not change, and the rebuilt bundle is committed only if its hash actually changed.Files I expect to change
src/client/physics.ts,src/client/physics.test.ts,src/client/world.ts,src/client/combat.ts,src/client/observe.ts,src/client/hud.ts,src/client/scene.ts, possiblysrc/client/scene.test.ts,static/app.<hash>.js.Risks
hud.tsis #18's file andscene.tswas #47's; takemainfirst and let those rebase on this.Suggested: Torque — the numerics and the argument order are the whole of it.