From: LegendaryGuard Date: Thu, 23 Dec 2021 16:46:12 +0000 (+0100) Subject: Add and fix models, still prop models interaction needs to do more (TODO and TOFIX)... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=528e6f6b7f87d2f773fd8c6bc6b6916a6af7bc1b;p=xonotic%2Fxonotic-data.pk3dir.git Add and fix models, still prop models interaction needs to do more (TODO and TOFIX)... --- diff --git a/models/containers/barrel01.blend b/models/containers/barrel01.blend deleted file mode 100644 index 243abcf80..000000000 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 index 32713d0e5..000000000 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 index ab7266c3f..000000000 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 index d80a68ce4..000000000 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 index d842a9e95..000000000 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 index 0b9a2db37..000000000 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 index 99228e499..000000000 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 index becda4d82..000000000 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 index 24e9612cb..000000000 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 index 55abff82a..000000000 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 index b539aebbe..000000000 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 index 0a8f6115d..000000000 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 index 04244f646..000000000 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 index cd3c2313a..000000000 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 index 8152f18c5..000000000 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 index 2d60cdcc6..000000000 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 index ce33db382..000000000 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 index d381490b2..000000000 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 index 3b0bbbfc5..000000000 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 index 738744479..000000000 --- a/models/containers/if_isnt_loading.txt +++ /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 index 000000000..243abcf80 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 index 000000000..32713d0e5 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 index 000000000..ab7266c3f 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 index 000000000..d80a68ce4 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 index 000000000..d842a9e95 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 index 000000000..0b9a2db37 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 index 000000000..99228e499 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 index 000000000..becda4d82 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 index 000000000..24e9612cb 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 index 000000000..55abff82a 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 index 000000000..b539aebbe 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 index 000000000..0a8f6115d 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 index 000000000..04244f646 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 index 000000000..cd3c2313a 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 index 000000000..8a434b537 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 index 000000000..d05c35791 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 index 000000000..8152f18c5 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 index 000000000..2d60cdcc6 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 index 000000000..ce33db382 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 index 000000000..d381490b2 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 index 000000000..3b0bbbfc5 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 index 000000000..738744479 --- /dev/null +++ b/models/props/if_isnt_loading.txt @@ -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 diff --git a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc index b178402e5..d6dcc7c47 100644 --- a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc +++ b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qc @@ -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; } } diff --git a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh index 0c35a8990..ed4021b46 100644 --- a/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh +++ b/qcsrc/common/gamemodes/gamemode/mh/sv_mh.qh @@ -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 index 000000000..8272f933f --- /dev/null +++ b/scripts/propmodels.shader @@ -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 diff --git a/scripts/shaderlist.txt b/scripts/shaderlist.txt index fcc9d3c64..7abae7003 100644 --- a/scripts/shaderlist.txt +++ b/scripts/shaderlist.txt @@ -7,6 +7,7 @@ hlac model-common onslaught portals +propmodels pyria rl shotgun