Tremulous Forum
Mods => Modding Center => Topic started by: WoGoMo on December 18, 2010, 05:50:22 am
-
Since I started testing my mod (http://tremulous.net/forum/index.php?topic=14818.0), I seem to have found that there are maps that contain no classes named 'info_alien_intermission', 'info_human_intermission', and 'info_player_intermission'. For example, Karith doesnt seem to have them and there is no way to see whats in the .map file as there isnt one in the pk3 file.
Now I find myself asking for assistance again as I have no idea where these values are loaded by the server on a normal map and how they are created (for reference).
Can someone tell me where in the code the server does this? What I want is to add it to the map during runtime (via g_admin_specint(), G_LayoutSetIntermission(), and G_LayoutLoad()) if it doesnt already have it.
BTW, my patch can be downloaded here (http://sirclan.no-ip.org/wogomo/wogomo.patch).
Any help offered would be very much appreciated. Thanks.
-
But they have to have info_player_intermission...
-
But the have to have info_player_intermission...
I know right? But on Karith, for some reason, the following code:
spot = G_Find( spot, FOFS( classname ), "info_alien_intermission" );
returns NULL. Same thing happens for info_human_intermission and info_player_intermission.
-
It turns out Karith has 2x info_player_deathmatch/info_player_start (with the other being between window corridor and large stairs room). AU rox btw.
-
Can someone tell me where in the code the server does this?
grep is your friend and if it doesn't help, start looking in likely places until you find what you're looking for. Like anyone else.
Look in src/game/g_client.c at G_SelectAlienLockSpawnPoint and G_SelectHumanLockSpawnPoint, and at FindIntermissionPoint in src/game/g_main.c
-
grep is your friend and if it doesn't help, start looking in likely places until you find what you're looking for. Like anyone else.
Grep is already my friend and has been for a very long time. Yes I have used it to find 'info_xxxx_intermission' and it only shows me how to get it from a map that HAS it. What I am hoping to find is how to allocate/create the entity/object (or whatever u call it) if it doesnt exist in the map.
Look in src/game/g_client.c at G_SelectAlienLockSpawnPoint and G_SelectHumanLockSpawnPoint, and at FindIntermissionPoint in src/game/g_main.c
These functions run after the map have already been loaded and tries to find a pre-spawn point in the map. I do understand that it first looks for info_xxxxx_intermission, and if those do not exist then, it looks for info_player_deathmatch. Not really what I am looking for which is how to create 'info_xxxx_intermission' when it does not exist.
Anyway, thanks very much for the explanation.
-
It turns out Karith has 2x info_player_deathmatch/info_player_start (with the other being between window corridor and large stairs room). AU rox btw.
Karith has always struck me as odd, ever since I found out about the glitch egg bug which allows aliens to spawn outside the map. Ever since I found out that it doesnt have intermission points, I guess I cant help but think that the map is somewhat broken.
-
Not really what I am looking for which is how to create 'info_xxxx_intermission' when it does not exist.
You allocate/reuse an entity with G_Spawn() and set it up yourself
-
You allocate/reuse an entity with G_Spawn() and set it up yourself
Thank you very much.
Update 2010-12-22: Haven't had time to do much about this just yet. Meanwhile I've put in a few very trivial changes involving /callvote map change/nextmap/restart.