named-fruit manipulation
Add some new routines for dealing with fruit. I had hoped they would let the existing fruit handling be simplified quite a bit, but the improvement wasn't great. However, they're also groundwork for fixing an old bug.
This commit is contained in:
10
src/bones.c
10
src/bones.c
@@ -45,14 +45,10 @@ STATIC_OVL void
|
||||
goodfruit(id)
|
||||
int id;
|
||||
{
|
||||
register struct fruit *f;
|
||||
struct fruit *f = fruit_from_indx(-id);
|
||||
|
||||
for (f = ffruit; f; f = f->nextf) {
|
||||
if (f->fid == -id) {
|
||||
f->fid = id;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (f)
|
||||
f->fid = id;
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
|
||||
Reference in New Issue
Block a user