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

Comparing deliantra/server/socket/init.C (file contents):
Revision 1.66 by root, Thu Apr 8 19:31:22 2010 UTC vs.
Revision 1.71 by root, Tue Jan 3 11:25:37 2012 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * 5 *
6 * Deliantra is free software: you can redistribute it and/or modify it under 6 * Deliantra is free software: you can redistribute it and/or modify it under
7 * the terms of the Affero GNU General Public License as published by the 7 * the terms of the Affero GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your 8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version. 9 * option) any later version.
128 128
129 if (fcntl (fd, F_SETFL, O_NONBLOCK) == -1) 129 if (fcntl (fd, F_SETFL, O_NONBLOCK) == -1)
130 LOG (llevError, "InitConnection: Error on fcntl.\n"); 130 LOG (llevError, "InitConnection: Error on fcntl.\n");
131 131
132 state = ST_SETUP; 132 state = ST_SETUP;
133 mapmode = Map1aCmd;
134 mapx = 11; 133 mapx = 11;
135 mapy = 11; 134 mapy = 11;
136 itemcmd = 1; /* Default is version item1 command */ 135 itemcmd = 1; /* Default is version item1 command */
137 max_rate = 200000 / (1000000 / MAX_TIME); // ~2mbit is assumed per default 136 max_rate = 100000 / (1000000 / MAX_TIME); // ~1mbit is assumed per default
138 137
139 /* Do this so we don't send a face command for the client for 138 /* Do this so we don't send a face command for the client for
140 * this face. Face 0 is sent to the client to say clear 139 * this face. Face 0 is sent to the client to say clear
141 * face information. 140 * face information.
142 */ 141 */
197 /* we need to clear these to -1 and not zero - otherwise, 196 /* we need to clear these to -1 and not zero - otherwise,
198 * if a player quits and starts a new character, we wont 197 * if a player quits and starts a new character, we wont
199 * send new values to the client, as things like exp start 198 * send new values to the client, as things like exp start
200 * at zero. 199 * at zero.
201 */ 200 */
202 for (int i = 0; i < NUM_SKILLS; i++) 201 for (int i = 0; i < array_length (last_skill_exp); i++)
203 last_skill_exp[i] = -1; 202 last_skill_exp[i] = -1;
204 203
205 for (int i = 0; i < NROFATTACKS; i++) 204 for (int i = 0; i < array_length (last_resist); i++)
206 last_resist[i] = -1; 205 last_resist[i] = -1;
207 206
208 last_weapon_sp = -1; 207 last_weapon_sp = -1;
209 last_level = -1; 208 last_level = -1;
210 last_stats.exp = -1; 209 last_stats.exp = -1;
211 last_flags = 0; 210 last_flags = 0;
212 last_weight = -1; 211 last_weight = -1;
213 last_weight_limit = 0; 212 last_weight_limit = 0;
214 last_path_attuned = 0; 213 last_path_attuned = 0;
215 last_path_repelled = 0; 214 last_path_repelled = 0;
216 last_path_denied = 0; 215 last_path_denied = 0;
217 last_speed = 0; 216 last_speed = 0;
218 last_flags = 0; 217 last_flags = 0;
219 218
220 static living zero_living; 219 static living zero_living;
221 last_stats = zero_living; 220 last_stats = zero_living;
222} 221}
223 222

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines