Skip to content

Commit

Permalink
Add synced projectiles to TRACE_SYNC
Browse files Browse the repository at this point in the history
  • Loading branch information
ashdnazg committed Jun 25, 2015
1 parent 489913d commit 6603056
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rts/Sim/Projectiles/Projectile.cpp
Expand Up @@ -126,6 +126,9 @@ CProjectile::~CProjectile()
{
if (synced) {
quadField->RemoveProjectile(this);
#ifdef TRACE_SYNC
tracefile << "Projectile died id: " << id << ", pos: <" << pos.x << ", " << pos.y << ", " << pos.z << ">\n";
#endif
}
}

Expand All @@ -150,7 +153,7 @@ void CProjectile::Init(const CUnit* owner, const float3& offset)
projectileHandler->AddProjectile(this);
}
if (synced && !weapon) {
quadField->AddProjectile(this);
quadField->AddProjectile(this);
}
}

Expand Down
4 changes: 4 additions & 0 deletions rts/Sim/Projectiles/ProjectileHandler.cpp
Expand Up @@ -329,6 +329,10 @@ void CProjectileHandler::AddProjectile(CProjectile* p)

if (p->synced) {
ASSERT_SYNCED(p->id);
#ifdef TRACE_SYNC
tracefile << "New projectile id: " << p->id << ", ownerID: " << p->GetOwnerID();
tracefile << ", type: " << p->GetProjectileType() << " pos: <" << p->pos.x << ", " << p->pos.y << ", " << p->pos.z << ">\n";
#endif
}

eventHandler.ProjectileCreated(p, p->GetAllyteamID());
Expand Down

0 comments on commit 6603056

Please sign in to comment.