globox

Platform game for the terminal
git clone git://git.bitsmanent.org/globox
Log | Files | Refs | README | LICENSE

commit 9f9972497a9ec88ac48b76c861a0aaaa565cc9bd
parent c45a5f9104e5092a1a6029d3b6c1853c0e100ae5
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Wed, 20 Jun 2018 20:06:47 +0200

Fix a bug in checkgame() about the OF_AI flag.

Diffstat:
Mglobox.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/globox.c b/globox.c @@ -229,12 +229,13 @@ checkgame(void) { int np = 0; for(p = scene->blocks; p;) { - if(!ISSET(p->o->flags, OF_PLAYER) || ISSET(p->o->flags, OF_AI)) { + if(!ISSET(p->o->flags, OF_PLAYER)) { p = p->next; continue; } if(p->energy > 0) { - ++np; + if(!ISSET(p->o->flags, OF_AI)) + ++np; p = p->next; } else {