12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #ifndef PREDICTED_VALUE_H_
- #define PREDICTED_VALUE_H_
- #include "Game_local.h"
- template< class type_ >
- class idPredictedValue {
- public:
- explicit idPredictedValue();
- explicit idPredictedValue( const type_ & value_ );
- void Set( const type_ & newValue );
- idPredictedValue< type_ > & operator=( const type_ & value );
- idPredictedValue< type_ > & operator+=( const type_ & toAdd );
- idPredictedValue< type_ > & operator-=( const type_ & toSubtract );
- bool UpdateFromSnapshot( const type_ & valueFromSnapshot, int clientNumber );
- type_ Get() const { return value; }
- private:
-
- idPredictedValue( const idPredictedValue< type_ > & other );
- idPredictedValue< type_ > & operator=( const idPredictedValue< type_ > & other );
- type_ value;
- int clientPredictedMilliseconds;
- void UpdatePredictionTime();
- };
- #endif
|