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

Comparing deliantra/server/server/c_new.C (file contents):
Revision 1.12 by pippijn, Mon Jan 15 21:06:19 2007 UTC vs.
Revision 1.13 by pippijn, Fri Mar 2 12:14:57 2007 UTC

73 cp++; 73 cp++;
74 } 74 }
75 75
76 if (!INVOKE_PLAYER (COMMAND, pl->contr, ARG_STRING (command), ARG_STRING (cp))) 76 if (!INVOKE_PLAYER (COMMAND, pl->contr, ARG_STRING (command), ARG_STRING (cp)))
77 { 77 {
78 csp = find_command_element (command, NewServerCommands, NewServerCommandSize); 78 csp = find_command_element (command, Commands, CommandsSize);
79 if (!csp) csp = find_command_element (command, Commands, CommandsSize);
80 if (!csp) csp = find_command_element (command, CommunicationCommands, CommunicationCommandSize); 79 if (!csp) csp = find_command_element (command, CommunicationCommands, CommunicationCommandSize);
81 if (!csp && QUERY_FLAG (pl, FLAG_WIZ)) 80 if (!csp && QUERY_FLAG (pl, FLAG_WIZ))
82 csp = find_command_element (command, WizCommands, WizCommandsSize); 81 csp = find_command_element (command, WizCommands, WizCommandsSize);
83 82
84 if (!csp) 83 if (!csp)
92 csp->func (pl, cp); 91 csp->func (pl, cp);
93 } 92 }
94} 93}
95 94
96int 95int
97command_run (object *op, char *params)
98{
99 int dir;
100
101 dir = params ? atoi (params) : 0;
102 if (dir < 0 || dir >= 9)
103 {
104 new_draw_info (NDI_UNIQUE, 0, op, "Can't run into a non adjacent square.");
105 return 0;
106 }
107
108 op->contr->run_on = 1;
109 return move_player (op, dir);
110}
111
112int
113command_run_stop (object *op, char *params)
114{
115 op->contr->run_on = 0;
116 return 1;
117}
118
119int
120command_fire (object *op, char *params)
121{
122 int dir;
123
124 dir = params ? atoi (params) : 0;
125 if (dir < 0 || dir >= 9)
126 {
127 new_draw_info (NDI_UNIQUE, 0, op, "Can't fire to a non adjacent square.");
128 return 0;
129 };
130 op->contr->fire_on = 1;
131 return move_player (op, dir);
132}
133
134int
135command_fire_stop (object *op, char *params)
136{
137 op->contr->fire_on = 0;
138 return 1;
139}
140
141int
142bad_command (object *op, char *params) 96bad_command (object *op, char *params)
143{ 97{
144 new_draw_info (NDI_UNIQUE, 0, op, "bind and unbind are no longer handled on the server"); 98 new_draw_info (NDI_UNIQUE, 0, op, "bind and unbind are no longer handled on the server");
145 return 1; 99 return 1;
146} 100}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines