Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-03-07 13:57:09 +0000
committerStijn Buys <ingar@osirion.org>2009-03-07 13:57:09 +0000
commit4c53365c16362156529c7669079e31845384589f (patch)
tree193bb5d05299d2acb38311d108c1d39b6e1dd229 /src/core/entity.cc
parentee2200638be3fcb14097f3e8b0abb93e210f93d9 (diff)
renamed Entity::eventstate() to Entity::state(),
introduced Destroyed state
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index 649212b..c62a412 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -388,7 +388,7 @@ EntityDynamic::EntityDynamic(unsigned int flags) :
Entity(flags)
{
entity_speed = 0.0f;
- entity_eventstate = Normal;
+ entity_state = Normal;
entity_timer = 0;
}
@@ -396,7 +396,7 @@ EntityDynamic::EntityDynamic(std::istream & is) :
Entity(is)
{
entity_speed = 0.0f;
- entity_eventstate = Normal;
+ entity_state = Normal;
entity_timer = 0;
}
@@ -404,10 +404,10 @@ EntityDynamic::~EntityDynamic()
{
}
-void EntityDynamic::set_eventstate(Event eventstate)
+void EntityDynamic::set_state(int state)
{
- if (entity_eventstate != eventstate) {
- entity_eventstate = eventstate;
+ if (entity_state != state) {
+ entity_state = state;
entity_dirty = true;
}
}
@@ -429,9 +429,9 @@ void EntityDynamic::serialize_server_create(std::ostream & os) const
{
Entity::serialize_server_create(os);
os << roundf(entity_speed * 100.0f) << " "
- << entity_eventstate << " ";
+ << entity_state << " ";
- if (entity_eventstate != Normal) {
+ if (entity_state != Normal) {
os << entity_timer << " ";
}
}
@@ -441,9 +441,9 @@ void EntityDynamic::receive_server_create(std::istream &is)
Entity::receive_server_create(is);
is >> entity_speed;
entity_speed /= 100.0f;
- is >> entity_eventstate;
+ is >> entity_state;
- if (entity_eventstate != Normal) {
+ if (entity_state != Normal) {
is >> entity_timer;
} else {
entity_timer = 0;
@@ -467,9 +467,9 @@ void EntityDynamic::serialize_server_update(std::ostream & os) const
<< entity_axis.forward() << " "
<< entity_axis.left() << " "
<< roundf(entity_speed * 100.0f) << " "
- << entity_eventstate << " ";
+ << entity_state << " ";
- if (entity_eventstate != Normal) {
+ if (entity_state != Normal) {
os << entity_timer << " ";
}
}
@@ -488,9 +488,9 @@ void EntityDynamic::receive_server_update(std::istream &is)
entity_axis[2] = math::crossproduct(entity_axis.forward(), entity_axis.left());
is >> entity_speed;
entity_speed /= 100.0f;
- is >> entity_eventstate;
+ is >> entity_state;
- if (entity_eventstate != Normal) {
+ if (entity_state != Normal) {
is >> entity_timer;
} else {
entity_timer = 0;