mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[qfcc] Offset alias tempop offsets
Alias tempop offsets are relative to the real tempop. This fixes alias tempops never overlapping the real tempop.
This commit is contained in:
parent
695b3ba0d0
commit
035da472ec
1 changed files with 6 additions and 0 deletions
|
@ -362,6 +362,12 @@ tempop_overlap (tempop_t *t1, tempop_t *t2)
|
|||
int size1 = type_size (t1->type);
|
||||
int size2 = type_size (t2->type);
|
||||
|
||||
if (t1->alias) {
|
||||
offs1 += t1->alias->o.tempop.offset;
|
||||
}
|
||||
if (t2->alias) {
|
||||
offs2 += t2->alias->o.tempop.offset;
|
||||
}
|
||||
if (offs1 <= offs2 && offs1 + size1 >= offs2 + size2)
|
||||
return 2; // t1 fully overlaps t2
|
||||
if (offs1 < offs2 + size2 && offs2 < offs1 + size1)
|
||||
|
|
Loading…
Reference in a new issue