- Timestamp:
- May 24, 2013, 2:07:50 AM (12 years ago)
- Branches:
- master
- Children:
- b07eeac
- Parents:
- 23559e7
- Location:
- common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Player.cpp
r23559e7 rb81cea1 99 99 double angle = atan2(target.y-pos.y, target.x-pos.x); 100 100 float dist = sqrt(pow(target.x-pos.x, 2) + pow(target.y-pos.y, 2)); 101 FLOAT_POSITION newPos;102 101 103 102 if (dist <= pixels) { 104 newPos.x = target.x;105 newPos.y = target.y;103 pos.x = target.x; 104 pos.y = target.y; 106 105 }else { 107 newPos.x = pos.x + cos(angle)*pixels;108 newPos.y = pos.y + sin(angle)*pixels;106 pos.x = pos.x + cos(angle)*pixels; 107 pos.y = pos.y + sin(angle)*pixels; 109 108 } 110 109 } -
common/WorldMap.cpp
r23559e7 rb81cea1 209 209 } 210 210 }else { 211 // load objects211 // load structure 212 212 213 213 int x, y, type;
Note:
See TracChangeset
for help on using the changeset viewer.