Sound bug fix by Felix-The-Ghost

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7117 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
aerkefiende
2013-01-19 21:44:40 +00:00
parent 135c97e7d8
commit 58abfb3ace
3 changed files with 48 additions and 7 deletions
+11
View File
@@ -968,6 +968,17 @@ void parsemessages(int cn, playerent *d, ucharbuf &p, bool demo = false)
uint i = getint(p);
while((uint)ents.length()<=i) ents.add().type = NOTUSED;
int to = ents[i].type;
if(ents[i].type==SOUND)
{
entity &e = ents[i];
entityreference entref(&e);
location *loc = audiomgr.locations.find(e.attr1, &entref, mapsounds);
if(loc)
loc->drop();
}
ents[i].type = getint(p);
ents[i].x = getint(p);
ents[i].y = getint(p);