[Orxonox-commit 6267] r10924 - code/branches/campaignHS15/src/orxonox/controllers
gania at orxonox.net
gania at orxonox.net
Mon Dec 7 09:04:38 CET 2015
Author: gania
Date: 2015-12-07 09:04:38 +0100 (Mon, 07 Dec 2015)
New Revision: 10924
Modified:
code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc
Log:
checking in
Modified: code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc
===================================================================
--- code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc 2015-12-07 07:34:20 UTC (rev 10923)
+++ code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc 2015-12-07 08:04:38 UTC (rev 10924)
@@ -172,11 +172,24 @@
this->timeDodged_ += dt;
}
maneuverCounter_ += dt;
-
+ if (!this || !this->getControllableEntity())
+ return;
//maneuver every 0.25 sec ->
- int step = 5;
- if (this->hasTarget() && ActionpointController::sTicks_ % 100 == step * (this->actionpointControllerId_) + 3)
+ int step = 4;
+ if (this->hasTarget() && ActionpointController::sTicks_ % 100 == step * (this->actionpointControllerId_))
{
+
+ }
+ if (ActionpointController::sTicks_ % 100 == step * this->actionpointControllerId_ + 1)
+ {
+ this->action();
+ }
+ if (!this || !this->getControllableEntity())
+ return;
+
+
+ if (this->hasTarget() && ActionpointController::sTicks_ % ActionpointController::nextActionpointControllerId_ == (this->actionpointControllerId_))
+ {
if (maneuverCounter_ > 6.0f)
maneuverCounter_ = 0;
if (this->bStartedDodging_ && this->timeDodged_ > 4.0f)
@@ -184,21 +197,12 @@
this->bStartedDodging_ = false;
this->timeDodged_ = 0;
}
+ if (!this || !this->getControllableEntity())
+ return;
this->maneuver();
- }
- if (ActionpointController::sTicks_ % 100 == step * this->actionpointControllerId_ + 1)
- {
- this->action();
- }
- if (!this || !this->getControllableEntity())
+ if (!this || !this->getControllableEntity())
return;
-
- if (!this || !this->getControllableEntity())
- return;
- if (this->hasTarget() && ActionpointController::sTicks_ % 100 == step * (this->actionpointControllerId_))
- {
this->bShooting_ = this->canFire();
-
}
if (!this || !this->getControllableEntity())
return;
More information about the Orxonox-commit
mailing list