summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-26 09:05:19 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-26 09:05:19 +0100
commit3eb5752bde929c8629680f12db4e5cd5d0c32d71 (patch)
tree836a42d9f0f521c38b0c0ca7aa0b20f003ebebf8 /src
parent989af76dc2705ed371a5db3567c828fd309e5412 (diff)
downloadmanaserv-3eb5752bde929c8629680f12db4e5cd5d0c32d71.tar.gz
manaserv-3eb5752bde929c8629680f12db4e5cd5d0c32d71.tar.bz2
manaserv-3eb5752bde929c8629680f12db4e5cd5d0c32d71.tar.xz
manaserv-3eb5752bde929c8629680f12db4e5cd5d0c32d71.zip
Converted some DOS newlines to UNIX
Diffstat (limited to 'src')
-rw-r--r--src/game-server/being.cpp122
1 files changed, 61 insertions, 61 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp
index 73aafe6a..cec2c4e6 100644
--- a/src/game-server/being.cpp
+++ b/src/game-server/being.cpp
@@ -136,47 +136,47 @@ void Being::performAttack(Damage const &damage, AttackZone const *attackZone)
Point ppos = getPosition();
const int attackAngle = directionToAngle(getDirection());
- std::list<Being *> victims;
-
- LOG_DEBUG("Direction:"<<getDirection()<<
- " range:"<<attackZone->range<<
- " angle:"<<attackZone->angle);
-
- Point attPos, attSize, defPos, defSize;
- if (attackZone->shape == ATTZONESHAPE_RECT)
- {
- if (getDirection() == DIRECTION_UP)
- {
- attPos.x = ppos.x - attackZone->angle;
- attPos.y = ppos.y - attackZone->range;
- attSize.x = attackZone->angle * 2;
- attSize.y = attackZone->range;
- }
- if (getDirection() == DIRECTION_DOWN)
- {
- attPos.x = ppos.x - attackZone->angle;
- attPos.y = ppos.y;
- attSize.x = attackZone->angle * 2;
- attSize.y = attackZone->range;
- }
- if (getDirection() == DIRECTION_RIGHT)
- {
- attPos.x = ppos.x;
- attPos.y = ppos.y - attackZone->angle;
- attSize.x = attackZone->range;
- attSize.y = attackZone->angle * 2;
- }
- if (getDirection() == DIRECTION_LEFT)
- {
- attPos.x = ppos.x - attackZone->range;
- attPos.y = ppos.y - attackZone->angle;
- attSize.x = attackZone->range;
- attSize.y = attackZone->angle * 2;
- }
- /* debug effect to see when and where the server pictures the attack - should
- * be moved to the client side when the attack detection works statisfactory.
- */
- Effects::show(26, getMap(), Point(attPos.x + attSize.x / 2, attPos.y + attSize.y / 2));
+ std::list<Being *> victims;
+
+ LOG_DEBUG("Direction:"<<getDirection()<<
+ " range:"<<attackZone->range<<
+ " angle:"<<attackZone->angle);
+
+ Point attPos, attSize, defPos, defSize;
+ if (attackZone->shape == ATTZONESHAPE_RECT)
+ {
+ if (getDirection() == DIRECTION_UP)
+ {
+ attPos.x = ppos.x - attackZone->angle;
+ attPos.y = ppos.y - attackZone->range;
+ attSize.x = attackZone->angle * 2;
+ attSize.y = attackZone->range;
+ }
+ if (getDirection() == DIRECTION_DOWN)
+ {
+ attPos.x = ppos.x - attackZone->angle;
+ attPos.y = ppos.y;
+ attSize.x = attackZone->angle * 2;
+ attSize.y = attackZone->range;
+ }
+ if (getDirection() == DIRECTION_RIGHT)
+ {
+ attPos.x = ppos.x;
+ attPos.y = ppos.y - attackZone->angle;
+ attSize.x = attackZone->range;
+ attSize.y = attackZone->angle * 2;
+ }
+ if (getDirection() == DIRECTION_LEFT)
+ {
+ attPos.x = ppos.x - attackZone->range;
+ attPos.y = ppos.y - attackZone->angle;
+ attSize.x = attackZone->range;
+ attSize.y = attackZone->angle * 2;
+ }
+ /* debug effect to see when and where the server pictures the attack - should
+ * be moved to the client side when the attack detection works statisfactory.
+ */
+ Effects::show(26, getMap(), Point(attPos.x + attSize.x / 2, attPos.y + attSize.y / 2));
}
for (MovingObjectIterator
@@ -188,16 +188,16 @@ void Being::performAttack(Damage const &damage, AttackZone const *attackZone)
if (o == this) continue;
int type = o->getType();
- if (type != OBJECT_CHARACTER && type != OBJECT_MONSTER) continue;
-
- LOG_DEBUG("Attack Zone:"<<
- attPos.x<<":"<<attPos.y<<
- " "<<
- attSize.x<<"x"<<attSize.y);
- LOG_DEBUG("Defender Zone:"<<
- defPos.x<<":"<<defPos.y<<
- " "<<
- defSize.x<<"x"<<defSize.y);
+ if (type != OBJECT_CHARACTER && type != OBJECT_MONSTER) continue;
+
+ LOG_DEBUG("Attack Zone:"<<
+ attPos.x<<":"<<attPos.y<<
+ " "<<
+ attSize.x<<"x"<<attSize.y);
+ LOG_DEBUG("Defender Zone:"<<
+ defPos.x<<":"<<defPos.y<<
+ " "<<
+ defSize.x<<"x"<<defSize.y);
switch (attackZone->shape)
{
@@ -209,16 +209,16 @@ void Being::performAttack(Damage const &damage, AttackZone const *attackZone)
)
{
victims.push_back(static_cast< Being * >(o));
- }
- break;
- case ATTZONESHAPE_RECT:
- defPos.x = opos.x - o->getSize();
- defPos.y = opos.y - o->getSize();
- defSize.x = o->getSize() * 2;
- defSize.y = o->getSize() * 2;
- if (Collision::rectWithRect(attPos, attSize, defPos, defSize))
- {
- victims.push_back(static_cast< Being * >(o));
+ }
+ break;
+ case ATTZONESHAPE_RECT:
+ defPos.x = opos.x - o->getSize();
+ defPos.y = opos.y - o->getSize();
+ defSize.x = o->getSize() * 2;
+ defSize.y = o->getSize() * 2;
+ if (Collision::rectWithRect(attPos, attSize, defPos, defSize))
+ {
+ victims.push_back(static_cast< Being * >(o));
}
break;
default: