mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
NKAI: object graph improved and optimized
This commit is contained in:
@ -71,6 +71,8 @@ public:
|
||||
|
||||
virtual void drawLine(int3 start, int3 end) override
|
||||
{
|
||||
const Point offset = Point(30, 30);
|
||||
|
||||
auto level = model->getLevel();
|
||||
|
||||
if(start.z != level || end.z != level)
|
||||
@ -83,6 +85,9 @@ public:
|
||||
pStart.x += 3;
|
||||
pEnd.x -= 3;
|
||||
|
||||
pStart += offset;
|
||||
pEnd += offset;
|
||||
|
||||
if(viewPort.isInside(pStart) && viewPort.isInside(pEnd))
|
||||
{
|
||||
target.drawLine(pStart, pEnd, ColorRGBA(255, 255, 0), ColorRGBA(255, 0, 0));
|
||||
|
Reference in New Issue
Block a user