summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2011-04-19 13:23:51 +0200
committermanuel <manuel@mausz.at>2011-04-19 13:23:51 +0200
commita2a5cf8181121091c7a67bdfa14e076d2026a1a5 (patch)
treea258c999b34ee07b12320003c3d2fa131a2abed7
parent85b09864f6d489e8c998e9f172d25079d572c602 (diff)
downloadfoop-a2a5cf8181121091c7a67bdfa14e076d2026a1a5.tar.gz
foop-a2a5cf8181121091c7a67bdfa14e076d2026a1a5.tar.bz2
foop-a2a5cf8181121091c7a67bdfa14e076d2026a1a5.zip
remove old crap
-rw-r--r--pacman-c++/server.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/pacman-c++/server.cpp b/pacman-c++/server.cpp
index 4219a43..07e4c72 100644
--- a/pacman-c++/server.cpp
+++ b/pacman-c++/server.cpp
@@ -354,10 +354,6 @@ void Server::sendUpdate(Transmission::map_t map, bool firstPacket)
354 354
355void Server::botCalculate(Actor *actor) 355void Server::botCalculate(Actor *actor)
356{ 356{
357 /* move as long as possible in one direction */
358 //if (m_actorMovements[actor->color()] != Actor::None)
359 // return;
360
361 QPoint actorpos = CoordToMapPosition(actor->pos().toPoint()); 357 QPoint actorpos = CoordToMapPosition(actor->pos().toPoint());
362 358
363 /* first make list of possible directions based on current actor position */ 359 /* first make list of possible directions based on current actor position */
@@ -396,7 +392,7 @@ void Server::botCalculate(Actor *actor)
396 if (directions.empty()) 392 if (directions.empty())
397 return; 393 return;
398 394
399 /* determine if other actors are in range to afraid/hunt*/ 395 /* determine if other actors are in range to be afraid/to hunt */
400 int mindistance = Constants::AI::player_minimum_distance; 396 int mindistance = Constants::AI::player_minimum_distance;
401 QList<QPoint> pos_afraid; 397 QList<QPoint> pos_afraid;
402 QList<QPoint> pos_hunt; 398 QList<QPoint> pos_hunt;
@@ -439,7 +435,6 @@ void Server::botCalculate(Actor *actor)
439 foreach(QPoint otherpos, pos_hunt) 435 foreach(QPoint otherpos, pos_hunt)
440 { 436 {
441 int olddistance = (actorpos - otherpos).manhattanLength(); 437 int olddistance = (actorpos - otherpos).manhattanLength();
442
443 int newdistance = (newpos - otherpos).manhattanLength(); 438 int newdistance = (newpos - otherpos).manhattanLength();
444 if (newdistance <= olddistance) 439 if (newdistance <= olddistance)
445 i.setValue(i.value() += Constants::AI::weight_hunt); 440 i.setValue(i.value() += Constants::AI::weight_hunt);