FootPrintz - Page 2

FootPrintz

Requests for features in the spring code.

Moderator: Moderators

User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

Re: FootPrintz

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FootPrintz

Post by smoth »

paragraphs are awesome. and ota didn't really do it.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: FootPrintz

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FootPrintz

Post 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);
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: FootPrintz

Post by Gnomre »

Code: Select all

do {
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FootPrintz

Post by smoth »

ha ha wow, I need sleep.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: FootPrintz

Post by Pxtl »

worst indenting


evar.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FootPrintz

Post by smoth »

nah, I should have payed more attention to the brackets. That is what I get for reading code half awake.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: FootPrintz

Post by zwzsg »

rcdraco wrote:OTA did it.
False.
Post Reply

Return to “Feature Requests”