Skip to content
Gluk-v48 edited this page Jun 10, 2013 · 5 revisions

ParaDrop in Water. In ParaDrop, I was missing a one opportunity. Landing on water. This is because the code is hosted on line 184 in file ParaDrop.cpp.

                // find the nearest cell the paradrop troopers can land on
                 if(pTarget != MapClass::InvalidCell()) {
                         if(pTarget->Tile_Is_Water()) {
                                 int a2 = 0;
                                 int a14 = 0;
                                 CellStruct *nearest = MapClass::Instance->Pathfinding_Find(&a2, pCoords, 0, -1, 0, 0, 1, 1, 0, 0, 0, 1, &a14, 0, 0);
                                 if(*nearest != SuperClass::DefaultCoords) {
                                         if(CellClass *pTemp = MapClass::Instance->GetCellAt(nearest)) {
                                                 if(pTemp != MapClass::InvalidCell()) {
                                                         if(!pTemp->Tile_Is_Water()) {
                                                                 pTarget = pTemp;
                                                         }
                                                 }
                                         }
                                 }
                         }
                 }

I would like to add an option that would have missed the performance of this part of the code. For example: %s.Water=(bool).

Example INI coding:

Type=ParaDrop
ParaDrop.Count=2

ParaDrop.Plane2.Types= GHOST
ParaDrop.Plane2.Num=5
ParaDrop.Plane2.Water=yes

ParaDrop.Plane3.Types=GGI
ParaDrop.Plane3.Num=6

It will turn out that the first plane brings 5 GHOST (including water), the second 6 GGI (only on the ground).

It is also useful for Parabombs.

Clone this wiki locally