mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-25 20:51:38 +00:00
even in non-qcc mode we need to search the variables for fields because of field-pointers
This commit is contained in:
parent
7c731b70cf
commit
1a3a0014c5
1 changed files with 6 additions and 2 deletions
8
parser.c
8
parser.c
|
@ -965,8 +965,12 @@ static ast_expression* parser_expression_leave(parser_t *parser, bool stopatcomm
|
||||||
/* variable */
|
/* variable */
|
||||||
if (opts_standard == COMPILER_GMQCC)
|
if (opts_standard == COMPILER_GMQCC)
|
||||||
{
|
{
|
||||||
if (parser->memberof == TYPE_ENTITY)
|
if (parser->memberof == TYPE_ENTITY) {
|
||||||
var = parser_find_field(parser, parser_tokval(parser));
|
/* still get vars first since there could be a fieldpointer */
|
||||||
|
var = parser_find_var(parser, parser_tokval(parser));
|
||||||
|
if (!var)
|
||||||
|
var = parser_find_field(parser, parser_tokval(parser));
|
||||||
|
}
|
||||||
else if (parser->memberof == TYPE_VECTOR)
|
else if (parser->memberof == TYPE_VECTOR)
|
||||||
{
|
{
|
||||||
parseerror(parser, "TODO: implement effective vector member access");
|
parseerror(parser, "TODO: implement effective vector member access");
|
||||||
|
|
Loading…
Reference in a new issue