Changeset ff2133a in network-game for common/Projectile.cpp


Ignore:
Timestamp:
Jun 11, 2013, 1:24:09 AM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
5b1e31e
Parents:
11d21ee
Message:

Move player chasing behavior to the Player class so the same behavior can be run client-side

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Projectile.cpp

    r11d21ee rff2133a  
    7272
    7373bool Projectile::move(map<unsigned int, Player>& mapPlayers) {
     74   // if the current target logs off, this method will run into problems
     75
     76   //cout << "Inside projectile move" << endl;
     77
    7478   unsigned long long curTime = getCurrentMillis();
    7579   Player targetP = mapPlayers[target];
     
    8589   float dist = sqrt(pow(targetP.pos.x-pos.x, 2) + pow(targetP.pos.y-pos.y, 2));
    8690
     91   //cout << "About to finish projectile move" << endl;
     92
    8793   if (dist <= pixels) {
    8894      pos.x = targetP.pos.x;
Note: See TracChangeset for help on using the changeset viewer.