[Orxonox-commit 2391] r7106 - code/branches/presentation3/src/orxonox/controllers
landauf at orxonox.net
landauf at orxonox.net
Thu Jun 3 02:29:41 CEST 2010
Author: landauf
Date: 2010-06-03 02:29:41 +0200 (Thu, 03 Jun 2010)
New Revision: 7106
Modified:
code/branches/presentation3/src/orxonox/controllers/ArtificialController.cc
Log:
fixed a crash: if the player dies, the AI shouldn't follow him anymore
Modified: code/branches/presentation3/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/presentation3/src/orxonox/controllers/ArtificialController.cc 2010-06-03 00:24:14 UTC (rev 7105)
+++ code/branches/presentation3/src/orxonox/controllers/ArtificialController.cc 2010-06-03 00:29:41 UTC (rev 7106)
@@ -682,7 +682,10 @@
*/
void ArtificialController::follow()
{
- this->moveToPosition(this->target_->getPosition());
+ if (this->target_)
+ this->moveToPosition(this->target_->getPosition());
+ else
+ this->specificMasterActionHoldCount_ = 0;
/*
if (!this->getControllableEntity())
return;
More information about the Orxonox-commit
mailing list