--- deliantra/server/common/image.C 2012/01/03 11:23:41 1.38 +++ deliantra/server/common/image.C 2012/01/03 11:59:14 1.40 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * * Deliantra is free software: you can redistribute it and/or modify it under * the terms of the Affero GNU General Public License as published by the @@ -31,16 +31,16 @@ facehash_t facehash; std::vector faces; -static std::vector faces_free; +static std::vector faces_freelist; faceidx face_alloc () { faceidx idx; - if (faces_freelist.empty ()) + if (!faces_freelist.empty ()) { - idx = faces_free.back (); - faces_free.pop_back (); + idx = faces_freelist.back (); + faces_freelist.pop_back (); } else { @@ -55,6 +55,7 @@ return idx; } +void faceinfo::unref () { if (--refcnt)