mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-20 23:24:16 +00:00
Never serialize an event when it's not owned
This commit is contained in:
@@ -173,14 +173,11 @@ AIProxy.prototype.GetRepresentation = function()
|
||||
|
||||
AIProxy.prototype.NotifyChange = function()
|
||||
{
|
||||
if (this.needsFullGet)
|
||||
{
|
||||
// not yet notified, be sure that the owner is set before doing so
|
||||
// as the Create event is sent only on first ownership changed
|
||||
const cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
|
||||
if (!cmpOwnership || cmpOwnership.GetOwner() < 0)
|
||||
return false;
|
||||
}
|
||||
// not yet notified, be sure that the owner is set before doing so
|
||||
// as the Create event is sent only on first ownership changed
|
||||
const cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
|
||||
if (!cmpOwnership || cmpOwnership.GetOwner() < 0)
|
||||
return false;
|
||||
|
||||
if (!this.changes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user