Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PIXEL_POSITION pos;
- long x = ch->GetX();
- long y = ch->GetY();
- long new_x = pinfo->lX;
- long new_y = pinfo->lY;
- float fx, fy;
- GetDeltaByDegree(ch->GetRotation(), 500.0f, &fx, &fy);
- LPSECTREE tree = SECTREE_MANAGER::instance().Get(ch->GetMapIndex(), (long)x, (long)y);
- LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(ch->GetMapIndex(), (long)(new_x+fx), (long)(new_y+fy));
- if (tree && tree->IsAttr((long)x, (long)y, ATTR_BLOCK) && new_tree && new_tree->IsAttr((long)(new_x+fx), (long)(ch->GetY()+fy), ATTR_BLOCK))
- {
- ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ());
- ch->Stop();
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement