User talk:^Ben: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(More links and testing how a massive image shows up.)
m (Reverted edit of last, changed back to last version by cur)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
http://www.electrofiction.com/downloads/vmtCREATEv0_7_1.zip
http://www.student.kun.nl/rvanhoorn/Optimization.htm
 
[[Valve Developer TidBits]]
 
modevents.res


http://www.electrofiction.com/images/vmtOptions.gif
Here be good stuff


http://www.electrofiction.com/images/compileoptions.gif
Game Event System


http://www.geocities.com/cofrdrbob/pakrat.html
Creating Events
IGameEvent *event = gameeventmanager->CreateEvent( "player_death" );
if( event )
{
event->SetInt("userid", pVictim->GetUserID() );
event->SetInt("attacker", killer_ID );
event->SetString("weapon", killer_weapon_name );
gameeventmanager->FireEvent( event );
}


http://www.chaosincarnate.net/cannonfodder/dispgen.php
Listening for Events
gameeventmanager->AddListener( this, "player_death", false );


http://www.wunderboy.org/3d_games/utils/sourcetools.php
Capturing Events
void CMapOverview::FireGameEvent( IGameEvent *event )
{
const char * type = event->GetName();
if ( Q_strcmp(type, "player_death") == 0 )
{
}
}


http://www.chaosincarnate.net/cannonfodder/cftools.htm
== My Notes ==


http://nemesis.thewavelength.net/
r_cleardecals - by the way Ben, there are no engine hooks for this so it cannot be called by code...but if <code>r_cleardecals 1</code> is called, it will also remove permanent decals projected by infodecal.&mdash;'''[[User:Ts2do|ts2do]]'''
:Hrmmm - this was going to be for my round reset code, what I was thinking of doing was this -


http://www.student.kun.nl/rvanhoorn/Optimization.htm
for ( int i = 1; i <= gpGlobals->maxClients; i++ )
{
CBasePlayer *pPlayer = UTIL_PlayerByIndex( i );
        EHANDLE pPlayerHandle = pPlayer;
        engine->ClientCommand(gEntList.GetEdict(pPlayerHandle), "r_cleardecals");
        }


http://members.chello.se/wunderboy/mpsourcemap.png
Here's my source:&mdash;'''[[User:Ts2do|ts2do]]''' 23:00, 19 Jun 2006 (PDT)
:game_shared: [http://www.plastic-warfare.com/files/pwround_gamerules.cpp] [http://www.plastic-warfare.com/files/pwround_gamerules.h] [http://www.plastic-warfare.com/files/gameeventdefs.h]<br>dlls: [http://www.plastic-warfare.com/files/mapentityfilter.cpp] [http://www.plastic-warfare.com/files/mapentityfilter.h]

Latest revision as of 06:01, 5 January 2009

http://www.student.kun.nl/rvanhoorn/Optimization.htm

Valve Developer TidBits

modevents.res

Here be good stuff

Game Event System

Creating Events

IGameEvent *event = gameeventmanager->CreateEvent( "player_death" );
if( event )
{
	event->SetInt("userid", pVictim->GetUserID() );
	event->SetInt("attacker", killer_ID );
	event->SetString("weapon", killer_weapon_name );
	gameeventmanager->FireEvent( event );
}

Listening for Events

gameeventmanager->AddListener( this, "player_death", false );

Capturing Events

void CMapOverview::FireGameEvent( IGameEvent *event )
{
	const char * type = event->GetName();
	if ( Q_strcmp(type, "player_death") == 0 )
	{
	}
}

My Notes

r_cleardecals - by the way Ben, there are no engine hooks for this so it cannot be called by code...but if r_cleardecals 1 is called, it will also remove permanent decals projected by infodecal.—ts2do

Hrmmm - this was going to be for my round reset code, what I was thinking of doing was this -


	for ( int i = 1; i <= gpGlobals->maxClients; i++ )
	{
		CBasePlayer *pPlayer = UTIL_PlayerByIndex( i );

	        EHANDLE pPlayerHandle = pPlayer;
	        engine->ClientCommand(gEntList.GetEdict(pPlayerHandle), "r_cleardecals");
        }

Here's my source:—ts2do 23:00, 19 Jun 2006 (PDT)

game_shared: [1] [2] [3]
dlls: [4] [5]