- 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:
parent
76a0086744
commit
8d3e67ac88
4 changed files with 107 additions and 22 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue