Greater Than 16v16 Spawn Points?


(demoneye) #1

Hi,

As you guys over there put together “Market Garden” which is regularly played with 32v32, can you advise on spawn point selection on a map with more than 16v16 spawn points and a central spawn flag (like in mp_depot)?

I understand that the code will only do correct spawn point selection with 16v16. Is that correct? Will there ever be a patch that will allow for 32v32 and correctly select player spawn points?

DeMoNeye


(kat) #2

I think there was a thread on RTCW.co.uk that said you needed to do some scripting to get more than 16 SPpoints working correctly, not too sure though.


(demoneye) #3

I’ve had a look through the forums there, and there’s nothing of any use. I understand the principles of controlling spawn points from scripts and that’s not what am after.

If you have your spawning selection set to autopick, it should spawn you closest to your primary objective.

The problem comes if you have 32 initial spawns and 32 forward spawns that have been activated by a captured forward spawn flag.

The code has an array (I’m no coder, but someones checked this for me) for checking where you should spawn that is limited to 32 spawns, so 32 of the potential ones get missed and you will always spawn at the initial spawn points! Phew…

Do you know if a request can go to patch the code to allow for correct spawning in 32v32 games.

DeMoNeye


(kat) #4

I can’t help personally (more SP than MP), but having explained what you’re trying to do in greater detail should help djbob or sock solve the problem or at least point you in the right direction (come to think of it, where is the sockmiester haven’t seen him around here for quite a while…!!)

Have you asked this on rtcw? reyalP and Gerbil seem pretty clued up gurus for MP related stuff…!?


(demoneye) #5

I’ve done a lot of testing on this - and got Fretn to look in the code and he dragged out he the appropriate piece of code involved and, yep, that’s the problem area.

I want to raise it as an official bug in RtCW and Mike Denny at GMI recommended I raise it here.

I would really like to release my map as 32v32, but until it’s fixed, I just can’t.

If I remember, I think reyalIP was the first to point out the problem to me.

DeMoNeye

<font size=-1>[ This Message was edited by: demoneye on 2002-12-04 22:34 ]</font>


(SCDS_reyalP) #6

You should be able to have 32v32 with a forward deployment flag. What you will have to do is use script to turn off 16 of the original spawnpoints, and turn on 16 forward spawnpoints. When you have the flag, no more than 16 will be able to spawn at a given location, but I don’t think this should be a big issue. More than half a 32 player team dying in one spawn period, and all of them having the same spawn point selected seems like it shouldn’t happen very often. If it does, a couple of people will spawn at the other location.

The above is assuming a map like depot, where a number of people would reasonably set the spawnpoint to the non foward location. If you were making a map like tram, you could just turn off all the 32 original spawn points and turn on 32 forward spawn points.

Mind you, I don’t see any reason that array couldn’t be bigger.


(demoneye) #7

Hi,

The trouble occurs when a player leaves their spawn selection as “autopick”. It’s then down to code to decide where the player spawns. The code tries to spawn you closest to primary objective for your team, and that’s where the array fall foul. It only selects from a possible 16 spawns, and not 32.

As in depot, my map is a dual objective, with a central forward spawn position that is right in the middle of the map. So some players may want to spawn at original positions, and protect their objective, and some will want to forward spawn. If I inactivate the “back” spawns, they won’t be able to spawn and protect their objective.

A code amendment is what is really needed - am I in the right place to actually get this put forward for placement in an official patch?

DeMoNeye

<font size=-1>[ This Message was edited by: demoneye on 2002-12-05 21:32 ]</font>


(SCDS_reyalP) #8

Where is it limited to 16 ? I was thinking of


#define	MAX_TEAM_SPAWN_POINTS	32
and
gentity_t	*spots[MAX_TEAM_SPAWN_POINTS]

in SelectRandomTeamSpawnPoint

Unless I totally mis-read it, that should work fine for up to 32 active spawnpoints. Could your friend have been looking at an older release of the code ? The above is from 1.33


(demoneye) #9

Damn - I wish I knew C!

The code you refered to “SelectRandomTeamSpawnPoint” is for random selection - what does the code do if you have “autopick” set on the limbo menu - how does it autopick?

I’m trying to get hold of Fretn at the moment to dig out the offending piece of code again.

DeMoNeye


(fretn) #10

demoneye, I found the same line of code …

greetings,

fretn


(demoneye) #11

OK - My wrong I guess - don’t know where I got the idea there was a problem with forward spawning and central spawn flags!

This is how I’ve built my map and coded my script, seems to test OK, but is it correct?

32 team_CTF_redplayer and 32 team_CTF_blueplayer for the intial spawns.

32 team_CTF_redspawn at intial Axis spawn position, 16 of these with a target name of axisbackspawn.

32 team_CTF_bluespawn at initial Allied spawn position, 16 of these with a target of alliedbackspawn.

16 team_CTF_redspawn at central spawn location, with a target of axisforwardspawn.

16 team_CTF_bluespawn at central spawn location, with a target of alliedforwardspawn.

team_WOLF_checkpoint at central spawn location, with a scriptname of flag_respawn_obj.

Phew… OK, here’s the code.

Outside of game_manager

flag_respawn_obj // RESPAWN FLAG
{
	trigger axis_capture
	{
		trigger game_manager obj_flagred
	}
	trigger allied_capture
	{
		trigger game_manager obj_flagblue
	}
}

Inside game_manager, spawn section

accum 2 set 0 // Set to 1 if Axis have captured it at least once
accum 3 set 0 // Set to 1 if Allied have captured it at least once

and these triggers.

trigger obj_flagred
{
	// Change the objective state internally, so UI can update, etc.
	// Axis takes control of objective #5
	wm_set_objective_status		5	0
	// Some kind of UI pop-up to alert players
	wm_announce	"Axis captures the Foundry Deployment Area!"
        accum 2 set 1
        alertentity axisforwardspawn
        alertentity axisbackspawn
	accum 3 abort_if_equal 0
	alertentity alliedforwardspawn
	alertentity alliedbackspawn
}

trigger obj_flagblue
{
	// Change the objective state internally, so UI can update, etc.
	// Allied takes control of objective #5
	wm_set_objective_status		5	1
	// Some kind of UI pop-up to alert players
	wm_announce	"Allies capture the Foundry Deployment Area!"
	accum 3 set 1
	alertentity alliedforwardspawn
        alertentity alliedbackspawn
        accum 2 abort_if_equal 0
        alertentity axisforwardspawn
        alertentity axisbackspawn
}

Phew, again, so…

Each side will start with initial spawns at home base. If they capture the flag, then the forward spawns for that side are activated, and the 16 back spawns are turned off. If the other side has the forward spawns at the moment, then their forward spawns are deactivated. That means there will always be 16 spawns available at base, and 16 other “floating” spawns. Like reyalIP says, the chance of 16 players wanted to respawn all at the same time is pretty small.

Accum 2 and 3 are used to check if there is a need to reset the spawns for the other side.

Well, what do you think, is this OK?

DeMoNeye


(SCDS_reyalP) #12

The code you refered to “SelectRandomTeamSpawnPoint” is for random selection - what does the code do if you have “autopick” set on the limbo menu - how does it autopick?

No actually SelectRandomTeamSpawnPoint does handle autopick. Welcome to the wonderful world of descriptive identifiers :confused:

edit:
What you posted looks pretty much like what I had in mind. I din’t trace it line by line, really what you need to do now is round up 64 suckers to beta test it :razz: Actually, I guess you could do the same setup with a much lower number.

<font size=-1>[ This Message was edited by: SCDS_reyalP on 2002-12-06 23:46 ]</font>