Skip to content

five-on-it / packages/net-client/src/predictor / FeltCrash

Interface: FeltCrash ​

Defined in: packages/net-client/src/predictor.ts:239

What the prediction felt the controlled entity do to itself or run into, as it happened in the local world (Predictor.takeFelt), a round trip before the server's word:

  • a crash: the local world's own hit with no weapon behind it (CRASH_WEAPON) on the controlled entity or the player's character (a wreck's occupant), the tick after the blow (the vehicle system reads the velocity change at the next tick's start), or one the player's car dealt (a person run down, charged to its driver: car-hits.ts), with the hit points it took; the renderer sounds and shows it, and matches the server's hit on the same entity to it when it comes;
  • a knock: a light piece the controlled car knocked loose (the local world's own break, which the server never sends: its snapshots list the piece loose), sounded at once.

Properties ​

dealt ​

dealt: number

Defined in: packages/net-client/src/predictor.ts:245

The hit points the local world took off (0 for a knock), the server's number to come.


kind ​

kind: "crash" | "knock"

Defined in: packages/net-client/src/predictor.ts:241

Which of the two it is (see above).


seq ​

seq: number

Defined in: packages/net-client/src/predictor.ts:243

The number of the input whose tick felt it.


target ​

target: number

Defined in: packages/net-client/src/predictor.ts:247

The local entity it hit (a knock's: the piece).


x ​

x: number

Defined in: packages/net-client/src/predictor.ts:249

Where it happened (m).


z ​

z: number

Defined in: packages/net-client/src/predictor.ts:250