@ -62,15 +62,15 @@ void Cell::updateLocal(bool forceUpdate)
if ( cellController - > hasLocalAuthority ( actor - > cell ) )
if ( cellController - > hasLocalAuthority ( actor - > cell ) )
{
{
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Moving LocalActor %s to our authority in %s " ,
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Moving LocalActor %s to our authority in %s " ,
mapIndex . c_str ( ) , actor - > cell . get Description( ) . c_str ( ) ) ;
mapIndex . c_str ( ) , actor - > cell . get Short Description( ) . c_str ( ) ) ;
Cell * newCell = cellController - > getCell ( actor - > cell ) ;
Cell * newCell = cellController - > getCell ( actor - > cell ) ;
newCell - > localActors [ mapIndex ] = actor ;
newCell - > localActors [ mapIndex ] = actor ;
cellController - > setLocalActorRecord ( mapIndex , newCell - > get Description( ) ) ;
cellController - > setLocalActorRecord ( mapIndex , newCell - > get Short Description( ) ) ;
}
}
else
else
{
{
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Deleting LocalActor %s which is no longer under our authority " ,
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Deleting LocalActor %s which is no longer under our authority " ,
mapIndex . c_str ( ) , get Description( ) . c_str ( ) ) ;
mapIndex . c_str ( ) , get Short Description( ) . c_str ( ) ) ;
cellController - > removeLocalActorRecord ( mapIndex ) ;
cellController - > removeLocalActorRecord ( mapIndex ) ;
delete actor ;
delete actor ;
}
}
@ -227,7 +227,7 @@ void Cell::readDeath(ActorList& actorList)
Main : : get ( ) . getCellController ( ) - > setQueuedDeathState ( actor - > getPtr ( ) , baseActor . deathState ) ;
Main : : get ( ) . getCellController ( ) - > setQueuedDeathState ( actor - > getPtr ( ) , baseActor . deathState ) ;
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_INFO , " Received ID_ACTOR_DEATH about %s %i-%i in cell %s \n - deathState: %d \n -isInstantDeath: %s " ,
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_INFO , " Received ID_ACTOR_DEATH about %s %i-%i in cell %s \n - deathState: %d \n -isInstantDeath: %s " ,
actor - > refId . c_str ( ) , actor - > refNum , actor - > mpNum , get Description( ) . c_str ( ) ,
actor - > refId . c_str ( ) , actor - > refNum , actor - > mpNum , get Short Description( ) . c_str ( ) ,
baseActor . deathState , baseActor . isInstantDeath ? " true " : " false " ) ;
baseActor . deathState , baseActor . isInstantDeath ? " true " : " false " ) ;
if ( baseActor . isInstantDeath )
if ( baseActor . isInstantDeath )
@ -401,10 +401,10 @@ void Cell::readCellChange(ActorList& actorList)
std : : string mapIndex = Main : : get ( ) . getCellController ( ) - > generateMapIndex ( baseActor ) ;
std : : string mapIndex = Main : : get ( ) . getCellController ( ) - > generateMapIndex ( baseActor ) ;
// Is a packet mistakenly moving the actor to the cell it's already in? If so, ignore it
// Is a packet mistakenly moving the actor to the cell it's already in? If so, ignore it
if ( Misc : : StringUtils : : ciEqual ( get Description( ) , baseActor . cell . ge tDescription( ) ) )
if ( Misc : : StringUtils : : ciEqual ( get Short Description( ) , baseActor . cell . ge tShor tDescription( ) ) )
{
{
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_WARN , " Server says DedicatedActor %s moved to %s, but it was already there " ,
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_WARN , " Server says DedicatedActor %s moved to %s, but it was already there " ,
mapIndex . c_str ( ) , get Description( ) . c_str ( ) ) ;
mapIndex . c_str ( ) , get Short Description( ) . c_str ( ) ) ;
continue ;
continue ;
}
}
@ -416,7 +416,7 @@ void Cell::readCellChange(ActorList& actorList)
dedicatedActor - > direction = baseActor . direction ;
dedicatedActor - > direction = baseActor . direction ;
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_VERBOSE , " Server says DedicatedActor %s moved to %s " ,
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_VERBOSE , " Server says DedicatedActor %s moved to %s " ,
mapIndex . c_str ( ) , dedicatedActor - > cell . get Description( ) . c_str ( ) ) ;
mapIndex . c_str ( ) , dedicatedActor - > cell . get Short Description( ) . c_str ( ) ) ;
MWWorld : : CellStore * newStore = cellController - > getCellStore ( dedicatedActor - > cell ) ;
MWWorld : : CellStore * newStore = cellController - > getCellStore ( dedicatedActor - > cell ) ;
dedicatedActor - > setCell ( newStore ) ;
dedicatedActor - > setCell ( newStore ) ;
@ -425,18 +425,18 @@ void Cell::readCellChange(ActorList& actorList)
if ( cellController - > isActiveWorldCell ( dedicatedActor - > cell ) & & ! cellController - > hasLocalAuthority ( dedicatedActor - > cell ) )
if ( cellController - > isActiveWorldCell ( dedicatedActor - > cell ) & & ! cellController - > hasLocalAuthority ( dedicatedActor - > cell ) )
{
{
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Moving DedicatedActor %s to our active cell %s " ,
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Moving DedicatedActor %s to our active cell %s " ,
mapIndex . c_str ( ) , dedicatedActor - > cell . get Description( ) . c_str ( ) ) ;
mapIndex . c_str ( ) , dedicatedActor - > cell . get Short Description( ) . c_str ( ) ) ;
cellController - > initializeCell ( dedicatedActor - > cell ) ;
cellController - > initializeCell ( dedicatedActor - > cell ) ;
Cell * newCell = cellController - > getCell ( dedicatedActor - > cell ) ;
Cell * newCell = cellController - > getCell ( dedicatedActor - > cell ) ;
newCell - > dedicatedActors [ mapIndex ] = dedicatedActor ;
newCell - > dedicatedActors [ mapIndex ] = dedicatedActor ;
cellController - > setDedicatedActorRecord ( mapIndex , newCell - > get Description( ) ) ;
cellController - > setDedicatedActorRecord ( mapIndex , newCell - > get Short Description( ) ) ;
}
}
else
else
{
{
if ( cellController - > hasLocalAuthority ( dedicatedActor - > cell ) )
if ( cellController - > hasLocalAuthority ( dedicatedActor - > cell ) )
{
{
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Creating new LocalActor based on %s in %s " ,
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Creating new LocalActor based on %s in %s " ,
mapIndex . c_str ( ) , dedicatedActor - > cell . get Description( ) . c_str ( ) ) ;
mapIndex . c_str ( ) , dedicatedActor - > cell . get Short Description( ) . c_str ( ) ) ;
Cell * newCell = cellController - > getCell ( dedicatedActor - > cell ) ;
Cell * newCell = cellController - > getCell ( dedicatedActor - > cell ) ;
LocalActor * localActor = new LocalActor ( ) ;
LocalActor * localActor = new LocalActor ( ) ;
localActor - > cell = dedicatedActor - > cell ;
localActor - > cell = dedicatedActor - > cell ;
@ -449,11 +449,11 @@ void Cell::readCellChange(ActorList& actorList)
localActor - > creatureStats = dedicatedActor - > creatureStats ;
localActor - > creatureStats = dedicatedActor - > creatureStats ;
newCell - > localActors [ mapIndex ] = localActor ;
newCell - > localActors [ mapIndex ] = localActor ;
cellController - > setLocalActorRecord ( mapIndex , newCell - > get Description( ) ) ;
cellController - > setLocalActorRecord ( mapIndex , newCell - > get Short Description( ) ) ;
}
}
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Deleting DedicatedActor %s which is no longer needed " ,
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Deleting DedicatedActor %s which is no longer needed " ,
mapIndex . c_str ( ) , get Description( ) . c_str ( ) ) ;
mapIndex . c_str ( ) , get Short Description( ) . c_str ( ) ) ;
cellController - > removeDedicatedActorRecord ( mapIndex ) ;
cellController - > removeDedicatedActorRecord ( mapIndex ) ;
delete dedicatedActor ;
delete dedicatedActor ;
}
}
@ -466,7 +466,7 @@ void Cell::readCellChange(ActorList& actorList)
void Cell : : initializeLocalActor ( const MWWorld : : Ptr & ptr )
void Cell : : initializeLocalActor ( const MWWorld : : Ptr & ptr )
{
{
std : : string mapIndex = Main : : get ( ) . getCellController ( ) - > generateMapIndex ( ptr ) ;
std : : string mapIndex = Main : : get ( ) . getCellController ( ) - > generateMapIndex ( ptr ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Initializing LocalActor %s in %s " , mapIndex . c_str ( ) , get Description( ) . c_str ( ) ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Initializing LocalActor %s in %s " , mapIndex . c_str ( ) , get Short Description( ) . c_str ( ) ) ;
LocalActor * actor = new LocalActor ( ) ;
LocalActor * actor = new LocalActor ( ) ;
actor - > cell = * store - > getCell ( ) ;
actor - > cell = * store - > getCell ( ) ;
@ -474,14 +474,14 @@ void Cell::initializeLocalActor(const MWWorld::Ptr& ptr)
localActors [ mapIndex ] = actor ;
localActors [ mapIndex ] = actor ;
Main : : get ( ) . getCellController ( ) - > setLocalActorRecord ( mapIndex , get Description( ) ) ;
Main : : get ( ) . getCellController ( ) - > setLocalActorRecord ( mapIndex , get Short Description( ) ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Successfully initialized LocalActor %s in %s " , mapIndex . c_str ( ) , get Description( ) . c_str ( ) ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Successfully initialized LocalActor %s in %s " , mapIndex . c_str ( ) , get Short Description( ) . c_str ( ) ) ;
}
}
void Cell : : initializeLocalActors ( )
void Cell : : initializeLocalActors ( )
{
{
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_VERBOSE , " Initializing LocalActors in %s " , get Description( ) . c_str ( ) ) ;
LOG_MESSAGE_SIMPLE ( TimedLog : : LOG_VERBOSE , " Initializing LocalActors in %s " , get Short Description( ) . c_str ( ) ) ;
for ( const auto & mergedRef : store - > getMergedRefs ( ) )
for ( const auto & mergedRef : store - > getMergedRefs ( ) )
{
{
@ -503,13 +503,13 @@ void Cell::initializeLocalActors()
}
}
}
}
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Successfully initialized LocalActors in %s " , get Description( ) . c_str ( ) ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Successfully initialized LocalActors in %s " , get Short Description( ) . c_str ( ) ) ;
}
}
void Cell : : initializeDedicatedActor ( const MWWorld : : Ptr & ptr )
void Cell : : initializeDedicatedActor ( const MWWorld : : Ptr & ptr )
{
{
std : : string mapIndex = Main : : get ( ) . getCellController ( ) - > generateMapIndex ( ptr ) ;
std : : string mapIndex = Main : : get ( ) . getCellController ( ) - > generateMapIndex ( ptr ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Initializing DedicatedActor %s in %s " , mapIndex . c_str ( ) , get Description( ) . c_str ( ) ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Initializing DedicatedActor %s in %s " , mapIndex . c_str ( ) , get Short Description( ) . c_str ( ) ) ;
DedicatedActor * actor = new DedicatedActor ( ) ;
DedicatedActor * actor = new DedicatedActor ( ) ;
actor - > cell = * store - > getCell ( ) ;
actor - > cell = * store - > getCell ( ) ;
@ -517,9 +517,9 @@ void Cell::initializeDedicatedActor(const MWWorld::Ptr& ptr)
dedicatedActors [ mapIndex ] = actor ;
dedicatedActors [ mapIndex ] = actor ;
Main : : get ( ) . getCellController ( ) - > setDedicatedActorRecord ( mapIndex , get Description( ) ) ;
Main : : get ( ) . getCellController ( ) - > setDedicatedActorRecord ( mapIndex , get Short Description( ) ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Successfully initialized DedicatedActor %s in %s " , mapIndex . c_str ( ) , get Description( ) . c_str ( ) ) ;
LOG_APPEND ( TimedLog : : LOG_VERBOSE , " - Successfully initialized DedicatedActor %s in %s " , mapIndex . c_str ( ) , get Short Description( ) . c_str ( ) ) ;
}
}
void Cell : : initializeDedicatedActors ( ActorList & actorList )
void Cell : : initializeDedicatedActors ( ActorList & actorList )
@ -598,7 +598,7 @@ MWWorld::CellStore *Cell::getCellStore()
return store ;
return store ;
}
}
std : : string Cell : : get Description( )
std : : string Cell : : get Short Description( )
{
{
return store - > getCell ( ) - > get Description( ) ;
return store - > getCell ( ) - > get Short Description( ) ;
}
}