Talk:Shadowsource: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Fixes Required For The Pre-September/November Release =
physics.cpp, ShouldCollide function, line 579. Causes ep2_outland_12 to crash every time according to the mdmp. --[[User:TheRealJman|TheRealJman]] 17:08, 11 April 2010 (UTC)


== Multiplayer Level Transitions. ==
Some random fixes, the dynamic respawn crashed for me a lot, so I added a 3 second wait to respawning in multiplay_gamerules.cpp


Credit goes to mrhanky7 of The Synergy Mod for the following information (which I've re-typed for this wiki):
<source lang=cpp>
float CMultiplayRules::FlPlayerSpawnTime( CBasePlayer *pPlayer )
{
return gpGlobals->curtime + 3;//now!
}
</source>


In the current engine code, it is impossible to use Valves transition code. To work around this you have to by-pass engine functions such as:
If one of your players dies during a scripted_sequence, the ai will stop going through their sequence altogether. A quick fix is to edit hl2_player.cpp's event_killed function.
You can remove or just blank the notifyscriptsofdeath function if you want.


* engine->LoadAdjacentEnts()
<source lang=cpp>
* engine->LoadGameState()
void CHL2_Player::Event_Killed( const CTakeDamageInfo &info )
{
BaseClass::Event_Killed( info );


by using your own functions with alterations to support multiple players.
//FirePlayerProxyOutput( "PlayerDied", variant_t(), this, this );
//NotifyScriptsOfDeath();
}
</source>


To fix the attackchopper crashing levels such as ep2_outland_08, change the IsThrownByPlayer function in npc_attackchopper.cpp by removing the IsPlayer check.


Also you need to remove the transitions from relying on the landmark name for map changes, instead you call:
<source lang=cpp>
bool CGrenadeHelicopter::IsThrownByPlayer()
{
// if player is the owner and we're set to explode on contact, then the player threw this grenade.
#ifdef SS_Enable_Fixed_Multiplayer_AI
return ( m_bExplodeOnContact );
#else
return ( ( GetOwnerEntity() == UTIL_GetLocalPlayer() ) && m_bExplodeOnContact );
#endif //SS_Enable_Fixed_Multiplayer_AI
</source>


* engine->ChangeLevel()
== Patch Install Issues ==


along with the next maps name.
I was going through the extra fixes after the 1.75 patch and the "find x" bits for gameinterface.cpp don't exist in the file - not even touched in the patch. Something with next version or? --[[User:Lost|Lost]] 16:35, 2 May 2010 (UTC)
The next map and next landmark name are stored in static variables, which are to be referenced later.


The functions that require looking into the most are:
Yes you're quite correct I appear to have been using an enhanced V1.75 when I added in those extra fixes. I would have been able to find out for you sooner if my PSU hadn't given up on my gaming PC ;)


*CBaseEntity Save()
Anyway put:
*CBaseEntity Restore()


You'll notice that they call to a function that saves/loads the data description table values.
<source lang="cpp">


Bear in mind that there are many changes to be made in saverestore.cpp and .h for the code to support multiple players.
#ifdef SS_USE_PLAYERCLASSES


== Alyx Darkness Mode. ==
extern int AssaulterPlayerNumbers;


This was disabled in the Pre-September release. The reason being that it always caused the game to crash.
extern int SupporterPlayerNumbers;


Further investigations since the release have shown that the line:
extern int MedicPlayerNumbers;


* if ( HL2GameRules()->IsAlyxInDarknessMode() )
extern int HeavyPlayerNumbers;


Is the sole cause of crashes for alyx darkness mode in Shadowsource, therefore a different method of checking needs to be implemented for darkness mode to be put back in.
AssaulterPlayerNumbers = 0;


SupporterPlayerNumbers = 0;


= November 2009 Shadow Source Alpha Release =
MedicPlayerNumbers = 0;


This is the current in-alpha release.
HeavyPlayerNumbers = 0;


It is however in some respects more bug filled than the september release, so be warned.
#endif //SS_USE_PLAYERCLASSES


Items added to this release are:
</source>


* Less crashes (though still a fair few)
in CServerGameDLL::LevelShutdown  of gameinterface.cpp


* Fully working implementation of barnacles being able to swallow players.
--[[User:Chiefwhosm|Chiefwhosm]] 13:40, 23 May 2010 (UTC)
 
* Player class system, with different models per team/class choice and different abilities. Though all players are allowed to sprint for example. Some players can pick up heavier objects than others with their hands.
 
* Implemented players being able to pickup objects with their hands.
 
* Note that with this version the gravity gun bug returned due to my overwriting the player cpp file, but anyone can add in the fix for rotating objects with the gravity gun from the source coders forums.
 
* Note that you should remove the current implementation of multiplayer level transitions as you will crash the server host on transition. If you play by yourself, then transitions work 100%.
 
* Note also that antlions are bugged due to the player class system. They will attack you, but do you no damage. Combine soldiers however are quite the reverse and will kill you very quickly if you're not careful.
 
* The crashes on line 1970 are still in this version. Anyone finding out why this keeps happening, please say so here so that it can be fixed.
 
* This version has much better comment lines for what each change does in comparison to the older version.
 
 
The compiled version can be found at the following mirror(s):
 
[http://rapidshare.de/files/48681211/Shadow_Source_Compiled_November_2009.7z.html Compiled Version On RapidShare]
 
And the patch file at these mirror(s):
 
[http://rapidshare.de/files/48681251/ShadowSource_Patch_November_2009_Alpha.patch.html Patch File On RapidShare]

Latest revision as of 06:40, 23 May 2010

physics.cpp, ShouldCollide function, line 579. Causes ep2_outland_12 to crash every time according to the mdmp. --TheRealJman 17:08, 11 April 2010 (UTC)

Some random fixes, the dynamic respawn crashed for me a lot, so I added a 3 second wait to respawning in multiplay_gamerules.cpp

float CMultiplayRules::FlPlayerSpawnTime( CBasePlayer *pPlayer )
{
	return gpGlobals->curtime + 3;//now!
}

If one of your players dies during a scripted_sequence, the ai will stop going through their sequence altogether. A quick fix is to edit hl2_player.cpp's event_killed function. You can remove or just blank the notifyscriptsofdeath function if you want.

void CHL2_Player::Event_Killed( const CTakeDamageInfo &info )
{
	BaseClass::Event_Killed( info );

	//FirePlayerProxyOutput( "PlayerDied", variant_t(), this, this );
	//NotifyScriptsOfDeath();
}

To fix the attackchopper crashing levels such as ep2_outland_08, change the IsThrownByPlayer function in npc_attackchopper.cpp by removing the IsPlayer check.

bool CGrenadeHelicopter::IsThrownByPlayer()
{
// if player is the owner and we're set to explode on contact, then the player threw this grenade.
#ifdef SS_Enable_Fixed_Multiplayer_AI	
return ( m_bExplodeOnContact ); 
#else
return ( ( GetOwnerEntity() == UTIL_GetLocalPlayer() ) && m_bExplodeOnContact );
#endif //SS_Enable_Fixed_Multiplayer_AI

Patch Install Issues

I was going through the extra fixes after the 1.75 patch and the "find x" bits for gameinterface.cpp don't exist in the file - not even touched in the patch. Something with next version or? --Lost 16:35, 2 May 2010 (UTC)

Yes you're quite correct I appear to have been using an enhanced V1.75 when I added in those extra fixes. I would have been able to find out for you sooner if my PSU hadn't given up on my gaming PC ;)

Anyway put:

#ifdef SS_USE_PLAYERCLASSES

extern int AssaulterPlayerNumbers;

extern int SupporterPlayerNumbers;

extern int MedicPlayerNumbers;

extern int HeavyPlayerNumbers;

AssaulterPlayerNumbers = 0;

SupporterPlayerNumbers = 0;

MedicPlayerNumbers = 0;

HeavyPlayerNumbers = 0;

#endif //SS_USE_PLAYERCLASSES

in CServerGameDLL::LevelShutdown of gameinterface.cpp

--Chiefwhosm 13:40, 23 May 2010 (UTC)