Remove allowproccall code, dedent a block.

This commit is contained in:
David Anderson 2014-08-19 22:29:13 -07:00
parent 385d3708a3
commit 8dc4fcc728

View File

@ -2281,17 +2281,18 @@ restart:
} /* if */
if (sym!=NULL && lval1->ident==iFUNCTN) {
assert(sym->ident==iFUNCTN);
if (sc_allowproccall) {
// Note: this is unreachable in SourceMod, we don't support paren-less calls.
callfunction(sym,NULL,lval1,FALSE);
} else if ((sym->usage & uNATIVE) != uNATIVE) {
if (sym->usage & uNATIVE) {
error(76);
return FALSE;
}
symbol *oldsym=sym;
int n=-1,iter=0;
int usage = ((sym->usage & uPUBLIC) == uPUBLIC) ? uPUBLIC : 0;
cell code_addr=0;
for (sym=glbtab.next; sym!=NULL; sym=sym->next) {
if (sym->ident==iFUNCTN && sym->vclass == sGLOBAL && (!usage || (sym->usage & usage)))
{
if (sym->ident==iFUNCTN && sym->vclass == sGLOBAL && (!usage || (sym->usage & usage))) {
if (strcmp(sym->name, lval1->sym->name)==0) {
n = iter;
code_addr = sym->codeaddr;
@ -2318,10 +2319,6 @@ restart:
sym->usage |= uREAD;
} else {
error(76); /* invalid function call, or syntax error */
} /* if */
return FALSE;
} else {
error(76); /* invalid function call, or syntax error */
}
} /* if */
return lvalue;