version 1.17 | | version 1.18 |
---|
| | |
#define MOVE_WALK 0x1 /* Object walks */ | | #define MOVE_WALK 0x1 /* Object walks */ |
#define MOVE_FLY_LOW 0x2 /* Low flying object */ | | #define MOVE_FLY_LOW 0x2 /* Low flying object */ |
#define MOVE_FLY_HIGH 0x4 /* High flying object */ | | #define MOVE_FLY_HIGH 0x4 /* High flying object */ |
| | #define MOVE_FLYING 0x6 /* combo of fly_low and fly_high for easier checking */ |
#define MOVE_SWIM 0x8 /* Swimming object */ | | #define MOVE_SWIM 0x8 /* Swimming object */ |
| | #define MOVE_ALL 0xf; /* Mask of all movement types */ |
| | |
| | MOVE_ALL may change in the future - it is mask for all movement types - |
| | used for 'no_pass' - it sets move_block to MOVE_ALL, other places that |
| | check for all movement types may also use this value. |
| | |
The fields in the object themselves: | | The fields in the object themselves: |
| | |
| | |
at load time). It is basically how much slower (percentage wise) | | at load time). It is basically how much slower (percentage wise) |
the player moves through this terrain. A value of 0 is basically | | the player moves through this terrain. A value of 0 is basically |
a non operation. A value of 0.5 means it takes 50% longer to move | | a non operation. A value of 0.5 means it takes 50% longer to move |
through the space. | | through the space. The old values were all positive ints. Basically, |
| | it effectively was how many ticks the player is slowed down by. |
| | |
Certain terrain has skills which reduce the slow penalty (woodsmen | | Certain terrain has skills which reduce the slow penalty (woodsmen |
in forest for example). As of this writing, the penalty is reduced | | in forest for example). As of this writing, the penalty is reduced |
| | |
has appropriate skill, it would now only take that player 25% | | has appropriate skill, it would now only take that player 25% |
longer to move through the space. | | longer to move through the space. |
| | |
| | Note 2: The old slow_move is loaded and converted into move_slow_penalty. |
| | The old SLOW_PENALTY and SET_SLOW_PENALTY macros divided/multiplied |
| | the result by 1000, so were basically a non operation. Since it is now |
| | just stored as a float, conversion macros are not needed or used. |
| | |
move_state/move_status: This is unrelated to this movement code - it is | | move_state/move_status: This is unrelated to this movement code - it is |
used for monster attack_movement information. it is only noted here | | used for monster attack_movement information. it is only noted here |
since it starts with the move_ prefix. | | since it starts with the move_ prefix. |
| | |
thus things like 'The jungle slows you down' or 'The wall is in the way' | | thus things like 'The jungle slows you down' or 'The wall is in the way' |
will be printed. Various hints can be contained in the messages. | | will be printed. Various hints can be contained in the messages. |
| | |
| | move_status: Not related to this code - noted here since it has the move_ |
| | prefix. This is used to track monsters state of the attack_movement |
| | variable. It is worth noting that move_type was changed to |
| | attack_movement - this matches the name in the archetype, but is |
| | a name change in the object field. |
| | |
| | Obsoleted fields: |
| | This change of logic has resulted in the following fields no longer |
| | being used: |
| | FLAG_WALK_ON -> move_on |
| | FLAG_NO_PASS -> move_block |
| | FLAG_SLOW_MOVE -> move_slow |
| | FLAG_FLYING -> move_type |
| | FLAG_WALK_OFF -> move_off |
| | FLAG_FLY_ON -> move_on |
| | FLAG_FLY_OFF -> move_off |
| | FLAG_PASS_THRU -> was unused, would be move_type |
| | FLAG_CAN_PASS_THRU -> was unused, would be move_type |
| | |
| | |
Load/Save behaviour and backward compatability: | | Load/Save behaviour and backward compatability: |
The loader knows about certain old flags (walk_on, blocked, etc) and | | The loader knows about certain old flags (walk_on, blocked, etc) and |
sets up the appropriate bitmasks. When data is saved, it is saved | | sets up the appropriate bitmasks. When data is saved, it is saved |
| | |
if unset, and attacktype is nonzero, this becomes 2. By default, | | if unset, and attacktype is nonzero, this becomes 2. By default, |
it is zero. | | it is zero. |
| | |
maxhp: if nonzero, flying objects will be moved also (default 0) | | move_type: What movement types this mover moves (replaces maxhp to denote |
| | flying creatures) |
| | |
speed: how fast a chain of these will move a player along (default -0.2) | | speed: how fast a chain of these will move a player along (default -0.2) |
| | |