[Orxonox-commit 5293] r9956 - code/trunk/src/modules/invader
landauf at orxonox.net
landauf at orxonox.net
Fri Jan 3 20:13:59 CET 2014
Author: landauf
Date: 2014-01-03 20:13:59 +0100 (Fri, 03 Jan 2014)
New Revision: 9956
Modified:
code/trunk/src/modules/invader/Invader.cc
Log:
fixed build with msvc (it seems to use c++98 which has 3 overloads of log10() but none for integrals)
Modified: code/trunk/src/modules/invader/Invader.cc
===================================================================
--- code/trunk/src/modules/invader/Invader.cc 2014-01-03 14:58:53 UTC (rev 9955)
+++ code/trunk/src/modules/invader/Invader.cc 2014-01-03 19:13:59 UTC (rev 9956)
@@ -83,7 +83,7 @@
{
level++;
if (getPlayer() != NULL)
- {
+ {
for (int i = 0; i < 7; i++)
{
WeakPtr<BigExplosion> chunk = new BigExplosion(this->center_->getContext());
@@ -113,7 +113,7 @@
if (getPlayer() == NULL)
return;
srand(player->getPosition().x + player->getPosition().y);
- for (int i = 0; i < (3*log10(level) + 1); i++)
+ for (int i = 0; i < (3*log10(static_cast<double>(level)) + 1); i++)
{
WeakPtr<InvaderEnemy> newPawn;
if (rand() % 42/(1 + level*level) == 0)
More information about the Orxonox-commit
mailing list