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
/
field_of_view.c
diff --git
a/src/server/field_of_view.c
b/src/server/field_of_view.c
index 170d8acb1c83bd310cc01141d3392dd67a5373a9..6ccd16f431c5e1fc59f2d099977c38ee6ce771f0 100644
(file)
--- a/
src/server/field_of_view.c
+++ b/
src/server/field_of_view.c
@@
-267,7
+267,7
@@
static uint8_t shade_hex(uint32_t left_angle, uint32_t right_angle,
uint16_t pos_in_map, uint8_t * fov_map)
{
struct shadow_angle * shadow_i;
uint16_t pos_in_map, uint8_t * fov_map)
{
struct shadow_angle * shadow_i;
- if (fov_map[pos_in_map]
&
VISIBLE)
+ if (fov_map[pos_in_map]
==
VISIBLE)
{
for (shadow_i = *shadows; shadow_i; shadow_i = shadow_i->next)
{
{
for (shadow_i = *shadows; shadow_i; shadow_i = shadow_i->next)
{
@@
-373,7
+373,7
@@
static void update_map_memory(struct Thing * t, uint32_t map_size)
uint32_t i;
for (i = 0; i < map_size; i++)
{
uint32_t i;
for (i = 0; i < map_size; i++)
{
- if (' ' == t->mem_map[i] && t->fov_map[i]
&
VISIBLE)
+ if (' ' == t->mem_map[i] && t->fov_map[i]
==
VISIBLE)
{
t->mem_map[i] = world.map.cells[i];
}
{
t->mem_map[i] = world.map.cells[i];
}