mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-07-16 06:19:58 +00:00
P1: Source files - Copy 9 server stargate files + sg_constants.h + sg_weapons.cpp from StargateTCSource/sourcecode/ into game/server/stargate/ and game/shared/stargate/. - Add $Folder "Stargate" block to server_hl2mp.vpc and client_hl2mp.vpc. - Extend $AdditionalIncludeDirectories with stargate paths. P2/P3: Gamerules + player patches - hl2mp_gamerules.h: add TEAM_JAFFA=4, TEAM_UNAS=5 to team enum. - hl2mp_gamerules.cpp: preserve 5 Stargate spawn classnames in s_PreserveEnts[]; rename teams to Tau'ri/Goa'uld/Jaffa/Unas; rename game description to "StargateTC"/"StargateTC Teamplay". - hl2mp_player.cpp: EntSelectSpawnPoint now searches Stargate spawn classnames first (torri/goauld/marine/unas) with per-team fallback chain to combine/rebel/deathmatch. Build: 0 errors. Server.dll 13.19MB, client.dll 9.85MB. Runtime test: window title "StargateTC", live game launches, HEALTH 100 HUD renders, HL2MP MOTD shown, sky/world geometry renders. Response system loads 217 rules without crashing (was the original Mapbase+VS2022 heap-corruption point). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
64 lines
2.1 KiB
C++
64 lines
2.1 KiB
C++
//============= Copyright © StargateTC Source Team =============================
|
|
//
|
|
// info_player_torri / info_player_goauld — team-flavored multiplayer spawn
|
|
// markers. The entity translator (pipeline/stargate_pipeline/entities/translator.py)
|
|
// rewrites these to info_player_deathmatch + a "team" keyvalue at port time,
|
|
// so HL2DM's spawn picker handles them automatically. We still register the
|
|
// raw classnames here in case a hand-authored Source-side map uses them.
|
|
//
|
|
//==============================================================================
|
|
#include "cbase.h"
|
|
#include "stargate/sg_constants.h"
|
|
|
|
class CSGSpawnPoint : public CPointEntity
|
|
{
|
|
public:
|
|
DECLARE_CLASS( CSGSpawnPoint, CPointEntity );
|
|
void Spawn() override
|
|
{
|
|
BaseClass::Spawn();
|
|
SetSolid( SOLID_NONE );
|
|
}
|
|
virtual int PreferredTeam() = 0;
|
|
};
|
|
|
|
class CSGSpawnPointTorri : public CSGSpawnPoint
|
|
{
|
|
public:
|
|
DECLARE_CLASS( CSGSpawnPointTorri, CSGSpawnPoint );
|
|
int PreferredTeam() override { return StargateTC::TEAM_TORRI; }
|
|
};
|
|
LINK_ENTITY_TO_CLASS( info_player_torri, CSGSpawnPointTorri );
|
|
|
|
class CSGSpawnPointGoauld : public CSGSpawnPoint
|
|
{
|
|
public:
|
|
DECLARE_CLASS( CSGSpawnPointGoauld, CSGSpawnPoint );
|
|
int PreferredTeam() override { return StargateTC::TEAM_GOAULD; }
|
|
};
|
|
LINK_ENTITY_TO_CLASS( info_player_goauld, CSGSpawnPointGoauld );
|
|
|
|
class CSGSpawnPointMarine : public CSGSpawnPoint
|
|
{
|
|
public:
|
|
DECLARE_CLASS( CSGSpawnPointMarine, CSGSpawnPoint );
|
|
int PreferredTeam() override { return StargateTC::TEAM_TORRI; }
|
|
};
|
|
LINK_ENTITY_TO_CLASS( info_player_marine, CSGSpawnPointMarine );
|
|
|
|
class CSGSpawnPointUnas : public CSGSpawnPoint
|
|
{
|
|
public:
|
|
DECLARE_CLASS( CSGSpawnPointUnas, CSGSpawnPoint );
|
|
int PreferredTeam() override { return StargateTC::TEAM_UNAS; }
|
|
};
|
|
LINK_ENTITY_TO_CLASS( info_player_unas, CSGSpawnPointUnas );
|
|
|
|
class CSGSpawnPointCoop : public CSGSpawnPoint
|
|
{
|
|
public:
|
|
DECLARE_CLASS( CSGSpawnPointCoop, CSGSpawnPoint );
|
|
int PreferredTeam() override { return StargateTC::TEAM_NONE; }
|
|
};
|
|
LINK_ENTITY_TO_CLASS( info_player_coop, CSGSpawnPointCoop );
|