Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // left = 90 | right = -90
- {
- Unit* unit;
- float dist;
- int deg;
- float o = unit->GetOrientation() + (deg*M_PI/180);
- o = Position::NormalizeOrientation(o);
- float x = unit->GetPositionX()+(dist*cosf(o));
- float y = unit->GetPositionY()+(dist*sinf(o));
- float z = unit->GetMap()->GetHeight(unit->GetPhaseMask(), x, y, MAX_HEIGHT);
- if(z == INVALID_HEIGHT)
- z = unit->GetPositionZ();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement