]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Make player sounds per-skin instead of per-model like in Xonotic. Will be needed...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 20 Feb 2013 14:51:19 +0000 (16:51 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 20 Feb 2013 14:51:19 +0000 (16:51 +0200)
data/models/player/fox.iqm.sounds [deleted file]
data/models/player/fox.iqm_0.sounds [new file with mode: 0644]
data/models/player/fox.iqm_1.sounds [new file with mode: 0644]
data/qcsrc/server/cl_player.qc
data/qcsrc/server/miscfunctions.qc
docs/TODO.txt

diff --git a/data/models/player/fox.iqm.sounds b/data/models/player/fox.iqm.sounds
deleted file mode 100644 (file)
index 1dd83fc..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//TAG: female
-//affirmative sound/player/fox_female/coms/affirmative 0
-attack sound/player/fox_female/coms/attack 2
-//attacking sound/player/fox_female/coms/attacking 0
-attackinfive sound/player/fox_female/coms/attackinfive 0
-coverme sound/player/fox_female/coms/coverme 0
-defend sound/player/fox_female/coms/defend 0
-//defending sound/player/fox_female/coms/defending 0
-//droppedflag sound/player/fox_female/coms/droppedflag 0
-//flagcarriertakingdamage sound/player/fox_female/coms/flagcarriertakingdamage 0
-freelance sound/player/fox_female/coms/freelance 2
-//getflag sound/player/fox_female/coms/getflag 0
-incoming sound/player/fox_female/coms/incoming 0
-meet sound/player/fox_female/coms/meet 0
-needhelp sound/player/fox_female/coms/needhelp 1
-//negative sound/player/fox_female/coms/negative 0
-//onmyway sound/player/fox_female/coms/onmyway 0
-//roaming sound/player/fox_female/coms/roaming 0
-//seenenemy sound/player/fox_female/coms/seenenemy 0
-seenflag sound/player/fox_female/coms/seenflag 0
-taunt sound/player/fox_female/coms/taunt 5
-pred sound/player/fox_female/coms/pred 5
-prey sound/player/fox_female/coms/prey 5
-teamshoot sound/player/fox_female/coms/teamshoot 4
-death sound/player/fox_female/player/death 3
-drown sound/player/fox_female/player/drown 0
-fall sound/player/fox_female/player/fall 1
-falling sound/player/fox_female/player/falling 0
-gasp sound/player/fox_female/player/gasp 0
-jump sound/player/fox_female/player/jump 0
-grab sound/player/fox_female/player/grab 0
-swallow sound/player/fox_female/player/swallow 2
-digest sound/player/fox_female/player/digest 0
-regurgitate sound/player/fox_female/player/regurgitate 2
-regurgitate_prepare sound/player/fox_female/player/regurgitate_prepare 0
-gurgle sound/player/fox_female/player/gurgle 0
-pain25 sound/player/fox_female/player/pain25 0
-pain50 sound/player/fox_female/player/pain50 0
-pain75 sound/player/fox_female/player/pain75 0
-pain100 sound/player/fox_female/player/pain100 0
diff --git a/data/models/player/fox.iqm_0.sounds b/data/models/player/fox.iqm_0.sounds
new file mode 100644 (file)
index 0000000..1dd83fc
--- /dev/null
@@ -0,0 +1,40 @@
+//TAG: female
+//affirmative sound/player/fox_female/coms/affirmative 0
+attack sound/player/fox_female/coms/attack 2
+//attacking sound/player/fox_female/coms/attacking 0
+attackinfive sound/player/fox_female/coms/attackinfive 0
+coverme sound/player/fox_female/coms/coverme 0
+defend sound/player/fox_female/coms/defend 0
+//defending sound/player/fox_female/coms/defending 0
+//droppedflag sound/player/fox_female/coms/droppedflag 0
+//flagcarriertakingdamage sound/player/fox_female/coms/flagcarriertakingdamage 0
+freelance sound/player/fox_female/coms/freelance 2
+//getflag sound/player/fox_female/coms/getflag 0
+incoming sound/player/fox_female/coms/incoming 0
+meet sound/player/fox_female/coms/meet 0
+needhelp sound/player/fox_female/coms/needhelp 1
+//negative sound/player/fox_female/coms/negative 0
+//onmyway sound/player/fox_female/coms/onmyway 0
+//roaming sound/player/fox_female/coms/roaming 0
+//seenenemy sound/player/fox_female/coms/seenenemy 0
+seenflag sound/player/fox_female/coms/seenflag 0
+taunt sound/player/fox_female/coms/taunt 5
+pred sound/player/fox_female/coms/pred 5
+prey sound/player/fox_female/coms/prey 5
+teamshoot sound/player/fox_female/coms/teamshoot 4
+death sound/player/fox_female/player/death 3
+drown sound/player/fox_female/player/drown 0
+fall sound/player/fox_female/player/fall 1
+falling sound/player/fox_female/player/falling 0
+gasp sound/player/fox_female/player/gasp 0
+jump sound/player/fox_female/player/jump 0
+grab sound/player/fox_female/player/grab 0
+swallow sound/player/fox_female/player/swallow 2
+digest sound/player/fox_female/player/digest 0
+regurgitate sound/player/fox_female/player/regurgitate 2
+regurgitate_prepare sound/player/fox_female/player/regurgitate_prepare 0
+gurgle sound/player/fox_female/player/gurgle 0
+pain25 sound/player/fox_female/player/pain25 0
+pain50 sound/player/fox_female/player/pain50 0
+pain75 sound/player/fox_female/player/pain75 0
+pain100 sound/player/fox_female/player/pain100 0
diff --git a/data/models/player/fox.iqm_1.sounds b/data/models/player/fox.iqm_1.sounds
new file mode 100644 (file)
index 0000000..1dd83fc
--- /dev/null
@@ -0,0 +1,40 @@
+//TAG: female
+//affirmative sound/player/fox_female/coms/affirmative 0
+attack sound/player/fox_female/coms/attack 2
+//attacking sound/player/fox_female/coms/attacking 0
+attackinfive sound/player/fox_female/coms/attackinfive 0
+coverme sound/player/fox_female/coms/coverme 0
+defend sound/player/fox_female/coms/defend 0
+//defending sound/player/fox_female/coms/defending 0
+//droppedflag sound/player/fox_female/coms/droppedflag 0
+//flagcarriertakingdamage sound/player/fox_female/coms/flagcarriertakingdamage 0
+freelance sound/player/fox_female/coms/freelance 2
+//getflag sound/player/fox_female/coms/getflag 0
+incoming sound/player/fox_female/coms/incoming 0
+meet sound/player/fox_female/coms/meet 0
+needhelp sound/player/fox_female/coms/needhelp 1
+//negative sound/player/fox_female/coms/negative 0
+//onmyway sound/player/fox_female/coms/onmyway 0
+//roaming sound/player/fox_female/coms/roaming 0
+//seenenemy sound/player/fox_female/coms/seenenemy 0
+seenflag sound/player/fox_female/coms/seenflag 0
+taunt sound/player/fox_female/coms/taunt 5
+pred sound/player/fox_female/coms/pred 5
+prey sound/player/fox_female/coms/prey 5
+teamshoot sound/player/fox_female/coms/teamshoot 4
+death sound/player/fox_female/player/death 3
+drown sound/player/fox_female/player/drown 0
+fall sound/player/fox_female/player/fall 1
+falling sound/player/fox_female/player/falling 0
+gasp sound/player/fox_female/player/gasp 0
+jump sound/player/fox_female/player/jump 0
+grab sound/player/fox_female/player/grab 0
+swallow sound/player/fox_female/player/swallow 2
+digest sound/player/fox_female/player/digest 0
+regurgitate sound/player/fox_female/player/regurgitate 2
+regurgitate_prepare sound/player/fox_female/player/regurgitate_prepare 0
+gurgle sound/player/fox_female/player/gurgle 0
+pain25 sound/player/fox_female/player/pain25 0
+pain50 sound/player/fox_female/player/pain50 0
+pain75 sound/player/fox_female/player/pain75 0
+pain100 sound/player/fox_female/player/pain100 0
index c0887e40ab197aa7869cb645a8433ddb21273f8f..4ee6f9b9fb3457c290919071cffef017283f204d 100644 (file)
@@ -1194,14 +1194,18 @@ void LoadPlayerSounds(string f, float first)
 }\r
 \r
 .float modelindex_for_playersound;\r
+.float skin_for_playersound;\r
 void UpdatePlayerSounds()\r
 {\r
        if(self.modelindex == self.modelindex_for_playersound)\r
+       if(self.skin == self.skin_for_playersound)\r
                return;\r
        self.modelindex_for_playersound = self.modelindex;\r
+       self.skin_for_playersound = self.skin;\r
        ClearPlayerSounds();\r
        LoadPlayerSounds("sound/player/default.sounds", 1);\r
-       LoadPlayerSounds(strcat(self.model, ".sounds"), 0);\r
+       if not(LoadPlayerSounds(strcat(self.model, "_", ftos(self.skin), ".", "sounds"), 0))\r
+               LoadPlayerSounds(strcat(self.model, ".", "sounds"), 0);\r
 }\r
 \r
 void GlobalSound(string sample, float chan, float voicetype, float vol)\r
index 33f6d4a69614e0bd3af5e21ae555beedb20b8d28..f16f60aa060f0e4ee2ae5a47232eba6002986c42 100644 (file)
@@ -1324,7 +1324,26 @@ void play2all(string samp)
 }\r
 \r
 void PrecachePlayerSounds(string f);\r
-void precache_all_models(string pattern)\r
+void precache_playermodel(string m)\r
+{\r
+       float globhandle, i, n;\r
+       string f;\r
+\r
+       precache_model(m);\r
+\r
+       globhandle = search_begin(strcat(m, "_*.sounds"), TRUE, FALSE);\r
+       if (globhandle < 0)\r
+               return;\r
+       n = search_getsize(globhandle);\r
+       for (i = 0; i < n; ++i)\r
+       {\r
+               //print(search_getfilename(globhandle, i), "\n");\r
+               f = search_getfilename(globhandle, i);\r
+               PrecachePlayerSounds(f);\r
+       }\r
+       search_end(globhandle);\r
+}\r
+void precache_all_playermodels(string pattern)\r
 {\r
     float globhandle, i, n;\r
     string f;\r
@@ -1337,8 +1356,7 @@ void precache_all_models(string pattern)
     {\r
                //print(search_getfilename(globhandle, i), "\n");\r
                f = search_getfilename(globhandle, i);\r
-               precache_model(f);\r
-               PrecachePlayerSounds(strcat(f, ".sounds"));\r
+               precache_playermodel(f);\r
     }\r
     search_end(globhandle);\r
 }\r
@@ -1362,11 +1380,11 @@ void precache()
     if (cvar("sv_precacheplayermodels"))\r
     {\r
         PrecachePlayerSounds("sound/player/default.sounds");\r
-        precache_all_models("models/player/*.zym");\r
-        precache_all_models("models/player/*.dpm");\r
-        precache_all_models("models/player/*.md3");\r
-        precache_all_models("models/player/*.psk");\r
-               precache_all_models("models/player/*.iqm");\r
+        precache_all_playermodels("models/player/*.zym");\r
+        precache_all_playermodels("models/player/*.dpm");\r
+        precache_all_playermodels("models/player/*.md3");\r
+        precache_all_playermodels("models/player/*.psk");\r
+               precache_all_playermodels("models/player/*.iqm");\r
     }\r
 \r
     if (cvar("sv_defaultcharacter"))\r
index 0591f4ba815706739754e8e2861778f82de60e29..ea6ed7c3db8a87347c55158d37e686f4129a98db 100644 (file)
 \r
 - 0.8 BUG (reported): The biggest bug that I've noticed so far would be the fact that there's a horrible lag in the single-player campaign starting at level 4 (Gas Station). The maps themselves work fine when running through Instant Action, so it must have to do with something unique to the campaign mode itself - quite possible the Story dialogue that loops across the top of the screen. I don't know the cause, but it certainly needs to be fixed.\r
 \r
-- 0.8: Make character.sounds also depend on skin (eg: character_0.sounds). And / or make all character setups same as in Xonotic\r
-\r
 - 0.8: Prey - Use EF_NODRAW instead of self.alpha = -1\r
 \r
 - +0.9: Add some inclined HUD effect for more coolness, if it's possible. Maybe for the menu too\r
 - 0.8: Make some HUD backgrounds show when dead\r
 \r
 - 0.8 BUG: I think prey swallow pogress doesn't decrease for consumable items\r
+\r
+- 0.8 BUG: Someone's reporting swallow speed doesn't change with the cvar\r