]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
also generate _y and _z data for fieldpointers
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 11 Aug 2012 17:34:58 +0000 (19:34 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 11 Aug 2012 17:34:58 +0000 (19:34 +0200)
ir.c

diff --git a/ir.c b/ir.c
index 7ba97eb2df65a17c8da17370697884346f8b8293..74923c4d8655279180f01653fc61c01924fdda07 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -2150,10 +2150,18 @@ static bool gen_global_field(ir_value *global)
 
         /* copy the field's value */
         ir_value_code_setaddr(global, code_globals_add(code_globals_data[fld->code.globaladdr]));
+        if (global->fieldtype == TYPE_VECTOR) {
+            code_globals_add(code_globals_data[fld->code.globaladdr]+1);
+            code_globals_add(code_globals_data[fld->code.globaladdr]+2);
+        }
     }
     else
     {
         ir_value_code_setaddr(global, code_globals_add(0));
+        if (global->fieldtype == TYPE_VECTOR) {
+            code_globals_add(0);
+            code_globals_add(0);
+        }
     }
     if (global->code.globaladdr < 0)
         return false;