blob: c645d9f856c475e82e1406b6bd4b54a10c562c37 (
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
49
50
51
52
53
|
#pragma once
using namespace std;
#include "WaterAnimal.h"
class Player;
class Squid : public WaterAnimal
{
public:
eINSTANCEOF GetType() { return eTYPE_SQUID; }
static Entity *create(Level *level) { return new Squid(level); }
void _init();
float xBodyRot, xBodyRotO;
float zBodyRot, zBodyRotO;
float tentacleMovement, oldTentacleMovement;
float tentacleAngle, oldTentacleAngle;
private:
float speed;
float tentacleSpeed;
float rotateSpeed;
float tx, ty, tz;
public:
Squid(Level *level);
protected:
virtual void registerAttributes();
virtual int getAmbientSound();
virtual int getHurtSound();
virtual int getDeathSound();
virtual float getSoundVolume();
virtual int getDeathLoot();
virtual bool makeStepSound();
virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
public:
virtual bool isInWater();
virtual void aiStep();
virtual void travel(float xa, float ya);
protected:
virtual void serverAiStep();
public:
virtual bool canSpawn();
};
|