From b2bcc1be15bf261fa609eba8bb88651bfabb3a96 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 12 Mar 2013 23:12:08 +0000 Subject: [PATCH] ------------------------------------------------------------------------ r4233 | acceptthis | 2013-02-27 16:24:26 +0000 (Wed, 27 Feb 2013) | 1 line small update to fix a couple of issues. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4229 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- quakec/csaddon/src/csaddon.qc | 1 + quakec/csaddon/src/csaddon.src | 1 + quakec/csaddon/src/editor_terrain.qc | 13 ++++++------- quakec/csaddon/src/opts.qc | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/quakec/csaddon/src/csaddon.qc b/quakec/csaddon/src/csaddon.qc index 3be0a5d1e..3247f510e 100644 --- a/quakec/csaddon/src/csaddon.qc +++ b/quakec/csaddon/src/csaddon.qc @@ -404,6 +404,7 @@ void(float prevprogs) init = orig_input_event = externvalue(0, "CSQC_InputEvent"); externset(0, wrap_InputEvent, "CSQC_InputEvent"); } + csfixups(); }; void() CSQC_Shutdown = diff --git a/quakec/csaddon/src/csaddon.src b/quakec/csaddon/src/csaddon.src index e0e65f961..ca9ca827b 100644 --- a/quakec/csaddon/src/csaddon.src +++ b/quakec/csaddon/src/csaddon.src @@ -2,6 +2,7 @@ //pr_dumpplatform -FFTE -Fdefines -TCS -O csplat opts.qc csplat.qc +csfixups.qc editor_lights.qc editor_terrain.qc diff --git a/quakec/csaddon/src/editor_terrain.qc b/quakec/csaddon/src/editor_terrain.qc index 690b0c21b..a7bd6e892 100644 --- a/quakec/csaddon/src/editor_terrain.qc +++ b/quakec/csaddon/src/editor_terrain.qc @@ -117,6 +117,7 @@ void(vector m) editor_do = else terrain_edit(curtool, trace_endpos, eradius, epercent/100.0); break; + case ter_water_set: case ter_height_set: case ter_height_smooth: case ter_height_raise: @@ -318,14 +319,11 @@ float(float keyc, float unic, vector m) editor_terrain_key = return TRUE; }; -shared vector v_forward; -shared vector v_right; -shared vector v_up; void(vector mousepos) editor_terrain_add = { float s,c; float r; - vector tx, p, col; + vector tx, p, col,t; float a; if (mousepos_x < 128) return; @@ -366,6 +364,7 @@ void(vector mousepos) editor_terrain_add = col_x = (sin(gettime(5))+1.5)*0.1; + t = trace_endpos; R_BeginPolygon("terrainedit"); for (a = 0; a < 3.14*2; a += 3.14*2/8) { @@ -373,9 +372,9 @@ void(vector mousepos) editor_terrain_add = tx_y = cos(a); //-1 -1 - p_x = trace_endpos_x + tx_x*c - tx_y*s; - p_y = trace_endpos_y + tx_y*c + tx_x*s; - p_z = trace_endpos_z + 5; + p_x = t_x + tx_x*c - tx_y*s; + p_y = t_y + tx_y*c + tx_x*s; + p_z = t_z + 5; tx = (tx*0.5)+'0.5 0.5 0'; R_PolygonVertex(p, tx, col, 1); } diff --git a/quakec/csaddon/src/opts.qc b/quakec/csaddon/src/opts.qc index acbb12d1d..f60772993 100644 --- a/quakec/csaddon/src/opts.qc +++ b/quakec/csaddon/src/opts.qc @@ -1,2 +1,3 @@ +//this file must contain only definitions+pragmas. if it contains variables it will break the defs+crc. //#pragma flag enable assumeint //#pragma flag enable typeexplicit \ No newline at end of file