… | |
… | |
2017 | } |
2017 | } |
2018 | |
2018 | |
2019 | bool |
2019 | bool |
2020 | move_player (object *op, int dir) |
2020 | move_player (object *op, int dir) |
2021 | { |
2021 | { |
2022 | if (!op->map || op->map->in_memory != MAP_ACTIVE) |
2022 | if (!op->map || op->map->state != MAP_ACTIVE) |
2023 | return 0; |
2023 | return 0; |
2024 | |
2024 | |
2025 | /* Sanity check: make sure dir is valid */ |
2025 | /* Sanity check: make sure dir is valid */ |
2026 | if (dir < 0 || dir > 8) |
2026 | if (dir < 0 || dir > 8) |
2027 | { |
2027 | { |
… | |
… | |
2183 | op->invisible = 1000; |
2183 | op->invisible = 1000; |
2184 | /* the socket code flashes the player visible/invisible |
2184 | /* the socket code flashes the player visible/invisible |
2185 | * depending on the value of invisible, so we need to |
2185 | * depending on the value of invisible, so we need to |
2186 | * alternate it here for it to work correctly. |
2186 | * alternate it here for it to work correctly. |
2187 | */ |
2187 | */ |
2188 | if (pticks & 2) |
2188 | if (server_tick & 2) |
2189 | op->invisible--; |
2189 | op->invisible--; |
2190 | } |
2190 | } |
2191 | else if (op->invisible && !(op->flag [FLAG_MAKE_INVIS])) |
2191 | else if (op->invisible && !(op->flag [FLAG_MAKE_INVIS])) |
2192 | { |
2192 | { |
2193 | if (!op->invisible--) |
2193 | if (!op->invisible--) |