Hacky fix to state cloning

This commit is contained in:
Tangent Wantwight 2020-03-26 00:29:51 -04:00
parent 281514e7b7
commit 07071e6ca6

View file

@ -77,8 +77,8 @@ export class Data extends CoreData {
constructor(source?: Partial<Data>) { constructor(source?: Partial<Data>) {
super(source); super(source);
if(source?.location) this.location = source.location.slice(); if(source?.location) this.location = source.location.map(b => ({...b}));
if(source?.bounds) this.bounds = source.bounds.slice(); if(source?.bounds) this.bounds = source.bounds.map(b => ({...b}));
if(source?.renderBounds) this.renderBounds = copy(source.renderBounds); if(source?.renderBounds) this.renderBounds = copy(source.renderBounds);
if(source?.renderSprite) this.renderSprite = copy(source.renderSprite); if(source?.renderSprite) this.renderSprite = copy(source.renderSprite);
if(source?.collisionSourceClass) this.collisionSourceClass = copy(source.collisionSourceClass); if(source?.collisionSourceClass) this.collisionSourceClass = copy(source.collisionSourceClass);