How to force default spawn locations before scripting works


(G0-Gerbil) #41

That’s my point though - merely changing a default spawn location won’t affect what people can do via the console - in other words, hiding a TWO and setting the autospawn properly will make people spawn correctly who only ever set their spawn points via limbo, but it’s not enough to stop those who change spawns via console.

My reading of reyalP’s comments was that, via the console / binds, you can manually set your preferred spawn point to ANY TWO - whether it’s visible or not, and whether it’s your team’s or not (please correct me if I mis-interpreted that). Hence, for the ammo racks, allies set their default spawn to the Axis base TWO, and well, I dunno about the side rooms for axis via console, although I do know if you manually click on that TWO you spawn there, so nothing particularly fancy about that (although trying to read between the lines on oasis, is the implication that there are in fact 2 TWOs in the axis base? - one visible on limbo, one not?).

BTW out of curiosity, does setting your default spawn via the limbo screen reset on pure map resets (as opposed to map resets and round starts, which used to be the case and killed the ability to spawn elsewhere right at the beginning of the round) - IE if I choose the east beach on battery in one round, and then (boring battery-only server!) in the next round it remains on the east beach or goes back to the standard west beach?

Edit:

Got my east and west mixed in that last sentence :slight_smile:


(SCDS_reyalP) #42

You can always use any TWO with /setspawnpt. This isn’t a bug or exploit, its an undocumented feature (it existed in a slightly different form in RTCW too). It lets you do things that the UI wouldn’t let you, such as returning to autospawn mode after you have manually selected a spawn.

The ownership of a TWO has absolutely nothing to do with where you can spawn. If you don’t want players of the particular team to spawn in a particular place, you need to make those spawnpoint entities (team_CTF_<color>spawn) inactive. alerting the TWOs just changes the stuff for the UI.

Which TWO a player has selected (either in the UI, or with setspawnpt, the two are exactly equivalent) has nothing to do with where other players can spawn.

Which TWO a teams autospawn is set to has no effect on where the other team can spawn.

The above are very simple bits of code, and they just don’t interact in they ways that have been suggested.

What follows is a technical description of why the above is true:
A TWO provides

  • a location that players can choose to spawn as near as possible to.
  • a name for that location.
  • a team specific icon on the limbo menu.
    TWOs are read from the .bsp and assigned numbers (from 0 to N). This means they are fixed for a given .BSP file, but not in any predictable order, and not fixed over different compiles of the same map.

setspawnpt selects which TWO a player wants to spawn near, using the currently available team_CTF_<color>player entities. This selection is stored in the clients session data, so survives map resets, but there is code to make sure it is cleared on map changes. If you use setspawnpt X, it selects TWO #X-1. setspawnpt 0 is a special case which tells the game to use the ‘autospawn’ location.

The autospawn location is set by the script, and stored per team in a global variable, as a TWO number. It is reset to 0 on map resets (along with all entity state, including script state). This means if a player chooses autospawn, and spawns before the autospawn is set, they will get the equivalent of having done /setspawnpt 1, spawning as close as possible the first TWO in the .bsp.

It is worth noting that the autospawn does not change anything in the clients session data. It is checked when the client actually goes to spawn. It also does not affect the team_CTF_<color>spawn entities in any way.

If you setspawnpt to a number < 0 or > 15, it will be as if you setspawnpt 0. If you select a spawn point that doesn’t exist (say /setspawnpt 10, on a map that only has 5) it will be as if you set your spawnpoint to a TWO at the origin of the map.

There is one more factor that controls if you can spawn at a given team_CTF_<color>spawn. If the spawnpoint nearest your desired TWO would cause you to spawn inside another player, the game picks the next nearest, until it finds one that is clear. If it can’t find one, it just spawns you inside another player…

I did some more digging in the various maps. It turns out that, in supplydepot2, the 'first" TWO is the one for the allies first spawn. The way the map is laid out, this is very nearly equidistant between the flag and the axis back spawns. The first few axis players will always spawn at the flag (in the corner nearest that wobj). As these spawns fill up, the ones at the axis back spawn will be the nearest. (this seems odd, but if you go way up in the sky with noclip, it makes sense). That explains why not all players would spawn back.

To specifically respond to EBs post, there isn’t much to say. The general statements about bugs and timing are speculative, and don’t tell us anything about the problem at hand.

The only concrete statement I see is that one teams autospawn somehow affects the where the other spawns, but this simply isn’t true. If the supplydepot script with only the wait changes had a spawn problem, this wasn’t the cause. Lacking any other facts, I can only speculate that it was an error in testing. That can happen to any of us. When I first tested this, I forgot that ET always looks in .pk3s first, even if sv_pure is 0, and so tested the old script thinking I was testing the new one. Ooops :banghead:

The fact that some of the official maps get away with a 500 wait doesn’t mean anything in particular. Looking at them in more detail confirms what I have written above:

On radar the first TWO is at the CP. In this case, it means axis player will spawn at the flag, unless perhaps the flag room is really full. On fueldump, the ‘first’ TWO is the tunnel. On goldrush, the first one is at the tank.

So in other words, the maps that got lucky with entity order have long waits…

Furthermore, you can see the effect of players spawning before autospawn is set on the above maps. Players spawn in slightly different places on the first spawn of the map, compared to subsequent respawns.


(EB) #43

<< I never said it was, you ASSUME I said that. Alot of assuming in here, huh ?
->So if the allied spawns are active at the forward flag during warmup, that even at map start (even though everything supposedly resets), that the autospawn setting would retain the allied team to the back location. -SIMPLE-, cut and dry. Is it perfect ? NO, but neither is the wait of 150. These are just well educated guesses (theories) we use to solve the problems. Can we agree on that ?
Also >>>I did not test the wrong file, you guys are appearing more malicious by the day.

-No one will test the map but they will state I am wrong ? What is the deal with that ?

[-I did not realize Reyalp had already stated that the wait time was over 500 on some stock maps. I made a mistake by not reading behind. oh well.]

So what I said has no bearing on anything for you guys(granted it wasn’t saying much, just making general points), but in my eyes, what ReyalP said does not fill the holes either.---- If everything resets at map start anyways, why were the allied spawns active in the forward bunker ? —They are clearly inactive in map setup, but with the bug in play, they become activated. So how exactly does that go ? “So the map resets all entities, except when this occurs ?..makes no sense. Double talk.” Clearly the .map file has the proper setup for things to work correctly but the bug arises. —So this leads me into the thought that “all entities are reset only when a wait of 150 is used” for all cases, but what does any wait in the game_manager have to do with the map/entity reset and restart ? Doubletalk. If the spawns are inactive, they should not allowspawning but in some instances the changing of something deeper than we know about changes it AND this was not solely fixed by a wait of 150. Can someone get the gonads to go and test the map ? How long do you think I will sit here and take this punishment ? —Forever.

Someone asked how to recreate the bug as i tested, I told you what I used. If you can’t figure out how to get the spawn switched a couple of times prior to map start, you don’t even belong talking in here, sorry.

Now besides for the good points, there are things ReyalP has said that he even admits are conjecture. I admit I use conjecture too, maybe we don’t see things the same…that’s all fine, I can live with that.
JUST REMEMBER : I have tested it and proved it to myself, even if I did re-test it…how would I prove it to you guys ? You’re all so set on proving me wrong and discrediting any idea I have had that even if I brought a box with all the bells and whistles of proof you’d find ways to deny it anyways.------- Afterall, the proof I have comes from using/testing it, and the proof others have comes from their using it, both the same type of proof but about different things, although it’s ok for one to be better than the other ? For some really odd reasoning even though both types of tests are the same and they both bring about heresaid “proof”.

I speculate alot as we all do. ----I think we have our wires crossed.
Wait 150, team-specific autospawn set, it works and no bugs have arose.


(SCDS_reyalP) #44

Well, you wrote:

With this being related in; I had changed the autospawn to the ‘allied start’ (in supply depot) to alleviate any sort of re-curring problem for the autospawns

I understood that to mean that you thought the autospawn had some bearing on the problem of the axis spawning the wrong place when the map starts. If you mean something else, it certainly isn’t clear. If that is what you meant, it is incorrect.

->So if the allied spawns are active at the forward flag during warmup, that even at
map start (even though everything supposedly resets), that the autospawn setting would retain the allied team to the back location. -SIMPLE-, cut and dry. Is it perfect ? NO, but neither is the wait of 150.

The allies never spawned at the wrong place, so its hard to see what this would accomplish, even if things didn’t reset. But the fact is, everything does reset. There is no ‘supposedly’ to it.

These are just well educated guesses (theories) we use to solve the problems. Can we agree on that ?

No. I am not guessing. I am reading the game code, and understanding what it does, and verifying that by running the game and looking at its internal state.

-No one will test the map but they will state I am wrong ? What is the deal with that ?

Test how, with what expected result ? If you mean cap the flag in warmup, and see where the axis spawn, I have done that. With only 1 player on each team, I never had the axis spawn back, even without the wait fix. (which is expected, for the reasons I described in my previous post. You need to have a certain number of spawn points occupied before people end up in the back.)

I have a choice between believing you made a mistake in testing, or that I have completely misunderstood some fairly simple C code. It may be arrogant of me, but I choose the latter.

If everything resets at map start anyways, why were the allied spawns active in the forward bunker ? —They are clearly inactive in map setup, but with the bug in play, they become activated.

Huh ? the allied spawns are not active. I have never, ever seen the allies spawn at the flag on map start. If the allied spawns were active, that would be a completely different bug than the axis spawning back.


(EB) #45
the·o·ry   
n. pl. the·o·ries
   2. The branch of a science or art consisting of its explanatory statements, accepted principles, and methods of analysis, as opposed to practice: a fine musician who had never studied theory.
   6. An assumption based on limited information or knowledge; a conjecture.

Isn’t that what this whole thread is about ? hmmmmm…I think I am right again.
Sounds like you have messed up knowledge of definitions. WHAT YOU HAVE ARE THEORIES Whether you like it or not. Get with it.

Last of all I disagree with you and you contradict yourself in several areas, but never address the facts as I ask them. You’re merely out to avoid the pertinent and deny the applicable but insist a theory [that is A THEORY] is not a theory and that it is correct.

I am withdrawing myself from any further postings in here as it is clear I am on the chopping block and that some people do NOT have the will or comprehension to see beyond what they think to be right.

I disagree with you…that is all. Have a good day, hasta lavista…carry on with your condescending remedial insults that you use in your sly side-mannered context…I am going to help someone who needs help. Double talk people as much as you like, they seem to enjoy it, I will be progressing someone else along the road to becoming a mapper as I have the will to help people, not condescend them.

-Cheers :cool:

P.S.–I always wondered why alot of people have had a bad opinion of this mapping community, I am slowly coming to see. <<not an intended as an insult, just my opinion.
As for the other questions you pose to me, I have already answered them, stop interpreting my statements and read them for what they are.


(G0-Gerbil) #46

Look - despite your clearly intentional stabs and attempts at one-upmanship (failing due to the lack of intelligence to do it maturely) you’ve actually added nothing of actual value to this thread. Simply claiming ‘I’m right’ doesn’t work - this is why reyalP has proved his ‘theories’ several times over.
Naturally I, on the other hand, have chosen to take the childish approach simply to try to provoke you into actually proving some of your theories to shut me up. Because basically I care about getting to the bottom of things (while having fun at the same time) - although I’ll admit I often appear to have taken the typing equivalent of large quantities of laxatives to achieve my goal(s).

All I ask for is that you:

A) Be specific about what you are claiming is and isn’t the problem.
B) Prove you are right and your fix(es) work.

Given you believe you ARE right, what’s stopped you taking the high-ground, doing A and B above, and making me look like the childish retard I clearly am?
How much do I have to set myself up for a fall before you’ll do it and help the community? Don’t people like me deserve to be publically humiliated and taken down a peg or six? :slight_smile:
Eww purple sucks…