diff options
| author | oy <Tom_Adams@web.de> | 2011-01-06 21:58:42 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-01-06 21:58:42 +0100 |
| commit | 7487a22956680c601e57b9a0edd93eda1e33e287 (patch) | |
| tree | 57fc0faea4c09043dc7e6afd4c85aebc2a72174f /src | |
| parent | 1306b62ce2e7c3494326889788b0fbacd371a709 (diff) | |
| download | zcatch-7487a22956680c601e57b9a0edd93eda1e33e287.tar.gz zcatch-7487a22956680c601e57b9a0edd93eda1e33e287.zip | |
added better texture moving in the editor by nsinreal. Closes #372
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 7195bd61..769018bb 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -1026,9 +1026,15 @@ void CEditor::DoQuadPoint(CQuad *q, int QuadIndex, int v) { for(int m = 0; m < 4; m++) if(m_SelectedPoints&(1<<m)) - { - q->m_aTexcoords[m].x += f2fx(dx*0.001f); - q->m_aTexcoords[m].y += f2fx(dy*0.001f); + { + // 0,2;1,3 - line x + // 0,1;2,3 - line y + + q->m_aTexcoords[m].x += f2fx(dx*0.001f); + q->m_aTexcoords[(m+2)%4].x += f2fx(dx*0.001f); + + q->m_aTexcoords[m].y += f2fx(dy*0.001f); + q->m_aTexcoords[m^1].y += f2fx(dy*0.001f); } } } |