Go to the documentation of this file.
25 static int roll_ob(
object *
op,
int dir,
object *pusher);
58 int move_ob(
object *
op,
int dir,
object *originator) {
68 for (part =
op; part != NULL; part = part->
more) {
88 for (part =
op; part != NULL; part = part->
more) {
110 if (old_move_type == 0) {
118 op->move_type = old_move_type;
123 op->contr->socket->update_look = 1;
124 op->contr->socket->look_position = 0;
128 pl->contr->do_los = 1;
133 pl->contr->socket->update_look = 1;
134 pl->contr->socket->look_position = 0;
204 int teleport(
object *teleporter, uint8_t tele_type,
object *user) {
206 int i, j, k, nrofalt = 0;
207 object *other_teleporter;
219 for (i = -5; i < 6; i++)
220 for (j = -5; j < 6; j++) {
221 if (i == 0 && j == 0)
227 if (
tmp->type == tele_type) {
228 altern[nrofalt++] =
tmp;
239 other_teleporter = altern[
RANDOM()%nrofalt];
251 for (k = 1; k < 9; k++) {
261 LOG(
llevError,
"Shop mat %s (%d, %d) is in solid rock?\n", other_teleporter->
name, other_teleporter->
x, other_teleporter->
y);
280 return (user == NULL);
299 "You fail to push the %s.",
338 for (more =
op; more; more = more->
more) {
339 tx =
x+more->
x-
op->x;
340 ty =
y+more->
y-
op->y;
380 static int roll_ob(
object *
op,
int dir,
object *pusher) {
403 if ((
op->move_type&move_block) ==
op->move_type) {
446 if (
who->more == NULL
492 "You start to attack %s!",
501 "You avoid attacking %s.",
510 "You can't push %s.",
522 str1 = (
who->stats.Str > 0 ?
who->stats.Str :
who->level);
529 "%s tried to push you.",
545 "You pushed %s back.",
566 if (
op->x ==
x &&
op->y ==
y)
#define object_was_destroyed(op, old_tag)
#define GET_MAP_OB(M, X, Y)
object * object_get_owner(object *op)
#define MSG_TYPE_COMMAND_SUCCESS
void LOG(LogLevel logLevel, const char *format,...)
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy)
#define QUERY_FLAG(xyz, p)
static int roll_ob(object *op, int dir, object *pusher)
void monster_check_doors(object *op, mapstruct *m, int x, int y)
void object_set_enemy(object *op, object *enemy)
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
int move_object(object *op, int dir)
void monster_check_earthwalls(object *op, mapstruct *m, int x, int y)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
static const flag_definition flags[]
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
static event_registration m
void recursive_roll(object *op, int dir, object *pusher)
short freearr_y[SIZEOFFREE]
void query_name(const object *op, char *buf, size_t size)
static int try_fit(object *op, mapstruct *m, int x, int y)
int out_of_map(mapstruct *m, int x, int y)
int teleport(object *teleporter, uint8_t tele_type, object *user)
#define GET_MAP_MOVE_BLOCK(M, X, Y)
#define FLAG_UNAGGRESSIVE
int move_ob(object *op, int dir, object *originator)
int random_roll(int min, int max, const object *op, int goodbad)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
#define OB_MOVE_BLOCK(ob1, ob2)
#define MSG_TYPE_COMMAND_FAILURE
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
int move_to(object *op, int x, int y)
#define OUT_OF_REAL_MAP(M, X, Y)
void pets_attempt_follow(object *for_owner, int force)
#define MSG_TYPE_VICTIM_WAS_PUSHED
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define SOUND_TYPE_GROUND
void monster_npc_call_help(object *op)
void animate_object(object *op, int dir)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
#define CLEAR_FLAG(xyz, p)
int push_ob(object *who, int dir, object *pusher)
void map_newmap_cmd(socket_struct *ns)
void object_remove(object *op)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
int object_teleport(object *op, mapstruct *map, int x, int y)
#define WILL_APPLY_EARTHWALL
short freearr_x[SIZEOFFREE]
#define FOR_INV_PREPARE(op_, it_)
int monster_compute_path(object *source, object *target, int default_dir)
void player_update_bg_music(object *player)