mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Can now copy brushes.
Implement SetBrush's copyWithZone:
This commit is contained in:
parent
74d959ec64
commit
cb970bddce
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
|
||||
{
|
||||
[self freeWindings];
|
||||
|
|
Loading…
Reference in a new issue