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;
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)
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
void object_remove(object *op)
void object_set_enemy(object *op, object *enemy)
#define MSG_TYPE_COMMAND_SUCCESS
int push_ob(object *who, int dir, object *pusher)
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
#define QUERY_FLAG(xyz, p)
int move_to(object *op, int x, int y)
int out_of_map(mapstruct *m, int x, int y)
void monster_check_doors(object *op, mapstruct *m, int x, int y)
void monster_check_earthwalls(object *op, mapstruct *m, int x, int y)
int blocked_link(object *ob, mapstruct *m, int16_t sx, int16_t sy)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
static const flag_definition flags[]
int teleport(object *teleporter, uint8_t tele_type, object *user)
short freearr_x[SIZEOFFREE]
short freearr_y[SIZEOFFREE]
void animate_object(object *op, int dir)
static event_registration m
void query_name(const object *op, char *buf, size_t size)
int move_ob(object *op, int dir, object *originator)
#define GET_MAP_MOVE_BLOCK(M, X, Y)
#define FLAG_UNAGGRESSIVE
void recursive_roll(object *op, int dir, object *pusher)
#define OB_MOVE_BLOCK(ob1, ob2)
int random_roll(int min, int max, const object *op, int goodbad)
#define MSG_TYPE_COMMAND_FAILURE
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
#define OUT_OF_REAL_MAP(M, X, Y)
void pets_attempt_follow(object *for_owner, int force)
#define MSG_TYPE_VICTIM_WAS_PUSHED
#define SOUND_TYPE_GROUND
void LOG(LogLevel logLevel, const char *format,...)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
void monster_npc_call_help(object *op)
static int roll_ob(object *op, int dir, object *pusher)
#define CLEAR_FLAG(xyz, p)
void map_newmap_cmd(socket_struct *ns)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
int object_teleport(object *op, mapstruct *map, int x, int y)
#define WILL_APPLY_EARTHWALL
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
static int try_fit(object *op, mapstruct *m, int x, int y)
#define FOR_INV_PREPARE(op_, it_)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
int monster_compute_path(object *source, object *target, int default_dir)
void player_update_bg_music(object *player)
object * object_get_owner(object *op)
int move_object(object *op, int dir)