summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Components/MovementComponent.h
blob: 9103a4842c474fd53bfa897c041d3c7eba9875d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

class cMonster;
class cEntity;
class cChunk;

class cMovementComponent
{
protected:
	cMonster * m_Self;
public:
	cMovementComponent(cMonster * a_Entity);
	virtual ~cMovementComponent(){}
	
	virtual void Tick(float a_Dt, cChunk & a_Chunk){}
	
	/** Finds the first non-air block position (not the highest, as cWorld::GetHeight does)
		If current Y is nonsolid, goes down to try to find a solid block, then returns that + 1
		If current Y is solid, goes up to find first nonsolid block, and returns that */
	int FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ);
};