Code style (game + scripts only):
"if(" --> "if ("
--HG--
branch : trunk
This commit is contained in:
@@ -36,7 +36,7 @@ DestinationHolder<TRAVELLER>::_findOffSetPoint(float x1, float y1, float x2, flo
|
||||
* hence x = x2 - (offset/d)*(x2-x1)
|
||||
* like wise offset/d = (y2-y)/(y2-y1);
|
||||
*/
|
||||
if( offset == 0 )
|
||||
if ( offset == 0 )
|
||||
{
|
||||
x = x2;
|
||||
y = y2;
|
||||
@@ -46,7 +46,7 @@ DestinationHolder<TRAVELLER>::_findOffSetPoint(float x1, float y1, float x2, flo
|
||||
double x_diff = double(x2 - x1);
|
||||
double y_diff = double(y2 - y1);
|
||||
double distance_d = (double)((x_diff*x_diff) + (y_diff * y_diff));
|
||||
if(distance_d == 0)
|
||||
if (distance_d == 0)
|
||||
{
|
||||
x = x2;
|
||||
y = y2;
|
||||
@@ -78,7 +78,7 @@ template<typename TRAVELLER>
|
||||
uint32
|
||||
DestinationHolder<TRAVELLER>::StartTravel(TRAVELLER &traveller, bool sendMove)
|
||||
{
|
||||
if(!i_destSet) return 0;
|
||||
if (!i_destSet) return 0;
|
||||
|
||||
i_fromX = traveller.GetPositionX();
|
||||
i_fromY = traveller.GetPositionY();
|
||||
@@ -86,7 +86,7 @@ DestinationHolder<TRAVELLER>::StartTravel(TRAVELLER &traveller, bool sendMove)
|
||||
|
||||
i_totalTravelTime = traveller.GetTotalTrevelTimeTo(i_destX,i_destY,i_destZ);
|
||||
i_timeElapsed = 0;
|
||||
if(sendMove)
|
||||
if (sendMove)
|
||||
traveller.MoveTo(i_destX, i_destY, i_destZ, i_totalTravelTime);
|
||||
return i_totalTravelTime;
|
||||
}
|
||||
@@ -99,12 +99,12 @@ DestinationHolder<TRAVELLER>::UpdateTraveller(TRAVELLER &traveller, uint32 diff,
|
||||
|
||||
// Update every TRAVELLER_UPDATE_INTERVAL
|
||||
i_tracker.Update(diff);
|
||||
if(!i_tracker.Passed())
|
||||
if (!i_tracker.Passed())
|
||||
return false;
|
||||
else
|
||||
ResetUpdate();
|
||||
|
||||
if(!i_destSet) return true;
|
||||
if (!i_destSet) return true;
|
||||
|
||||
float x, y, z;
|
||||
if (!micro_movement)
|
||||
@@ -172,7 +172,7 @@ DestinationHolder<TRAVELLER>::GetLocationNow(const Map * map, float &x, float &y
|
||||
const float groundDist = sqrt(distanceX*distanceX + distanceY*distanceY);
|
||||
const float zDist = fabs(i_fromZ - z) + 0.000001f;
|
||||
const float slope = groundDist / zDist;
|
||||
if(slope < 1.0f) // This prevents the ground returned by GetHeight to be used when in cave
|
||||
if (slope < 1.0f) // This prevents the ground returned by GetHeight to be used when in cave
|
||||
z = z2; // a climb or jump of more than 45 is denied
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@ template<typename TRAVELLER>
|
||||
void
|
||||
DestinationHolder<TRAVELLER>::GetLocationNowNoMicroMovement(float &x, float &y, float &z) const
|
||||
{
|
||||
if( HasArrived() )
|
||||
if ( HasArrived() )
|
||||
{
|
||||
x = i_destX;
|
||||
y = i_destY;
|
||||
|
||||
Reference in New Issue
Block a user