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,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2001 Mark Wedel |
5 | * Copyright (©) 2001 Mark Wedel |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
257 | } |
257 | } |
258 | |
258 | |
259 | void |
259 | void |
260 | client::invalidate_face (faceidx idx) |
260 | client::invalidate_face (faceidx idx) |
261 | { |
261 | { |
|
|
262 | if (!faces_sent [idx]) |
|
|
263 | return; |
|
|
264 | |
262 | faces_sent [idx] = false; |
265 | faces_sent [idx] = false; |
263 | force_newmap = true; |
266 | send_face (idx); |
|
|
267 | //TODO: check for active ix and abort it. |
264 | } |
268 | } |
265 | |
269 | |
266 | void |
270 | void |
267 | client::invalidate_all_faces () |
271 | client::invalidate_all_faces () |
268 | { |
272 | { |
269 | faces_sent.reset (); |
273 | for (faceidx i = 0; i < faces_sent.size (); ++i) |
270 | force_newmap = true; |
274 | invalidate_face (i); |
271 | } |
275 | } |
272 | |
276 | |