From: Mario Date: Mon, 20 Jun 2022 10:30:19 +0000 (+1000) Subject: Replace team-coloured CTF flag textures with a single neutral texture, add support... X-Git-Tag: xonotic-v0.8.6~390^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=baec9961f0278290e4978954aa6bac687598c15c;p=xonotic%2Fxonotic-data.pk3dir.git Replace team-coloured CTF flag textures with a single neutral texture, add support for colormaps to the flag rendering code --- diff --git a/models/ctf/banner.tga b/models/ctf/banner.tga new file mode 100644 index 000000000..098d72587 Binary files /dev/null and b/models/ctf/banner.tga differ diff --git a/models/ctf/banner_blue.tga b/models/ctf/banner_blue.tga deleted file mode 100644 index 8b9558975..000000000 Binary files a/models/ctf/banner_blue.tga and /dev/null differ diff --git a/models/ctf/banner_gloss.tga b/models/ctf/banner_gloss.tga new file mode 100644 index 000000000..77168a8a8 Binary files /dev/null and b/models/ctf/banner_gloss.tga differ diff --git a/models/ctf/banner_neutral.tga b/models/ctf/banner_neutral.tga deleted file mode 100644 index 5c3de9461..000000000 Binary files a/models/ctf/banner_neutral.tga and /dev/null differ diff --git a/models/ctf/banner_neutral_gloss.tga b/models/ctf/banner_neutral_gloss.tga deleted file mode 100644 index 77168a8a8..000000000 Binary files a/models/ctf/banner_neutral_gloss.tga and /dev/null differ diff --git a/models/ctf/banner_pink.tga b/models/ctf/banner_pink.tga deleted file mode 100644 index 68e65b6de..000000000 Binary files a/models/ctf/banner_pink.tga and /dev/null differ diff --git a/models/ctf/banner_pink_gloss.tga b/models/ctf/banner_pink_gloss.tga deleted file mode 100644 index 77168a8a8..000000000 Binary files a/models/ctf/banner_pink_gloss.tga and /dev/null differ diff --git a/models/ctf/banner_red.tga b/models/ctf/banner_red.tga deleted file mode 100644 index a64aa36ce..000000000 Binary files a/models/ctf/banner_red.tga and /dev/null differ diff --git a/models/ctf/banner_red_gloss.tga b/models/ctf/banner_red_gloss.tga deleted file mode 100644 index 77168a8a8..000000000 Binary files a/models/ctf/banner_red_gloss.tga and /dev/null differ diff --git a/models/ctf/banner_shirt.tga b/models/ctf/banner_shirt.tga new file mode 100644 index 000000000..682910450 Binary files /dev/null and b/models/ctf/banner_shirt.tga differ diff --git a/models/ctf/banner_yellow.tga b/models/ctf/banner_yellow.tga deleted file mode 100644 index b398e880b..000000000 Binary files a/models/ctf/banner_yellow.tga and /dev/null differ diff --git a/models/ctf/banner_yellow_gloss.tga b/models/ctf/banner_yellow_gloss.tga deleted file mode 100644 index 77168a8a8..000000000 Binary files a/models/ctf/banner_yellow_gloss.tga and /dev/null differ diff --git a/models/ctf/flag.tga b/models/ctf/flag.tga new file mode 100644 index 000000000..63feddd4e Binary files /dev/null and b/models/ctf/flag.tga differ diff --git a/models/ctf/flag_blue.tga b/models/ctf/flag_blue.tga deleted file mode 100644 index 63feddd4e..000000000 Binary files a/models/ctf/flag_blue.tga and /dev/null differ diff --git a/models/ctf/flag_blue_gloss.tga b/models/ctf/flag_blue_gloss.tga deleted file mode 100644 index 3e92985b8..000000000 Binary files a/models/ctf/flag_blue_gloss.tga and /dev/null differ diff --git a/models/ctf/flag_blue_glow.tga b/models/ctf/flag_blue_glow.tga deleted file mode 100644 index 8605da159..000000000 Binary files a/models/ctf/flag_blue_glow.tga and /dev/null differ diff --git a/models/ctf/flag_blue_norm.tga b/models/ctf/flag_blue_norm.tga deleted file mode 100644 index 07d5e17aa..000000000 Binary files a/models/ctf/flag_blue_norm.tga and /dev/null differ diff --git a/models/ctf/flag_gloss.tga b/models/ctf/flag_gloss.tga new file mode 100644 index 000000000..3e92985b8 Binary files /dev/null and b/models/ctf/flag_gloss.tga differ diff --git a/models/ctf/flag_glow.tga b/models/ctf/flag_glow.tga new file mode 100644 index 000000000..77191aba0 Binary files /dev/null and b/models/ctf/flag_glow.tga differ diff --git a/models/ctf/flag_neutral.tga b/models/ctf/flag_neutral.tga deleted file mode 100644 index 63feddd4e..000000000 Binary files a/models/ctf/flag_neutral.tga and /dev/null differ diff --git a/models/ctf/flag_neutral_gloss.tga b/models/ctf/flag_neutral_gloss.tga deleted file mode 100644 index 3e92985b8..000000000 Binary files a/models/ctf/flag_neutral_gloss.tga and /dev/null differ diff --git a/models/ctf/flag_neutral_glow.tga b/models/ctf/flag_neutral_glow.tga deleted file mode 100644 index 77191aba0..000000000 Binary files a/models/ctf/flag_neutral_glow.tga and /dev/null differ diff --git a/models/ctf/flag_neutral_norm.tga b/models/ctf/flag_neutral_norm.tga deleted file mode 100644 index 07d5e17aa..000000000 Binary files a/models/ctf/flag_neutral_norm.tga and /dev/null differ diff --git a/models/ctf/flag_norm.tga b/models/ctf/flag_norm.tga new file mode 100644 index 000000000..07d5e17aa Binary files /dev/null and b/models/ctf/flag_norm.tga differ diff --git a/models/ctf/flag_pink.tga b/models/ctf/flag_pink.tga deleted file mode 100644 index 63feddd4e..000000000 Binary files a/models/ctf/flag_pink.tga and /dev/null differ diff --git a/models/ctf/flag_pink_gloss.tga b/models/ctf/flag_pink_gloss.tga deleted file mode 100644 index 3e92985b8..000000000 Binary files a/models/ctf/flag_pink_gloss.tga and /dev/null differ diff --git a/models/ctf/flag_pink_glow.tga b/models/ctf/flag_pink_glow.tga deleted file mode 100644 index ba70c0854..000000000 Binary files a/models/ctf/flag_pink_glow.tga and /dev/null differ diff --git a/models/ctf/flag_pink_norm.tga b/models/ctf/flag_pink_norm.tga deleted file mode 100644 index 07d5e17aa..000000000 Binary files a/models/ctf/flag_pink_norm.tga and /dev/null differ diff --git a/models/ctf/flag_red.tga b/models/ctf/flag_red.tga deleted file mode 100644 index 63feddd4e..000000000 Binary files a/models/ctf/flag_red.tga and /dev/null differ diff --git a/models/ctf/flag_red_gloss.tga b/models/ctf/flag_red_gloss.tga deleted file mode 100644 index 3e92985b8..000000000 Binary files a/models/ctf/flag_red_gloss.tga and /dev/null differ diff --git a/models/ctf/flag_red_glow.tga b/models/ctf/flag_red_glow.tga deleted file mode 100644 index dfe90a42d..000000000 Binary files a/models/ctf/flag_red_glow.tga and /dev/null differ diff --git a/models/ctf/flag_red_norm.tga b/models/ctf/flag_red_norm.tga deleted file mode 100644 index 07d5e17aa..000000000 Binary files a/models/ctf/flag_red_norm.tga and /dev/null differ diff --git a/models/ctf/flag_yellow.tga b/models/ctf/flag_yellow.tga deleted file mode 100644 index 63feddd4e..000000000 Binary files a/models/ctf/flag_yellow.tga and /dev/null differ diff --git a/models/ctf/flag_yellow_gloss.tga b/models/ctf/flag_yellow_gloss.tga deleted file mode 100644 index 3e92985b8..000000000 Binary files a/models/ctf/flag_yellow_gloss.tga and /dev/null differ diff --git a/models/ctf/flag_yellow_glow.tga b/models/ctf/flag_yellow_glow.tga deleted file mode 100644 index 0af88a942..000000000 Binary files a/models/ctf/flag_yellow_glow.tga and /dev/null differ diff --git a/models/ctf/flag_yellow_norm.tga b/models/ctf/flag_yellow_norm.tga deleted file mode 100644 index 07d5e17aa..000000000 Binary files a/models/ctf/flag_yellow_norm.tga and /dev/null differ diff --git a/models/ctf/flags.md3_0.skin b/models/ctf/flags.md3_0.skin index 489df22f4..86a69eb30 100644 --- a/models/ctf/flags.md3_0.skin +++ b/models/ctf/flags.md3_0.skin @@ -1,3 +1,3 @@ -mesh,models/ctf/flag_red.tga -mesh2,models/ctf/banner_red.tga -mesh3,models/ctf/glow_red.tga \ No newline at end of file +mesh,models/ctf/flag.tga +mesh2,models/ctf/banner.tga +mesh3,models/ctf/glow.tga \ No newline at end of file diff --git a/models/ctf/flags.md3_1.skin b/models/ctf/flags.md3_1.skin deleted file mode 100644 index 47c5aeb71..000000000 --- a/models/ctf/flags.md3_1.skin +++ /dev/null @@ -1,3 +0,0 @@ -mesh,models/ctf/flag_blue.tga -mesh2,models/ctf/banner_blue.tga -mesh3,models/ctf/glow_blue.tga \ No newline at end of file diff --git a/models/ctf/flags.md3_2.skin b/models/ctf/flags.md3_2.skin deleted file mode 100644 index 44fb67d27..000000000 --- a/models/ctf/flags.md3_2.skin +++ /dev/null @@ -1,3 +0,0 @@ -mesh,models/ctf/flag_yellow.tga -mesh2,models/ctf/banner_yellow.tga -mesh3,models/ctf/glow_yellow.tga \ No newline at end of file diff --git a/models/ctf/flags.md3_3.skin b/models/ctf/flags.md3_3.skin deleted file mode 100644 index 22d77d224..000000000 --- a/models/ctf/flags.md3_3.skin +++ /dev/null @@ -1,3 +0,0 @@ -mesh,models/ctf/flag_pink.tga -mesh2,models/ctf/banner_pink.tga -mesh3,models/ctf/glow_pink.tga \ No newline at end of file diff --git a/models/ctf/flags.md3_4.skin b/models/ctf/flags.md3_4.skin deleted file mode 100644 index ba35e26c6..000000000 --- a/models/ctf/flags.md3_4.skin +++ /dev/null @@ -1,3 +0,0 @@ -mesh,models/ctf/flag_neutral.tga -mesh2,models/ctf/banner_neutral.tga -mesh3,models/ctf/glow_neutral.tga \ No newline at end of file diff --git a/models/ctf/glow.tga b/models/ctf/glow.tga new file mode 100644 index 000000000..7bb6358dd Binary files /dev/null and b/models/ctf/glow.tga differ diff --git a/models/ctf/glow_blue.tga b/models/ctf/glow_blue.tga deleted file mode 100644 index 6968dc28a..000000000 Binary files a/models/ctf/glow_blue.tga and /dev/null differ diff --git a/models/ctf/glow_blue_glow.tga b/models/ctf/glow_blue_glow.tga deleted file mode 100644 index 6968dc28a..000000000 Binary files a/models/ctf/glow_blue_glow.tga and /dev/null differ diff --git a/models/ctf/glow_glow.tga b/models/ctf/glow_glow.tga new file mode 100644 index 000000000..5ffa098e3 Binary files /dev/null and b/models/ctf/glow_glow.tga differ diff --git a/models/ctf/glow_neutral.tga b/models/ctf/glow_neutral.tga deleted file mode 100644 index 5ffa098e3..000000000 Binary files a/models/ctf/glow_neutral.tga and /dev/null differ diff --git a/models/ctf/glow_neutral_glow.tga b/models/ctf/glow_neutral_glow.tga deleted file mode 100644 index 5ffa098e3..000000000 Binary files a/models/ctf/glow_neutral_glow.tga and /dev/null differ diff --git a/models/ctf/glow_pink.tga b/models/ctf/glow_pink.tga deleted file mode 100644 index 6a3bb8c06..000000000 Binary files a/models/ctf/glow_pink.tga and /dev/null differ diff --git a/models/ctf/glow_pink_glow.tga b/models/ctf/glow_pink_glow.tga deleted file mode 100644 index 8da95a975..000000000 Binary files a/models/ctf/glow_pink_glow.tga and /dev/null differ diff --git a/models/ctf/glow_red.tga b/models/ctf/glow_red.tga deleted file mode 100644 index 9702b0b1c..000000000 Binary files a/models/ctf/glow_red.tga and /dev/null differ diff --git a/models/ctf/glow_red_glow.tga b/models/ctf/glow_red_glow.tga deleted file mode 100644 index 9702b0b1c..000000000 Binary files a/models/ctf/glow_red_glow.tga and /dev/null differ diff --git a/models/ctf/glow_yellow.tga b/models/ctf/glow_yellow.tga deleted file mode 100644 index 8562caadd..000000000 Binary files a/models/ctf/glow_yellow.tga and /dev/null differ diff --git a/models/ctf/glow_yellow_glow.tga b/models/ctf/glow_yellow_glow.tga deleted file mode 100644 index 8562caadd..000000000 Binary files a/models/ctf/glow_yellow_glow.tga and /dev/null differ diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index 670b00fa4..5fbb2b2a6 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -1304,6 +1304,11 @@ void ctf_FlagSetup(int teamnum, entity flag) // called when spawning a flag enti flag.nextthink = time + FLAG_THINKRATE; flag.ctf_status = FLAG_BASE; + // set correct team colors + flag.glowmod = Team_ColorRGB(teamnum); + flag.colormap = (teamnum) ? (teamnum - 1) * 0x11 : 0x00; + flag.colormap |= BIT(10); // RENDER_COLORMAPPED + // crudely force them all to 0 if(autocvar_g_ctf_score_ignore_fields) flag.cnt = flag.score_assist = flag.score_team_capture = flag.score_capture = flag.score_drop = flag.score_pickup = flag.score_return = 0; diff --git a/scripts/ctf.shader b/scripts/ctf.shader index 827d7c5a7..8cb101f12 100644 --- a/scripts/ctf.shader +++ b/scripts/ctf.shader @@ -1,43 +1,7 @@ -models/ctf/glow_red +models/ctf/glow { { - map models/ctf/glow_red.tga - tcMod scale 0.03 0.03 - tcMod scroll 0.1 -0.04 - tcMod rotate 0.1 - } -} -models/ctf/glow_blue -{ - { - map models/ctf/glow_blue.tga - tcMod scale 0.03 0.03 - tcMod scroll 0.1 -0.04 - tcMod rotate 0.1 - } -} -models/ctf/glow_yellow -{ - { - map models/ctf/glow_yellow.tga - tcMod scale 0.03 0.03 - tcMod scroll 0.1 -0.04 - tcMod rotate 0.1 - } -} -models/ctf/glow_pink -{ - { - map models/ctf/glow_pink.tga - tcMod scale 0.03 0.03 - tcMod scroll 0.1 -0.04 - tcMod rotate 0.1 - } -} -models/ctf/glow_neutral -{ - { - map models/ctf/glow_neutral.tga + map models/ctf/glow.tga tcMod scale 0.03 0.03 tcMod scroll 0.1 -0.04 tcMod rotate 0.1