 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
50 int max, sound_was_played;
57 for (ab = trap->
above, tot = 0; ab != NULL; ab = ab->
above)
61 if (!(trap->
value = (tot > trap->
weight) ? 1 : 0)) {
69 for (ab = trap->
above, max = 100, sound_was_played = 0; --max && ab; ab = ab_next) {
76 if (!sound_was_played) {
81 "You fall into a trapdoor!");
#define UP_OBJ_FACE
Only thing that changed was the face.
void register_move_on(int ob_type, move_on_func method)
Registers the move_on method for the given type.
#define SET_ANIMATION(ob, newanim)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
Plays a sound on a map.
object * above
Pointer to the object stacked above this one.
int32_t carrying
How much weight this object contains.
void object_update(object *op, int action)
object_update() updates the array which represents the map.
static uint32_t NROF(const object *const ob)
Returns ob->nrof, unless it is 0, in which case return 1.
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
MoveType move_type
Type of movement this object uses.
int32_t value
How much money it is worth (or contains)
#define MSG_TYPE_APPLY_TRAP
Have activated a trap.
MoveType move_on
Move types affected moving on to this space.
int32_t weight
Attributes of the object.
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
Move an object (even linked objects) to another spot on the same map.
char method_ret
Define some standard return values for callbacks which don't need to return any other results.
#define NDI_UNIQUE
Print immediately, don't buffer.
static method_ret trapdoor_type_move_on(object *trap, object *victim, object *originator)
Move on this Trapdoor object.
#define SOUND_TYPE_GROUND
void init_type_trapdoor(void)
Initializer for the TRAPDOOR object type.
#define MSG_TYPE_APPLY
Applying objects.
void common_post_ob_move_on(object *trap, object *victim, object *originator)