]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add and fix models, still prop models interaction needs to do more (TODO and TOFIX)...
authorLegendaryGuard <rootuser999@gmail.com>
Thu, 23 Dec 2021 16:46:12 +0000 (17:46 +0100)
committerLegendaryGuard <rootuser999@gmail.com>
Thu, 23 Dec 2021 16:46:12 +0000 (17:46 +0100)
46 files changed:
models/containers/barrel01.blend [deleted file]
models/containers/barrel01.iqm [deleted file]
models/containers/barrel01.md3 [deleted file]
models/containers/barrel01.tga [deleted file]
models/containers/barrel01_gloss.tga [deleted file]
models/containers/barrel01_norm.tga [deleted file]
models/containers/crate01.blend [deleted file]
models/containers/crate01.iqm [deleted file]
models/containers/crate01.md3 [deleted file]
models/containers/crate01.tga [deleted file]
models/containers/crate01_bump.tga [deleted file]
models/containers/crate01_gloss.tga [deleted file]
models/containers/crate01_lod.md3 [deleted file]
models/containers/crate01_lod.tga [deleted file]
models/containers/crate02.md3 [deleted file]
models/containers/crate02.tga [deleted file]
models/containers/crate02_gloss.tga [deleted file]
models/containers/crate02_norm.tga [deleted file]
models/containers/crate02_reflect.tga [deleted file]
models/containers/if_isnt_loading.txt [deleted file]
models/props/barrel01.blend [new file with mode: 0644]
models/props/barrel01.iqm [new file with mode: 0644]
models/props/barrel01.md3 [new file with mode: 0644]
models/props/barrel01.tga [new file with mode: 0644]
models/props/barrel01_gloss.tga [new file with mode: 0644]
models/props/barrel01_norm.tga [new file with mode: 0644]
models/props/crate01.blend [new file with mode: 0644]
models/props/crate01.iqm [new file with mode: 0644]
models/props/crate01.md3 [new file with mode: 0644]
models/props/crate01.tga [new file with mode: 0644]
models/props/crate01_bump.tga [new file with mode: 0644]
models/props/crate01_gloss.tga [new file with mode: 0644]
models/props/crate01_lod.md3 [new file with mode: 0644]
models/props/crate01_lod.tga [new file with mode: 0644]
models/props/crate02.blend [new file with mode: 0644]
models/props/crate02.iqm [new file with mode: 0644]
models/props/crate02.md3 [new file with mode: 0644]
models/props/crate02.tga [new file with mode: 0644]
models/props/crate02_gloss.tga [new file with mode: 0644]
models/props/crate02_norm.tga [new file with mode: 0644]
models/props/crate02_reflect.tga [new file with mode: 0644]
models/props/if_isnt_loading.txt [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc
qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh
scripts/propmodels.shader [new file with mode: 0644]
scripts/shaderlist.txt

diff --git a/models/containers/barrel01.blend b/models/containers/barrel01.blend
deleted file mode 100644 (file)
index 243abcf..0000000
Binary files a/models/containers/barrel01.blend and /dev/null differ
diff --git a/models/containers/barrel01.iqm b/models/containers/barrel01.iqm
deleted file mode 100644 (file)
index 32713d0..0000000
Binary files a/models/containers/barrel01.iqm and /dev/null differ
diff --git a/models/containers/barrel01.md3 b/models/containers/barrel01.md3
deleted file mode 100644 (file)
index ab7266c..0000000
Binary files a/models/containers/barrel01.md3 and /dev/null differ
diff --git a/models/containers/barrel01.tga b/models/containers/barrel01.tga
deleted file mode 100644 (file)
index d80a68c..0000000
Binary files a/models/containers/barrel01.tga and /dev/null differ
diff --git a/models/containers/barrel01_gloss.tga b/models/containers/barrel01_gloss.tga
deleted file mode 100644 (file)
index d842a9e..0000000
Binary files a/models/containers/barrel01_gloss.tga and /dev/null differ
diff --git a/models/containers/barrel01_norm.tga b/models/containers/barrel01_norm.tga
deleted file mode 100644 (file)
index 0b9a2db..0000000
Binary files a/models/containers/barrel01_norm.tga and /dev/null differ
diff --git a/models/containers/crate01.blend b/models/containers/crate01.blend
deleted file mode 100644 (file)
index 99228e4..0000000
Binary files a/models/containers/crate01.blend and /dev/null differ
diff --git a/models/containers/crate01.iqm b/models/containers/crate01.iqm
deleted file mode 100644 (file)
index becda4d..0000000
Binary files a/models/containers/crate01.iqm and /dev/null differ
diff --git a/models/containers/crate01.md3 b/models/containers/crate01.md3
deleted file mode 100644 (file)
index 24e9612..0000000
Binary files a/models/containers/crate01.md3 and /dev/null differ
diff --git a/models/containers/crate01.tga b/models/containers/crate01.tga
deleted file mode 100644 (file)
index 55abff8..0000000
Binary files a/models/containers/crate01.tga and /dev/null differ
diff --git a/models/containers/crate01_bump.tga b/models/containers/crate01_bump.tga
deleted file mode 100644 (file)
index b539aeb..0000000
Binary files a/models/containers/crate01_bump.tga and /dev/null differ
diff --git a/models/containers/crate01_gloss.tga b/models/containers/crate01_gloss.tga
deleted file mode 100644 (file)
index 0a8f611..0000000
Binary files a/models/containers/crate01_gloss.tga and /dev/null differ
diff --git a/models/containers/crate01_lod.md3 b/models/containers/crate01_lod.md3
deleted file mode 100644 (file)
index 04244f6..0000000
Binary files a/models/containers/crate01_lod.md3 and /dev/null differ
diff --git a/models/containers/crate01_lod.tga b/models/containers/crate01_lod.tga
deleted file mode 100644 (file)
index cd3c231..0000000
Binary files a/models/containers/crate01_lod.tga and /dev/null differ
diff --git a/models/containers/crate02.md3 b/models/containers/crate02.md3
deleted file mode 100644 (file)
index 8152f18..0000000
Binary files a/models/containers/crate02.md3 and /dev/null differ
diff --git a/models/containers/crate02.tga b/models/containers/crate02.tga
deleted file mode 100644 (file)
index 2d60cdc..0000000
Binary files a/models/containers/crate02.tga and /dev/null differ
diff --git a/models/containers/crate02_gloss.tga b/models/containers/crate02_gloss.tga
deleted file mode 100644 (file)
index ce33db3..0000000
Binary files a/models/containers/crate02_gloss.tga and /dev/null differ
diff --git a/models/containers/crate02_norm.tga b/models/containers/crate02_norm.tga
deleted file mode 100644 (file)
index d381490..0000000
Binary files a/models/containers/crate02_norm.tga and /dev/null differ
diff --git a/models/containers/crate02_reflect.tga b/models/containers/crate02_reflect.tga
deleted file mode 100644 (file)
index 3b0bbbf..0000000
Binary files a/models/containers/crate02_reflect.tga and /dev/null differ
diff --git a/models/containers/if_isnt_loading.txt b/models/containers/if_isnt_loading.txt
deleted file mode 100644 (file)
index 7387444..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-if some model doesnt load, it's because Materials are called the same as the texture:
-example:
-"Main"
-
-in barrrel01 model
-
-it should be replaced to "barrel01" the same as the assigned texture
-
-More TODO for models
\ No newline at end of file
diff --git a/models/props/barrel01.blend b/models/props/barrel01.blend
new file mode 100644 (file)
index 0000000..243abcf
Binary files /dev/null and b/models/props/barrel01.blend differ
diff --git a/models/props/barrel01.iqm b/models/props/barrel01.iqm
new file mode 100644 (file)
index 0000000..32713d0
Binary files /dev/null and b/models/props/barrel01.iqm differ
diff --git a/models/props/barrel01.md3 b/models/props/barrel01.md3
new file mode 100644 (file)
index 0000000..ab7266c
Binary files /dev/null and b/models/props/barrel01.md3 differ
diff --git a/models/props/barrel01.tga b/models/props/barrel01.tga
new file mode 100644 (file)
index 0000000..d80a68c
Binary files /dev/null and b/models/props/barrel01.tga differ
diff --git a/models/props/barrel01_gloss.tga b/models/props/barrel01_gloss.tga
new file mode 100644 (file)
index 0000000..d842a9e
Binary files /dev/null and b/models/props/barrel01_gloss.tga differ
diff --git a/models/props/barrel01_norm.tga b/models/props/barrel01_norm.tga
new file mode 100644 (file)
index 0000000..0b9a2db
Binary files /dev/null and b/models/props/barrel01_norm.tga differ
diff --git a/models/props/crate01.blend b/models/props/crate01.blend
new file mode 100644 (file)
index 0000000..99228e4
Binary files /dev/null and b/models/props/crate01.blend differ
diff --git a/models/props/crate01.iqm b/models/props/crate01.iqm
new file mode 100644 (file)
index 0000000..becda4d
Binary files /dev/null and b/models/props/crate01.iqm differ
diff --git a/models/props/crate01.md3 b/models/props/crate01.md3
new file mode 100644 (file)
index 0000000..24e9612
Binary files /dev/null and b/models/props/crate01.md3 differ
diff --git a/models/props/crate01.tga b/models/props/crate01.tga
new file mode 100644 (file)
index 0000000..55abff8
Binary files /dev/null and b/models/props/crate01.tga differ
diff --git a/models/props/crate01_bump.tga b/models/props/crate01_bump.tga
new file mode 100644 (file)
index 0000000..b539aeb
Binary files /dev/null and b/models/props/crate01_bump.tga differ
diff --git a/models/props/crate01_gloss.tga b/models/props/crate01_gloss.tga
new file mode 100644 (file)
index 0000000..0a8f611
Binary files /dev/null and b/models/props/crate01_gloss.tga differ
diff --git a/models/props/crate01_lod.md3 b/models/props/crate01_lod.md3
new file mode 100644 (file)
index 0000000..04244f6
Binary files /dev/null and b/models/props/crate01_lod.md3 differ
diff --git a/models/props/crate01_lod.tga b/models/props/crate01_lod.tga
new file mode 100644 (file)
index 0000000..cd3c231
Binary files /dev/null and b/models/props/crate01_lod.tga differ
diff --git a/models/props/crate02.blend b/models/props/crate02.blend
new file mode 100644 (file)
index 0000000..8a434b5
Binary files /dev/null and b/models/props/crate02.blend differ
diff --git a/models/props/crate02.iqm b/models/props/crate02.iqm
new file mode 100644 (file)
index 0000000..d05c357
Binary files /dev/null and b/models/props/crate02.iqm differ
diff --git a/models/props/crate02.md3 b/models/props/crate02.md3
new file mode 100644 (file)
index 0000000..8152f18
Binary files /dev/null and b/models/props/crate02.md3 differ
diff --git a/models/props/crate02.tga b/models/props/crate02.tga
new file mode 100644 (file)
index 0000000..2d60cdc
Binary files /dev/null and b/models/props/crate02.tga differ
diff --git a/models/props/crate02_gloss.tga b/models/props/crate02_gloss.tga
new file mode 100644 (file)
index 0000000..ce33db3
Binary files /dev/null and b/models/props/crate02_gloss.tga differ
diff --git a/models/props/crate02_norm.tga b/models/props/crate02_norm.tga
new file mode 100644 (file)
index 0000000..d381490
Binary files /dev/null and b/models/props/crate02_norm.tga differ
diff --git a/models/props/crate02_reflect.tga b/models/props/crate02_reflect.tga
new file mode 100644 (file)
index 0000000..3b0bbbf
Binary files /dev/null and b/models/props/crate02_reflect.tga differ
diff --git a/models/props/if_isnt_loading.txt b/models/props/if_isnt_loading.txt
new file mode 100644 (file)
index 0000000..7387444
--- /dev/null
@@ -0,0 +1,9 @@
+if some model doesnt load, it's because Materials are called the same as the texture:
+example:
+"Main"
+
+in barrrel01 model
+
+it should be replaced to "barrel01" the same as the assigned texture
+
+More TODO for models
\ No newline at end of file
index b178402e515b16d758fcb4be13b55bee5fe03e9a..d6dcc7c47a13a45e62053117459549242f958609 100644 (file)
@@ -36,6 +36,7 @@ MUTATOR_HOOKFUNCTION(mh, Scores_CountFragsRemaining)
 
 // Prop feature
 .entity mh_prop; // TODO: to be checked
+.bool modelchecked;
 MUTATOR_HOOKFUNCTION(mh, FixPlayermodel)
 {
        entity player = M_ARGV(2, entity);
@@ -44,13 +45,21 @@ MUTATOR_HOOKFUNCTION(mh, FixPlayermodel)
        {
                if (player.team == Team_IndexToTeam(2))
                {
-                       string defaultmodel = M_ARGV(0, string);
+                       //string defaultmodel = M_ARGV(0, string);
                        // TODO: to be checked
-                       //M_ARGV(0, string) = player.mh_prop.model;
-                       //M_ARGV(1, int) = player.mh_prop.skin;
+                       if (!player.mh_prop.modelchecked)
+                       {
+                               //PrintToChatAll("PROPMODEL CHECKED");
+                               player.mh_prop.model = MDL_RUNNER_PROP_RANDOM().model_str();
+                               M_ARGV(0, string) = player.mh_prop.model;
+                               M_ARGV(1, int) = player.mh_prop.skin;
+                               player.playermodel = M_ARGV(0,string);
+                               //setmodel(player, MDL_RUNNER_PROP_RANDOM());
+                               player.mh_prop.modelchecked = true;
+                       }
                        
-                       defaultmodel = MDL_RUNNER_PROP2.model_str();
-                       player.playermodel = defaultmodel; // Runners are transformed into props
+                       //defaultmodel = MDL_RUNNER_PROP2.model_str();
+                       //player.playermodel = defaultmodel; // Runners are transformed into props
                        //cvar_set("sv_defaultcharacter", "1");
                        //cvar_set("sv_defaultplayermodel", "");
                        //_setmodel(player, defaultmodel);
@@ -97,7 +106,7 @@ MUTATOR_HOOKFUNCTION(mh, PlayerPreThink)
                player.mh_status = MH_STATUS_RUNNER;
        
        // TODO: Runners using prop must select an object in the map
-       if(!IS_DEAD(player) && player.team == Team_IndexToTeam(2))
+       /*if(!IS_DEAD(player) && player.team == Team_IndexToTeam(2))
                traceline_antilag(
                        player, 
                        CS(player).cursor_trace_start, 
@@ -105,7 +114,7 @@ MUTATOR_HOOKFUNCTION(mh, PlayerPreThink)
                        MOVE_NORMAL, 
                        player, 
                        ANTILAG_LATENCY(player)
-               );
+               );*/
        
        // Autotaunt feature
        if(autocvar_g_mh_autotaunt_runner)
@@ -725,12 +734,15 @@ MUTATOR_HOOKFUNCTION(mh, PlayerSpawn)
 
        if(autocvar_g_mh_propmode)
        {
-               if(player.team == Team_IndexToTeam(2))
+               if(player.team == Team_IndexToTeam(2) && !IS_DEAD(player))
                {
-                       setmodel(player, MDL_RUNNER_PROP2);
+                       //setmodel(player, MDL_RUNNER_PROP2);
                        //setplayermodel(player, MDL_RUNNER_PROP_RANDOM().model_str());//prop_setup(player);
                        //setmodel(player, MDL_RUNNER_PROP_RANDOM());
                        LOG_INFOF("Spawned prop");
+                       
+                       if(player.mh_prop) // TOFIX: only spawns per one and not for all
+                               player.mh_prop.modelchecked = false;
                }
        }
        
index 0c35a89909788c272070ab06f24e1b085f91f913..ed4021b46fa3e7d5f733abe2d4c1b01395078fa9 100644 (file)
@@ -47,8 +47,8 @@ Sound SND_RUNNER_TAUNT_RANDOM() {
 }
 
 // Prop feature
-MODEL(RUNNER_PROP1, "models/containers/barrel01.iqm");
-MODEL(RUNNER_PROP2, "models/containers/crate01.iqm");
+MODEL(RUNNER_PROP1, "models/props/barrel01.iqm");
+MODEL(RUNNER_PROP2, "models/props/crate01.iqm");
 Model MDL_RUNNER_PROP_RANDOM() {
     return REGISTRY_GET(Models, MDL_RUNNER_PROP1.m_id + floor(prandom() * 2));
 }
diff --git a/scripts/propmodels.shader b/scripts/propmodels.shader
new file mode 100644 (file)
index 0000000..8272f93
--- /dev/null
@@ -0,0 +1,38 @@
+barrel01
+{
+       dpreflectcube cubemaps/default/sky
+    {
+               map models/props/barrel01.tga
+       }
+       {
+               map $lightmap
+               blendfunc GL_DST_COLOR GL_ZERO
+               rgbGen identity
+    }
+}
+
+crate01
+{
+       dpreflectcube cubemaps/default/sky
+    {
+               map models/props/crate01.tga
+       }
+       {
+               map $lightmap
+               blendfunc GL_DST_COLOR GL_ZERO
+               rgbGen identity
+    }
+}
+
+crate02
+{
+       dpreflectcube cubemaps/default/sky
+    {
+               map models/props/crate02.tga
+       }
+       {
+               map $lightmap
+               blendfunc GL_DST_COLOR GL_ZERO
+               rgbGen identity
+    }
+}
\ No newline at end of file
index fcc9d3c64edaf4154ee4420b383cf299d46bdc42..7abae7003c69defcdcfc8bcbf147b0f916aa412c 100644 (file)
@@ -7,6 +7,7 @@ hlac
 model-common
 onslaught
 portals
+propmodels
 pyria
 rl
 shotgun