entproperty now works in MP coop, but buffered

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6359 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
sireus
2011-04-26 13:22:35 +00:00
parent ad9826cac8
commit 4de620f757
4 changed files with 22 additions and 0 deletions
+15
View File
@@ -614,3 +614,18 @@ void entstats(void)
COMMAND(entstats, ARG_NONE);
vector<int> changedents;
int lastentsync = 0;
void syncentchanges(bool force)
{
if(lastmillis - lastentsync < 1000 && !force) return;
loopv(changedents) if(ents.inrange(changedents[i]))
{
entity &e = ents[changedents[i]];
addmsg(SV_EDITENT, "ri9", changedents[i], e.type, e.x, e.y, e.z, e.attr1, e.attr2, e.attr3, e.attr4);
}
changedents.setsize(0);
lastentsync = lastmillis;
}