Crossfire Server, Branch 1.12
R12190
|
Those flags are all possible movement types. More...
Defines | |
#define | MOVE_ALL 0x1f |
Mask of all movement types. | |
#define | MOVE_BLOCK_DEFAULT MOVE_SWIM |
The normal assumption is that objects are walking/flying. | |
#define | MOVE_BOAT 0x10 |
Boats/sailing. | |
#define | MOVE_FLY_HIGH 0x4 |
High flying object. | |
#define | MOVE_FLY_LOW 0x2 |
Low flying object. | |
#define | MOVE_FLYING 0x6 |
Combo of fly_low and fly_high. | |
#define | MOVE_SWIM 0x8 |
Swimming object. | |
#define | MOVE_WALK 0x1 |
Object walks. | |
#define | OB_MOVE_BLOCK(ob1, ob2) ((ob1->move_type&ob2->move_block) == ob1->move_type) |
Basic macro to see if ob2 blocks ob1 from moving onto this space. | |
#define | OB_TYPE_MOVE_BLOCK(ob1, type) ((type != 0) && (ob1->move_type&type) == ob1->move_type) |
Basic macro to see if if ob1 can not move onto a space based on the 'type' move_block parameter Add check - if type is 0, don't stop anything from moving onto it. | |
Typedefs | |
typedef unsigned char | MoveType |
Typdef here to define type large enough to hold bitmask of all movement types. |
Those flags are all possible movement types.
If you add new movement types, you may need to update describe_item() so properly describe those types. change_abil() probably should be updated also.
#define MOVE_ALL 0x1f |
Mask of all movement types.
Definition at line 656 of file define.h.
Referenced by apply_container(), find_dir(), free_object2(), gate_type_process(), initConstants(), is_blocking(), is_special_equipment(), make_map_walls(), ob_blocked(), path_to_player(), place_exits(), retrofit_joined_wall(), and unblock_exits().
#define MOVE_BLOCK_DEFAULT MOVE_SWIM |
The normal assumption is that objects are walking/flying.
So often we don't want to block movement, but still don't want to allow all types (swimming is rather specialized) - I also expect as more movement types show up, this is likely to get updated. Basically, this is the default for spaces that allow movement - anything but swimming right now. If you really want nothing at all, then can always set move_block to 0
Definition at line 667 of file define.h.
Referenced by put_decor(), surround_flag3(), unblock_exits(), and wall_blocked().
#define MOVE_BOAT 0x10 |
#define MOVE_FLY_HIGH 0x4 |
High flying object.
Definition at line 652 of file define.h.
Referenced by change_abil(), describe_item(), fix_object(), initConstants(), and insert_ob_in_map().
#define MOVE_FLY_LOW 0x2 |
Low flying object.
Definition at line 651 of file define.h.
Referenced by attempt_jump(), cast_cause_disease(), cast_cone(), cast_polymorph(), change_abil(), check_move_on(), describe_item(), do_throw(), fire_bow(), fix_object(), get_pointed_target(), initConstants(), insert_ob_in_map(), monster_use_bow(), and pick_arrow_target().
#define MOVE_FLYING 0x6 |
Combo of fly_low and fly_high.
Definition at line 653 of file define.h.
Referenced by check_pick(), check_spell_knockback(), deep_swamp_type_move_on(), deep_swamp_type_process(), initConstants(), is_aimed_missile(), pick_up_object(), player_apply(), and update_position().
#define MOVE_SWIM 0x8 |
Swimming object.
Definition at line 654 of file define.h.
Referenced by change_abil(), describe_item(), and initConstants().
#define MOVE_WALK 0x1 |
Object walks.
Definition at line 650 of file define.h.
Referenced by alchemy(), check_move_on(), create_bomb(), do_throw(), fire_bow(), fix_object(), initConstants(), move_hole(), and retrofit_joined_wall().
#define OB_MOVE_BLOCK | ( | ob1, | |
ob2 | |||
) | ((ob1->move_type&ob2->move_block) == ob1->move_type) |
Basic macro to see if ob2 blocks ob1 from moving onto this space.
Basically, ob2 has to block all of ob1 movement types.
Definition at line 681 of file define.h.
Referenced by blocked_link(), roll_ob(), and try_fit().
#define OB_TYPE_MOVE_BLOCK | ( | ob1, | |
type | |||
) | ((type != 0) && (ob1->move_type&type) == ob1->move_type) |
Basic macro to see if if ob1 can not move onto a space based on the 'type' move_block parameter Add check - if type is 0, don't stop anything from moving onto it.
Definition at line 690 of file define.h.
Referenced by attempt_jump(), blocked_link(), cast_create_obj(), cast_light(), check_bullet(), common_process_projectile(), dimension_door(), fire_arch_from_position(), fire_bolt(), fire_bullet(), forklightning(), move_aura(), move_ball_spell(), move_bolt(), move_bullet(), move_missile(), ob_blocked(), ok_to_put_more(), path_to_player(), pet_move(), skill_attack(), stand_near_hostile(), steal(), and teleport().