summaryrefslogtreecommitdiff
path: root/gmod/prediction.hpp
blob: ca0fb938bbb24d1ca74add7e17c6c51ff5ce0847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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