ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/button.C
(Generate patch)

Comparing deliantra/server/common/button.C (file contents):
Revision 1.52 by root, Thu Jan 8 04:35:03 2009 UTC vs.
Revision 1.53 by root, Thu Jan 8 19:23:43 2009 UTC

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 */
37static void 37static void
38activate_connection_link (objectlink *ol, bool state, object *activator, object *originator) 38activate_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 */
203void 201void
204maptile::trigger (shstr_tmp id, bool state, object *activator, object *originator) 202maptile::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))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines