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 (©) 2017,2018 Marc Alexander Lehmann / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * |
6 | * |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
7 | * 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 |
8 | * 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 |
9 | * Free Software Foundation, either version 3 of the License, or (at your |
9 | * option) any later version. |
10 | * option) any later version. |
… | |
… | |
138 | /* Do this so we don't send a face command for the client for |
139 | /* Do this so we don't send a face command for the client for |
139 | * this face. Face 0 is sent to the client to set meta data |
140 | * this face. Face 0 is sent to the client to set meta data |
140 | * for following faces in fx. |
141 | * for following faces in fx. |
141 | */ |
142 | */ |
142 | faces_sent[0] = true; |
143 | faces_sent[0] = true; |
143 | fx_want [FT_FACE] = true; // all clients must support image faces |
144 | fx_want [FT_IMAGE] = true; // all clients must support image faces |
144 | |
145 | |
145 | socket_ev.set (fd, EV_READ); |
146 | socket_ev.set (fd, EV_READ); |
146 | socket_ev.prio (2); // one higher than the ticker priority |
147 | socket_ev.prio (2); // one higher than the ticker priority |
147 | socket_ev.start (); |
148 | socket_ev.start (); |
148 | |
149 | |
… | |
… | |
204 | /* we need to clear these to -1 and not zero - otherwise, |
205 | /* we need to clear these to -1 and not zero - otherwise, |
205 | * if a player quits and starts a new character, we wont |
206 | * if a player quits and starts a new character, we wont |
206 | * send new values to the client, as things like exp start |
207 | * send new values to the client, as things like exp start |
207 | * at zero. |
208 | * at zero. |
208 | */ |
209 | */ |
209 | for (int i = 0; i < array_length (last_skill_exp); i++) |
210 | for (int i = 0; i < ecb_array_length (last_skill_exp); i++) |
210 | last_skill_exp[i] = -1; |
211 | last_skill_exp[i] = -1; |
211 | |
212 | |
212 | for (int i = 0; i < array_length (last_resist); i++) |
213 | for (int i = 0; i < ecb_array_length (last_resist); i++) |
213 | last_resist[i] = -1; |
214 | last_resist[i] = -1; |
214 | |
215 | |
215 | last_weapon_sp = -1; |
216 | last_weapon_sp = -1; |
216 | last_level = -1; |
217 | last_level = -1; |
217 | last_stats.exp = -1; |
218 | last_stats.exp = -1; |