mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 07:42:18 +00:00
Can now copy brushes.
Implement SetBrush's copyWithZone:
This commit is contained in:
parent
708c8743af
commit
1945da99d9
1 changed files with 22 additions and 0 deletions
|
@ -603,6 +603,28 @@ initOwner:::
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) copyWithZone: (NSZone *) zone
|
||||||
|
{
|
||||||
|
SetBrush *new;
|
||||||
|
|
||||||
|
[self freeWindings];
|
||||||
|
|
||||||
|
new = [[SetBrush allocWithZone: zone] init];
|
||||||
|
new->regioned = regioned;
|
||||||
|
new->selected = selected;
|
||||||
|
new->invalid = invalid;
|
||||||
|
new->parent = parent;
|
||||||
|
VectorCopy (bmins, new->bmins);
|
||||||
|
VectorCopy (bmaxs, new->bmaxs);
|
||||||
|
VectorCopy (entitycolor, new->entitycolor);
|
||||||
|
new->numfaces = numfaces;
|
||||||
|
memcpy (new->faces, faces, sizeof (new->faces));
|
||||||
|
|
||||||
|
[self calcWindings];
|
||||||
|
[new calcWindings];
|
||||||
|
return new;
|
||||||
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[self freeWindings];
|
[self freeWindings];
|
||||||
|
|
Loading…
Reference in a new issue