* added script to support /me-like emotes (scriptname is "me")
* changed the permission system: now a script cant be used as game command f no permission is explicitly set
* implemented threadsafe CLI queue to solve crashes with short-intervalled events that ran on 2 threads
* fixed name return at "getitemprotovalue" script
* iplemented DrawObject class and a Mgr for those objects; they will ease object drawing once implemented. the Mgr works under control of the GUI thread and is threadsafe.
* implemented auto-loading of SCP files if a name-tag is present somewhere in the file ("#dbname=...") and no explicit db name was passed to "loadscp" script.
* changed internal ObjMgr storage to std::map (instead of list) for faster access
* fixed call of "_enterworld" script
* fixed handling of MyCharacter(), which could cause crashes after newly changes
* fixed GetFileList() func in tools.cpp (this fixes also related "lgetfiles" script func). now it will only parse files, not directories. might still need some fixing for linux.
28 lines
583 B
C++
28 lines
583 B
C++
#ifndef DRAWOBJMGR_H
|
|
#define DRAWOBJMGR_H
|
|
|
|
#include <utility>
|
|
|
|
class DrawObject;
|
|
|
|
typedef std::map<uint64,DrawObject*> DrawObjStorage;
|
|
|
|
class DrawObjMgr
|
|
{
|
|
public:
|
|
DrawObjMgr();
|
|
~DrawObjMgr();
|
|
void Add(uint64,DrawObject*);
|
|
void Delete(uint64);
|
|
void Update(void); // Threadsafe! delete code must be called from here!
|
|
uint32 StorageSize(void) { return _storage.size(); }
|
|
|
|
private:
|
|
DrawObjStorage _storage;
|
|
ZThread::LockedQueue<uint64,ZThread::FastMutex> _del;
|
|
ZThread::LockedQueue<std::pair<uint64,DrawObject*>,ZThread::FastMutex > _add;
|
|
|
|
};
|
|
|
|
#endif
|