mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
* server sends confirmation (given later to player interface) after applying request (will be needed for AI)
* created new package for injuring multiple units - needed for area spells (not tested) * proper screen updating on garrison change * spell effects will be removed when they time out * Corpse (Skeleton) will be accessible from all directions * new objects supported: - Corpse - Lean To - Wagon - Warrior's Tomb * several minor improvements
This commit is contained in:
@@ -124,10 +124,16 @@ void CClient::run()
|
||||
CPack *pack;
|
||||
while(1)
|
||||
{
|
||||
tlog5 << "Listening... ";
|
||||
*serv >> pack;
|
||||
tlog5 << "\treceived server message of type " << typeid(*pack).name() << std::endl;
|
||||
CBaseForCLApply *apply = applier->apps[typeList.getTypeID(pack)];
|
||||
|
||||
//get the package from the server
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(*serv->rmx);
|
||||
tlog5 << "Listening... ";
|
||||
*serv >> pack;
|
||||
tlog5 << "\treceived server message of type " << typeid(*pack).name() << std::endl;
|
||||
}
|
||||
|
||||
CBaseForCLApply *apply = applier->apps[typeList.getTypeID(pack)]; //find the applier
|
||||
if(apply)
|
||||
{
|
||||
apply->applyOnClBefore(this,pack);
|
||||
@@ -139,7 +145,7 @@ void CClient::run()
|
||||
}
|
||||
else
|
||||
{
|
||||
tlog5 << "Message cannot be applied, cannot find applier!\n";
|
||||
tlog1 << "Message cannot be applied, cannot find applier!\n";
|
||||
}
|
||||
delete pack;
|
||||
pack = NULL;
|
||||
|
||||
Reference in New Issue
Block a user