Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2017, 2:15:02 PM (7 years ago)
Author:
varxth
Message:

komplet

Location:
code/branches/SOBv2_HS17/src/modules/superorxobros
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc

    r11556 r11567  
    267267        //If player hits space and collides against an object under him then jump
    268268        if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 0 && collDisZ_ <+ 10)) {
    269         //if (inputAllowed && firePressed_ && isColliding_ ) {
    270 
    271269            gravityAcceleration_ = 100.0;
    272270            velocity.z = 110;
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc

    r11556 r11567  
    1 /*
     1    /*
    22 *   ORXONOX - the hottest 3D action shooter ever to exist
    33 *                    > www.orxonox.net <
     
    5757        figure_ = nullptr;
    5858        this->enableCollisionCallback();
    59         gravityAcceleration_ = 3.0;
     59        gravityAcceleration_ = 5.0;
    6060        speed_ = 0;
    6161        hasCollided_=false;
     
    104104            changeAllowed_ = false;
    105105            Vector3 velocity = getVelocity();
     106            orxout() << "before:    velocity in z = " << velocity.z << endl;
    106107            velocity.z = -velocity.z;
     108            orxout() << "after:     velocity in z = " << velocity.z << endl;
     109
    107110            setVelocity(velocity);
    108111        }
     
    111114        else if(changeAllowed_ && (abs(collDisX_)>abs(collDisZ_)))
    112115        {
     116            orxout() << "collision with the vertical side of a block " << endl;
     117
    113118            changeAllowed_ = false;
    114119            goesRight_=!goesRight_;
     
    134139            changedOn_+= dt;
    135140            // After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions!
    136             if (changedOn_> 0.200) {
     141            if (changedOn_> 0.100) {
    137142                changeAllowed_ = true;
    138143                changedOn_ = 0.0;
    139144
    140145            }
     146       
    141147        }
     148            int dir = 1;
     149            if (!goesRight_)
     150                dir = -1;
     151
     152            Vector3 velocity = getVelocity();
     153            velocity.z -= gravityAcceleration_*dt;
     154            velocity.x = dir*speed_;
     155            setVelocity(velocity);
     156
     157            lastPos_ = getPosition();
    142158       
    143 
    144         int dir = 1;
    145         if (!goesRight_)
    146             dir = -1;
    147 
    148         Vector3 velocity = getVelocity();
    149         velocity.z -= gravityAcceleration_*dt;
    150         velocity.x = dir*speed_;
    151         setVelocity(velocity);
    152 
    153         lastPos_ = getPosition();
    154159    }
     160   
    155161
    156162
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBGumba.cc

    r11416 r11567  
    106106            }
    107107        }
    108        
     108   
    109109
    110110        int dir = 1;
     
    118118
    119119        lastPos_ = getPosition();
     120
    120121    }
    121 
    122 
    123122}
Note: See TracChangeset for help on using the changeset viewer.