2
Copyright (C) 2006 Parallel Realities
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
as published by the Free Software Foundation; either version 2
7
of the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
See the GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
class Entity : public Linkable {
25
unsigned int uniqueId;
27
// can't be called directly
28
virtual void loadAdditional(Properties *p) = 0;
29
virtual void saveAdditional(Properties *p) = 0;
39
float health, maxHealth;
46
Animation *currentAnim;
58
bool inCollisionCandidateList;
59
BoundingBox boundingBox;
62
EntityDef *definition;
66
String ownerName; // temporary storage
68
// what the entity is standing on
77
float heightAboveGround;
83
String q3RadiantTargetName;
84
String q3RadiantTarget;
86
SDL_Rect occupiedRect;
90
Vector grapplingRopeVelocity;
91
Vector grapplingRopePosition;
93
void setOwner(Entity *owner);
99
void (*touch)(Entity *other);
100
void (*draw)(bool transparent, bool reflected);
104
const unsigned int getUniqueId();
105
void setName(const char *name);
107
char *getEntityTypeName();
109
float getHealthPercent();
111
bool performNextAction(float td);
113
void applyGravity(float td);
115
void prepareToMove(float td);
118
void updateBoundingBox();
120
void load(Properties *props);