home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Server: Replace unnecessary bitwise operations with simple == tests.
[plomrogue]
/
src
/
server
/
io.c
diff --git
a/src/server/io.c
b/src/server/io.c
index a89f1212c78f33200163a8bd1af7fb2a0339838a..b5a6871a2ad28e8500042ce034fd52d3b2408b80 100644
(file)
--- a/
src/server/io.c
+++ b/
src/server/io.c
@@
-1,6
+1,6
@@
/* src/server/io.c */
/* src/server/io.c */
-#define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
/* snrpintf() */
#include "io.h"
#include <errno.h> /* global errno */
#include <limits.h> /* PIPE_BUF */
#include "io.h"
#include <errno.h> /* global errno */
#include <limits.h> /* PIPE_BUF */
@@
-309,7
+309,7
@@
static char * build_visible_map(struct Thing * player)
uint32_t pos_i;
for (pos_i = 0; pos_i < map_size; pos_i++)
{
uint32_t pos_i;
for (pos_i = 0; pos_i < map_size; pos_i++)
{
- if (player->fov_map[pos_i]
&
VISIBLE)
+ if (player->fov_map[pos_i]
==
VISIBLE)
{
visible_map[pos_i] = world.map.cells[pos_i];
}
{
visible_map[pos_i] = world.map.cells[pos_i];
}
@@
-323,7
+323,7
@@
static char * build_visible_map(struct Thing * player)
for (t = world.things; t != 0; t = t->next)
{
if ( ( player->fov_map[t->pos.y * world.map.length +t->pos.x]
for (t = world.things; t != 0; t = t->next)
{
if ( ( player->fov_map[t->pos.y * world.map.length +t->pos.x]
-
&
VISIBLE)
+
==
VISIBLE)
&& ( (0 == i && 0 == t->lifepoints)
|| (1 == i && 0 < t->lifepoints)))
{
&& ( (0 == i && 0 == t->lifepoints)
|| (1 == i && 0 < t->lifepoints)))
{