renderfx
and renderamt
. Unfortunately a strange bug means that if renderamt
is negative then it will be sent to the client as 255. To get round this we just have two renderfx
s, one to make fat and one to make thin...commonconst.h
in cl_dll
(or straight dll
, but we'll be using cl_dll
for the time being) and scroll down to the definitions of the kRenders
(Line 708). Add these to the end:
kRenderFxFatness, // Make me fat
kRenderFxThinness, // Make me thin
Then open up StudioModelRenderer.cpp
and scroll down to StudioRenderModel( )
(Line 1579) and replace:
StudioRenderFinal( );
if ( !IEngineStudio.IsHardware() )
{
gEngfuncs.pTriAPI->RenderMode( kRenderNormal );
}
}
else
{
StudioRenderFinal( );
with:
StudioRenderFinal( );
if ( !IEngineStudio.IsHardware() )
{
gEngfuncs.pTriAPI->RenderMode( kRenderNormal );
}
}
else if ( m_pCurrentEntity->curstate.renderfx == kRenderFxFatness
|| m_pCurrentEntity->curstate.renderfx == kRenderFxThinness )
{
int origrend = m_pCurrentEntity->curstate.renderfx;
if ( origrend == kRenderFxThinness )
m_pCurrentEntity->curstate.renderamt*=-1;
m_pCurrentEntity->curstate.renderfx = kRenderFxGlowShell;
m_pCurrentEntity->curstate.rendercolor.r = 255;
m_pCurrentEntity->curstate.rendercolor.g = 255;
m_pCurrentEntity->curstate.rendercolor.b = 255;
gEngfuncs.pTriAPI->RenderMode( kRenderNormal );
StudioRenderFinal( );
m_pCurrentEntity->curstate.renderfx = origrend;
if ( origrend == kRenderFxThinness )
m_pCurrentEntity->curstate.renderamt*=-1;
return;
}
else
{
StudioRenderFinal( );
All done, now you need to recompile cl_dll
and dll
and you have the ability to make any entity a FatBoy.dll
and let's start by making all the scientists spawn randomly fat/thin. Open up scientist.cpp
and scroll down to Spawn()
(Line 682). if ( RANDOM_LONG( 0, 1 ) )
{
pev->renderfx = kRenderFxFatness;
pev->renderamt = 100;
}
else
{
pev->renderfx = kRenderFxThinness;
pev->renderamt = 20;
}
Compile and Laugh.
You must log in to post a comment. You can login or register a new account.