Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9859


Ignore:
Timestamp:
Dec 2, 2013, 4:28:22 PM (11 years ago)
Author:
zifloria
Message:

fail

Location:
code/branches/invaders
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/invaders/data/levels/includes/invaderWeapon.oxi

    r9858 r9859  
    1414        </links>
    1515        <Weapon>
    16           <InvaderWeapon mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
    17           <!--InvaderWeapon mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" projectileMesh="LaserBeam.mesh" /-->
     16          <InvaderWeapon mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="cokebottle.mesh" />
     17          <!--InvaderWeapon mode=0 munitionpershot=0 delay=0   
     18
     19          LaserBeam2
     20
     21            damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" projectileMesh="LaserBeam.mesh" /-->
    1822        </Weapon>
    1923        <Weapon>
    20           <InvaderWeapon mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
     24          <InvaderWeapon mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="cokebottle.mesh" />
    2125          <!--InvaderWeapon mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" projectileMesh="LaserBeam.mesh" /-->
    2226        </Weapon>
  • code/branches/invaders/src/modules/invader/InvaderEnemy.cc

    r9858 r9859  
    5656        if (player != NULL)
    5757        {
    58             float newZ = player->getPosition().z - getPosition().z;
    59             if (newZ < 0)
    60                 newZ = (-100 < newZ)?-100:newZ;
    61             else
    62                 newZ = (100 > newZ)?100:newZ;
     58            float newZ = abs(getPosition().x - player->getPosition().x) * (player->getPosition().z - getPosition().z);
     59            // if (newZ < 0)
     60            //     newZ = (-100 < newZ)?-100:newZ;
     61            // else
     62            //     newZ = (100 > newZ)?100:newZ;
    6363            setVelocity(Vector3(1000 - level * 100 , 0, newZ));
    6464        }
Note: See TracChangeset for help on using the changeset viewer.