Page 2 of 2

Re: FootPrintz

Posted: 28 May 2008, 20:01
by rcdraco
OTA did it, why can't spring. I don't understand the problem here, everyone is saying that this is a bad thing, when it needs to be added, it wastes space, since my tank is not as wide as it is long, assuming that it is, is a sloppy practice, I'll probably end up having to cut it down to 4x4 and have it trailing out of it's own box, which also looks sloppy, the boxes don't rotate, they should be circles on selection, when you have it not rotating, SURE it's smart, it reduces lag more then you'd think, since there is way less collision to be resolved, but since everyone here has a pc from 2000 or later, that shouldn't be a problem. This just sounds to me like unwillingness to fix a problem that mods have been facing for a long time, great example of what I'm talking about, play Nanoblobs, the Demon has a footprint wider then it is, so it hits things where only the selection box is at. It's sloppy to have it like this, so you'd think let's make the unit use a smaller footprint! well that will make it go through walls and hills, which nobody wants in a mod. Give me a link to the problem script at least someone will be trying to rip it apart.

Re: FootPrintz

Posted: 28 May 2008, 20:10
by smoth
paragraphs are awesome. and ota didn't really do it.

Re: FootPrintz

Posted: 28 May 2008, 20:31
by Argh
If you'd really like to work on this, the pathfinder code is here.

And, maybe read through some of this, it might help you.

Re: FootPrintz

Posted: 28 May 2008, 22:33
by smoth

Code: Select all

/**
Recreates the path found by pathfinder.
Starting at goalSquare and tracking backwards.
*/
void CPathFinder::FinishSearch(const MoveData& moveData, Path& foundPath) {
        //Backtracking the path.
	if(needPath)
                {
                int2 square;
                square.x = goalSquare % gs->mapx;
                square.y = goalSquare / gs->mapx;
                do {
                        int sqr = square.x + square.y * gs->mapx;
                        if(squareState[sqr].status & PATHOPT_START)
                                break;
                        float3 cs;
                                cs.x = (square.x/2/* + 0.5f*/) * SQUARE_SIZE*2+SQUARE_SIZE;
                                cs.z = (square.y/2/* + 0.5f*/) * SQUARE_SIZE*2+SQUARE_SIZE;
                        cs.y = moveData.moveMath->yLevel(square.x, square.y);
                        foundPath.path.push_back(cs);
                        int2 oldSquare;
                        oldSquare.x = square.x;
                        oldSquare.y = square.y;
                        square.x -= directionVector[squareState[sqr].status & PATHOPT_DIRECTION].x;
                        square.y -= directionVector[squareState[sqr].status & PATHOPT_DIRECTION].y;
                        } 
             while(true);
                if (foundPath.path.size() > 0)
                        {
                        foundPath.pathGoal = foundPath.path.front();
                        }
                }
        //Adds the cost of the path.
	foundPath.pathCost = squareState[goalSquare].cost;
}
ummm... wut:

Code: Select all

                while(true);

Re: FootPrintz

Posted: 28 May 2008, 22:36
by Gnomre

Code: Select all

do {

Re: FootPrintz

Posted: 28 May 2008, 22:47
by smoth
ha ha wow, I need sleep.

Re: FootPrintz

Posted: 28 May 2008, 22:49
by Pxtl
worst indenting


evar.

Re: FootPrintz

Posted: 28 May 2008, 22:50
by smoth
nah, I should have payed more attention to the brackets. That is what I get for reading code half awake.

Re: FootPrintz

Posted: 07 Jun 2008, 02:27
by zwzsg
rcdraco wrote:OTA did it.
False.