From 7ccb819f867493f8ec202ea3b39c94c198c64584 Mon Sep 17 00:00:00 2001 From: JustSomePwner Date: Thu, 30 Aug 2018 14:01:54 +0200 Subject: first --- gmod/prediction.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gmod/prediction.hpp (limited to 'gmod/prediction.hpp') diff --git a/gmod/prediction.hpp b/gmod/prediction.hpp new file mode 100644 index 0000000..ca0fb93 --- /dev/null +++ b/gmod/prediction.hpp @@ -0,0 +1,27 @@ +#pragma once +#include "util.hpp" + +class user_cmd_t; +class c_base_player; + +NAMESPACE_REGION( features ) + +class c_prediction { + user_cmd_t* m_ucmd{ }; + int m_predicted_flags{ }; + + void run( user_cmd_t* ucmd ); +public: + void operator()( user_cmd_t* ucmd ) { + m_ucmd = ucmd; + run( m_ucmd ); + } + + int get_predicted_flags( ) const { + return m_predicted_flags; + } + + void predict_player( c_base_player* player ); +}; + +END_REGION \ No newline at end of file -- cgit v1.2.3