Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 3, 2014, 9:20:39 PM (11 years ago)
Author:
landauf
Message:

fixed warnings (msvc)

Location:
code/trunk/src/modules/invader
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/invader/Invader.cc

    r9959 r9961  
    8888            {
    8989                WeakPtr<BigExplosion> chunk = new BigExplosion(this->center_->getContext());
    90                 chunk->setPosition(Vector3(600, 0, 100 * i - 300));
     90                chunk->setPosition(Vector3(600, 0, 100.f * i - 300));
    9191                chunk->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
    9292                chunk->setScale(20);
     
    130130            newPawn->level = level;
    131131            // spawn enemy at random points in front of player.
    132             newPawn->setPosition(player->getPosition() + Vector3(500 + 100 * i, 0, float(rand())/RAND_MAX * 400 - 200));
     132            newPawn->setPosition(player->getPosition() + Vector3(500.f + 100 * i, 0, float(rand())/RAND_MAX * 400 - 200));
    133133        }
    134134    }
  • code/trunk/src/modules/invader/InvaderEnemy.cc

    r9943 r9961  
    5656        if (player != NULL)
    5757        {
    58             float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01, 2) + 1) * (player->getPosition().z - getPosition().z);
    59             setVelocity(Vector3(1000 - level * 100 , 0, newZ));
     58            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
     59            setVelocity(Vector3(1000.f - level * 100 , 0, newZ));
    6060        }
    6161        SUPER(InvaderEnemy, tick, dt);
  • code/trunk/src/modules/invader/InvaderEnemyShooter.cc

    r9943 r9961  
    6060            float distPlayer = player->getPosition().z - getPosition().z;
    6161            // orxout() << "i'm different!" << endl;
    62             float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01, 2) + 1) * distPlayer;
     62            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * distPlayer;
    6363            setVelocity(Vector3(950 - abs(distPlayer), 0, newZ));
    6464        }
  • code/trunk/src/modules/invader/InvaderHUDinfo.cc

    r9943 r9961  
    117117                this->setCaption(Multiplier);
    118118                this->setColour(ColourValue(1, 0, 0, clamp(float(mult * 0.1), 0.0f, 1.0f)));
    119                 this->setTextSize(clamp(float(mult * 0.1), 0.0f, 1.0f) * 0.01 + 0.04);
     119                this->setTextSize(clamp(float(mult * 0.1), 0.0f, 1.0f) * 0.01f + 0.04f);
    120120            }
    121121        }
  • code/trunk/src/modules/invader/InvaderWeapon.cc

    r9943 r9961  
    7373        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    7474        // only shoot in foreward direction
    75         projectile->setOrientation(Quaternion(sqrt(0.5),0,sqrt(0.5),0));
     75        projectile->setOrientation(Quaternion(sqrt(0.5f),0,sqrt(0.5f),0));
    7676        projectile->setPosition(this->getMuzzlePosition());
    7777        // only shoot in foreward direction
Note: See TracChangeset for help on using the changeset viewer.