- Added Gez's submission for custom bridge things.

- Fixed: ASpecialSpot must check the array's size before dividing by it.


SVN r1103 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-02 16:17:19 +00:00
commit 8d3e67ac88
4 changed files with 107 additions and 22 deletions

View file

@ -146,6 +146,7 @@ struct FSpotList
ASpecialSpot *GetSpotWithMinDistance(fixed_t x, fixed_t y, fixed_t distance)
{
if (Spots.Size() == 0) return NULL;
int i = pr_spot() % Spots.Size();
int initial = i;
@ -166,7 +167,7 @@ struct FSpotList
ASpecialSpot *GetRandomSpot(bool onlyfirst)
{
if (!numcalls)
if (Spots.Size() && !numcalls)
{
int i = pr_spot() % Spots.Size();
numcalls++;