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.3 by elmex, Tue Aug 29 17:29:27 2006 UTC vs.
Revision 1.4 by elmex, Wed Aug 30 12:42:56 2006 UTC

1/* 1/*
2 * static char *rcsid_button_c = 2 * static char *rcsid_button_c =
3 * "$Id: button.C,v 1.3 2006/08/29 17:29:27 elmex Exp $"; 3 * "$Id: button.C,v 1.4 2006/08/30 12:42:56 elmex Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
174 */ 174 */
175void push_button (object *op) 175void push_button (object *op)
176{ 176{
177 oblinkpt *obp = get_button_links (op); 177 oblinkpt *obp = get_button_links (op);
178 178
179 if (!obp)
180 return;
181
179 if (INVOKE_MAP (TRIGGER, op->map, ARG_INT64(obp->value), ARG_INT(op->value))) 182 if (INVOKE_MAP (TRIGGER, op->map, ARG_INT64(obp->value), ARG_INT(op->value)))
180 return; 183 return;
181 184
182 if (obp && obp->link)
183 activate_connection_link (obp->link, op->value, op); 185 activate_connection_link (obp->link, op->value, op);
184} 186}
185 187
186/* 188/*
187 * elmex: 189 * elmex:
188 * This activates a connection, similar to push_button (object *op) but it takes 190 * This activates a connection, similar to push_button (object *op) but it takes
195{ 197{
196 if (INVOKE_MAP (TRIGGER, map, ARG_INT64(connection), ARG_INT(state))) 198 if (INVOKE_MAP (TRIGGER, map, ARG_INT64(connection), ARG_INT(state)))
197 return; 199 return;
198 200
199 oblinkpt *obp = get_connection_links (map, connection); 201 oblinkpt *obp = get_connection_links (map, connection);
200 if (obp && obp->link) 202 if (obp)
201 activate_connection_link (obp->link, state); 203 activate_connection_link (obp->link, state);
202} 204}
203 205
204/* 206/*
205 * Updates everything connected with the button op. 207 * Updates everything connected with the button op.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines