Quantum 3
3.0.9
The input provider is used to push recorded inputs into the simulation. This class uses the full input history instead of delta compressed input stream which uses a large memory footprint. More...
Public Member Functions | |
| InputProvider (DeterministicSessionConfig config, int capacity=60 *60, int growSize=0, int localActorNumber=0) | |
| Construct an input provider with a given capacity and grow size. More... | |
| InputProvider (DeterministicTickInputSet[] inputList) | |
| Construct an input provider with a given list of inputs. More... | |
| InputProvider (int playerCount, int startFrame, int capacity, int growSize, int localActorNumber=0) | |
| Construct an input provider with a given player count, start frame, capacity and grow size. More... | |
| void | AddRpc (int player, byte[] data, bool command) |
| Unused. More... | |
| bool | CanSimulate (int frame) |
| Returns true if the input provider can simulate the given frame. More... | |
| void | Clear (int startFrame) |
| Clear all recorded inputs. Usually called after a resync. More... | |
| DeterministicTickInputSet[] | ExportToList (int verifiedFrame) |
| Export the inputs to a list. More... | |
| DeterministicFrameInputTemp | GetInput (int frame, int player) |
| Returns input for a given frame and player. More... | |
| QTuple< byte[], bool > | GetRpc (int frame, int player) |
| Reads a rpc from the input provider. More... | |
| void | ImportFromList (DeterministicTickInputSet[] inputList) |
| Import a list of inputs into the input provider. More... | |
| void | InjectInput (DeterministicTickInput input, bool localReplay) |
| Injects a random input. More... | |
| void | OnInputConfirmed (QuantumGame game, DeterministicFrameInputTemp input) |
| This callback is called when an input was confirmed and can be recorded. More... | |
Public Attributes | |
| virtual int | LocalActorNumber => _localActorNumber |
| The actor number of the client that recoded the replay. More... | |
Additional Inherited Members | |
Properties inherited from Photon.Deterministic.IDeterministicReplayProvider | |
| int | LocalActorNumber [get] |
| Setting the correct local actor number makes DeterministicSession.IsLocalPlayer(Quantum.PlayerRef) work in replays similar to normal Quantum sessions. More... | |
The input provider is used to push recorded inputs into the simulation. This class uses the full input history instead of delta compressed input stream which uses a large memory footprint.
|
inline |
Construct an input provider with a given capacity and grow size.
| config | Session config used to gather PlayerCount and RollbackWindow |
| capacity | The initial capacity |
| growSize | The grow size, 0 means doubling the buffer |
| localActorNumber | The actor number of the client that recoded the replay. |
|
inline |
Construct an input provider with a given list of inputs.
| inputList | Input list |
|
inline |
Construct an input provider with a given player count, start frame, capacity and grow size.
| playerCount | Player count |
| startFrame | Start frame |
| capacity | The initial capacity |
| growSize | The grow size, 0 means doubling the buffer |
| localActorNumber | The actor number of the client that recoded the replay. |
|
inline |
Returns true if the input provider can simulate the given frame.
| frame | Requested frame |
Implements Photon.Deterministic.IDeterministicInputProvider.
|
inline |
Clear all recorded inputs. Usually called after a resync.
| startFrame | New start frame |
|
inline |
Import a list of inputs into the input provider.
| inputList | A reference to the imported list is internally copied. |
|
inline |
Export the inputs to a list.
| verifiedFrame | The max frame that in input available for |
|
inline |
This callback is called when an input was confirmed and can be recorded.
| game | The game |
| input | The confirmed input |
|
inline |
Injects a random input.
| input | Input to inject |
| localReplay | If set to true the input sent flag is set to true |
|
inline |
Unused.
Implements Photon.Deterministic.IDeterministicRpcProvider.
|
inline |
Reads a rpc from the input provider.
| frame | Frame |
| player | Player |
Implements Photon.Deterministic.IDeterministicRpcProvider.
|
inline |
Returns input for a given frame and player.
| frame | Requested frame |
| player | Requested player |
Implements Photon.Deterministic.IDeterministicInputProvider.
| virtual int Quantum.InputProvider.LocalActorNumber => _localActorNumber |
The actor number of the client that recoded the replay.