![]() |
cz map dir how?
Not sure if this should be posted here or in the dev forums.
CZ loads maps from two different directories. ..\condition zero\cstrike ..\condition zero\czero In a metamod plugin running under cz on a LAN game: GET_GAME_DIR (); returns "czero" always. gpGlobals->mapname is jsut the map name. 1) So how can I find the full path to the loaded map? 2) Also, for the standard cz maps they must be bundled in some cache. How would I load/save these maps in game form my metamod plugin? I guess I can't and would have to install them as a custom map in the cstrike folder with a different name and load them from there?? Tx. |
Re: cz map dir how?
the game directory for CZ is "czero", hence the maps' official directory is "../condition zero/czero/maps".
To extract stuff (like the official maps) from Steam's GCF cache, use the LOAD_FILE_FOR_ME() macro. Look in my PMtools plugin to find out how it works. You can't save stuff back into the GCF file, though. If you want some code to create the directory for you in case it doesn't exist, use the _mkdir() macro. I'm moving this to the coders section, alright? |
Re: cz map dir how?
Quote:
I am reading / modifying / writing the bsp file in a mm dll. If it is a non-cz map then it is "probably" in the ../condition zero/cstrike/maps folder. But it doesn't HAVE to be. Someone could install a custom map in the ../condition zero/czero/maps or ../condition zero/cstrike/maps folder. How can I know? I need the complete physical path to open / modify / write out he bsp. I guess I could check for it in both places and the keep track of where it is. Not a big deal since it is one of two places, but I thought there would be a cleaner way.... Tx. |
Re: cz map dir how?
I don't think CZ or non-CZ maps will go in different places. The game is Condition Zero, thus the game directory is "czero". The "cstrike" one is just for external game resources that come straight from CS, kind of like what the "valve" one was for Counter-Strike for Half-Life elements.
I would stick to "czero/maps" without worrying much if I were you. |
Re: cz map dir how?
If I remember it right, there is a "gamedir_fallback" item in CZero liblist.gam which is set to "cstrike". As this the HL engine will find data files in the czero->cstrike->valve order.
|
Re: cz map dir how?
Thanks for the replys guys.
Whistler: I never knew about this: fallback_dir "cstrike" I knew cz works fine with maps installed in either the czero or cstrike folders. PM. Good call again. As far as I need to be concerned, the maps will have to be correctly installed off of czero period. I guess some installer put them in my cstrike folder (or even the cz install?) and I felt I had to support this. I don't! So PM, Whistler. What is you focus now? Are you totally cs source and the new source sdk? Are you still working with classic cs/cz ? Tx... |
Re: cz map dir how?
I still code my bot when I have time ; I am neither totally Source SDK nor HL1 SDK. Find out why here:
http://forums.bots-united.com/showthread.php?t=3121 heh ;) |
Re: cz map dir how?
I don't have access to HL2 and its SDK (well, I don't plainly say "have" now as it's inaccurate, and that's also what Valve guys like to say :)), as I'm one of those who refuse to buy HL2 due to the Steam.
Also I don't have a fast machine so I didn't even bother trying the demo or a warez non-steam version :) |
Re: cz map dir how?
Steam works very well for me; thanks to it Valve just made HL2 dickhead proof, which is a very good thing IMO. Believe me, HL2 is worth your money, and Steam shouldn't be a problem for you when you're a normal user. The only people Steam causes trouble to is wannabe crackers, because they can't do what they want. But I tell you, from a coder's point of view, all the tools you need exist and there's nothing you can't do with Steam that you could do with the pre-Steam Half-Life !
And HL2 runs very well on slow machines. The Source engine really kicks ass for that. Not only the game deserves your money, but IMO Valve deserves it too. |
Re: cz map dir how?
Quote:
I have been running cz and starting to hack it with some mm plugins but it seems lacking. Besides I dislike the hack + (poorly documented) nature of how we have to develop on this platform. I am going to buy HL2/CS Source and check it out. The Steam stuff FINALLY seems to be working well and has some advantages. If HL2 kicks as you say I think I will drop everything but the new stuff. and be very happy to move on. tx |
All times are GMT +2. The time now is 23:15. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.