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

Comparing deliantra/server/socket/image.C (file contents):
Revision 1.74 by root, Sun Nov 11 18:21:21 2012 UTC vs.
Revision 1.79 by root, Sat Dec 1 20:22:13 2018 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 (©) 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 * Copyright (©) 2001 Mark Wedel 6 * Copyright (©) 2001 Mark Wedel
6 * Copyright (©) 1992 Frank Tore Johansen 7 * Copyright (©) 1992 Frank Tore Johansen
7 * 8 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 9 * 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 10 * the terms of the Affero GNU General Public License as published by the
77 ix.idx = idx; 78 ix.idx = idx;
78 ix.ofs = size; 79 ix.ofs = size;
79 ix.data = (uint8 *)data; 80 ix.data = (uint8 *)data;
80 ix.data_sv = SvREFCNT_inc (data_sv); 81 ix.data_sv = SvREFCNT_inc (data_sv);
81 82
82 auto (pos, ixface.end ()); 83 auto pos = ixface.end ();
83 84
84 // the by far most common case will be to insert 85 // the by far most common case will be to insert
85 // near the end, so little looping. 86 // near the end, so little looping.
86 while (pos != ixface.begin ()) 87 while (pos != ixface.begin ())
87 { 88 {
96 } 97 }
97 98
98 ixface.insert (pos, ix); 99 ixface.insert (pos, ix);
99 100
100#if 0 101#if 0
101 for (auto (i, ixface.begin ()); i != ixface.end (); ++i) 102 for (auto &&i : ixface)
102 fprintf (stderr, "<%d,%d> ", i->pri, i->ofs); 103 fprintf (stderr, "<%d,%d> ", i.pri, i.ofs);
103 fprintf (stderr, "\n"); 104 fprintf (stderr, "\n");
104#endif 105#endif
105} 106}
106 107
107void 108void
257} 258}
258 259
259void 260void
260client::invalidate_face (faceidx idx) 261client::invalidate_face (faceidx idx)
261{ 262{
263 if (!faces_sent [idx])
264 return;
265
262 faces_sent [idx] = false; 266 faces_sent [idx] = false;
263 force_newmap = true; 267 send_face (idx);
268 //TODO: check for active ix and abort it.
264} 269}
265 270
266void 271void
267client::invalidate_all_faces () 272client::invalidate_all_faces ()
268{ 273{
269 faces_sent.reset (); 274 for (faceidx i = 0; i < faces_sent.size (); ++i)
270 force_newmap = true; 275 invalidate_face (i);
271} 276}
272 277

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines