aboutsummaryrefslogtreecommitdiff
path: root/src/parsec_server/include/e_simnetinput.h
blob: 889bcf8e391f523b56b7abce4cf29e91acb342a4 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef E_SIMNETINPUT_H_
#define E_SIMNETINPUT_H_

// forward decls --------------------------------------------------------------
//
class E_REList;
//struct RE_Header;
//struct ShipRemInfo;


// class for handling the network input from the simulation -------------------
//
class E_SimNetInput {
protected:
	E_REList*	m_pInputREList;

protected:
	// default ctor/dtor
	E_SimNetInput();
	~E_SimNetInput();

public:
	// SINGLETON access
	static E_SimNetInput* GetSimNetInput()
	{
		static E_SimNetInput _TheSimNetInput;
		return &_TheSimNetInput;
	}

	// reset all data
	void Reset();

	// get the input remote event list
	//E_REList* GetInputREList() { return m_pInputREList; }

	// walk the input RE queue and apply events/states to simulation
	void ProcessInputREList();

	// handle the network input from a client
	int HandleOneClient( int nClientID, RE_Header* relist );

protected:
	// check absolute movement bounds
	int _CheckAbsoluteMovementBounds( RE_PlayerAndShipStatus* pPAS );
};

#endif // !E_SIMNETINPUT_H_