Admer456 / halflife-adm-legacy

Advanced Development Mod - technical overhaul for Half-Life

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

info_player_start "Primary" flag

divinitycove opened this issue · comments

Essentially a flag for info_player_start entities where, if enabled, designates that info_player_start as the one to use in game if multiple are placed in a map. An issue I can see arising is when multiple entities are selected with "Primary", but it could then fall back on whatever priority system it used before?

commented

I think we can just use the very first one it finds with the Primary flag. I'm working on this at the moment.

commented

The stupid thing about HL SDK is that info_player_start isn't even its own entity class. Fortunately, it doesn't make this particular task difficult in any way, but it might be an obstacle in the future if we wanna do cool things with it (e.g. attaching an info_player_deathmatch onto a train).

commented

The original code would select the very first info_player_start. I changed it so that it now selects them randomly, and if it finds one with the "Primary" flag, pick the first found one. So if you have 20 info_player_starts followed by a single "primary" one, it'll spawn there. Here's the random behaviour for now:

https://i.imgur.com/Lj3wOnT.mp4

You can see the player gets spawned on different blocks there. If I set the "primary" flag on one of them, the player will always spawn there. Pushing changes soon...