mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-07-16 14:25:01 +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>
39 lines
1.4 KiB
C++
39 lines
1.4 KiB
C++
//============= Copyright © StargateTC Source Team =============================
|
|
//
|
|
// One-file stubs for the remaining preserved entities. Each just registers its
|
|
// classname against CBaseEntity so the engine accepts maps that reference them
|
|
// (otherwise vbsp/spawn would log "Spawnfunction for <classname> not found").
|
|
//
|
|
// Replace these one by one as gameplay is ported — copy a stub out into its
|
|
// own file and flesh it out following the dhd_console.cpp / sg_event.cpp
|
|
// pattern.
|
|
//
|
|
//==============================================================================
|
|
#include "cbase.h"
|
|
|
|
#define STUB_ENTITY(classname) \
|
|
class C##classname : public CBaseAnimating \
|
|
{ \
|
|
public: \
|
|
DECLARE_CLASS( C##classname, CBaseAnimating ); \
|
|
void Spawn() override \
|
|
{ \
|
|
BaseClass::Spawn(); \
|
|
SetSolid( SOLID_VPHYSICS ); \
|
|
SetMoveType( MOVETYPE_NONE ); \
|
|
Msg( "[StargateTC] inert stub spawned: " #classname "\n" ); \
|
|
} \
|
|
}; \
|
|
LINK_ENTITY_TO_CLASS( classname, C##classname )
|
|
|
|
STUB_ENTITY( stargate_dialer );
|
|
STUB_ENTITY( goauld_sarcophagus );
|
|
STUB_ENTITY( zat_pickup );
|
|
STUB_ENTITY( staff_pickup );
|
|
STUB_ENTITY( naqahdah_pickup );
|
|
|
|
// Weapons — eventually derive from CBaseHL2MPCombatWeapon. For now an inert
|
|
// pickup so maps spawn-clean.
|
|
STUB_ENTITY( zat_gun );
|
|
STUB_ENTITY( staff_gun );
|