mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Never serialize an event when it's not owned
This commit is contained in:
parent
2f86d4a2f8
commit
c4dd0040ee
1 changed files with 5 additions and 8 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue