mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Allow extension builins to override standard builtins.
This commit is contained in:
parent
3626f34c9a
commit
64bfde7320
1 changed files with 9 additions and 2 deletions
|
@ -71,12 +71,19 @@ static unsigned
|
||||||
bi_map (progs_t *pr, unsigned binum)
|
bi_map (progs_t *pr, unsigned binum)
|
||||||
{
|
{
|
||||||
unsigned range;
|
unsigned range;
|
||||||
|
unsigned base = sv_range << PR_RANGE_SHIFT;
|
||||||
|
|
||||||
if (sv_range != PR_RANGE_NONE) {
|
if (sv_range != PR_RANGE_NONE) {
|
||||||
range = (binum & PR_RANGE_MASK) >> PR_RANGE_SHIFT;
|
range = (binum & PR_RANGE_MASK) >> PR_RANGE_SHIFT;
|
||||||
|
|
||||||
if (!range && binum > PR_RANGE_ID_MAX)
|
if (!range) {
|
||||||
binum |= sv_range << PR_RANGE_SHIFT;
|
if (binum > PR_RANGE_ID_MAX) {
|
||||||
|
binum |= base;
|
||||||
|
} else {
|
||||||
|
if (PR_FindBuiltinNum (pr, binum | base))
|
||||||
|
binum |= base;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return binum;
|
return binum;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue