… | |
… | |
33 | * state is a true/false flag that will actiavte objects that have FLAG_ACTIVATE_ON_PUSH/RELEASE set. |
33 | * state is a true/false flag that will actiavte objects that have FLAG_ACTIVATE_ON_PUSH/RELEASE set. |
34 | * The activator argument can be 0 or the source object for this activation. |
34 | * The activator argument can be 0 or the source object for this activation. |
35 | * the originator is the player or monster who did something. |
35 | * the originator is the player or monster who did something. |
36 | */ |
36 | */ |
37 | static void |
37 | static void |
38 | activate_connection_link (objectlink *ol, bool state, object *activator, object *originator) |
38 | activate_connection_link (objectlink *ol, int state, object *activator, object *originator) |
39 | { |
39 | { |
40 | for (; ol; ol = ol->next) |
40 | for (; ol; ol = ol->next) |
41 | { |
41 | { |
42 | if (!ol->ob) |
42 | if (!ol->ob) |
43 | { |
43 | { |
… | |
… | |
135 | case FIREWALL: |
135 | case FIREWALL: |
136 | if (!QUERY_FLAG (tmp, FLAG_ANIMATE) && tmp->type == FIREWALL) |
136 | if (!QUERY_FLAG (tmp, FLAG_ANIMATE) && tmp->type == FIREWALL) |
137 | move_firewall (tmp); |
137 | move_firewall (tmp); |
138 | else |
138 | else |
139 | { |
139 | { |
140 | if ((tmp->stats.sp += tmp->stats.maxsp) > 8) /* next direction */ |
140 | tmp->stats.sp = absdir (tmp->stats.sp + tmp->stats.maxsp); /* next direction */ |
141 | tmp->stats.sp = ((tmp->stats.sp - 1) % 8) + 1; |
|
|
142 | |
|
|
143 | animate_turning (tmp); |
141 | animate_turning (tmp); |
144 | } |
142 | } |
145 | break; |
143 | break; |
146 | |
144 | |
147 | case TELEPORTER: |
145 | case TELEPORTER: |
… | |
… | |
199 | * the connection was 'state' or 'released'. So that you can activate objects |
197 | * the connection was 'state' or 'released'. So that you can activate objects |
200 | * who have FLAG_ACTIVATE_ON_PUSH/RELEASE set properly. |
198 | * who have FLAG_ACTIVATE_ON_PUSH/RELEASE set properly. |
201 | * |
199 | * |
202 | */ |
200 | */ |
203 | void |
201 | void |
204 | maptile::trigger (shstr_tmp id, bool state, object *activator, object *originator) |
202 | maptile::trigger (shstr_tmp id, int state, object *activator, object *originator) |
205 | { |
203 | { |
206 | if (INVOKE_MAP (TRIGGER, this, ARG_STRING (&id), ARG_INT (state), ARG_OBJECT (originator))) |
204 | if (INVOKE_MAP (TRIGGER, this, ARG_STRING (&id), ARG_INT (state), ARG_OBJECT (originator))) |
207 | return; |
205 | return; |
208 | |
206 | |
209 | if (oblinkpt *obp = find_link (id)) |
207 | if (oblinkpt *obp = find_link (id)) |