okay I've been making a new bot template from botmans so far, I'm trying to do some waypoint stuff, just trying to wonder how to draw a waypoint.
I can't really include the beam stuff as I need to include lots of files that can't find lots of stuff.
I have:
Code:
void CWaypoint :: draw ( edict_t *pEdict )
{
CTEBeamPoints *beam = new CTEBeamPoints();
CEdictRecipient *filter = new CEdictRecipient(pEdict,false);
engine->UserMessageBegin(filter,TE_BEAMPOINTS); // TE_BEAMPOINTS in here?? what about tempentity...?
// are these in right order??
WRITE_COORD(/*???*/) // ??? start and end points???
WRITE_BYTE( m_nModelIndex ); //???
WRITE_BYTE( m_nHaloIndex );
WRITE_BYTE( m_nStartFrame );
WRITE_BYTE( m_nFrameRate );
WRITE_FLOAT( m_fLife );
WRITE_FLOAT( m_fWidth );
WRITE_FLOAT( m_fEndWidth );
WRITE_BYTE( m_nFadeLength );
WRITE_FLOAT( m_fAmplitude );
WRITE_BYTE( r );
WRITE_BYTE( g );
WRITE_BYTE( b );
WRITE_BYTE( a );
WRITE_BYTE( m_nSpeed );
WRITE_BYTE( m_nFlags );
engine->MessageEnd();
delete filter;
}
I had to make a filter:
Code:
class CEdictRecipient : public IRecipientFilter
{
public:
CEdictRecipient ( edict_t *pEdict, bool bReliable )
{
m_pEdict = pEdict;
m_bReliable = bReliable;
}
// require destructor
~CEdictRecipient ()
{
m_pEdict = NULL;
m_bReliable = false;
}
bool IsReliable( void ) const { return m_bReliable; }
bool IsInitMessage( void ) const { return false; }
int GetRecipientCount( void ) const { return 1; }
int GetRecipientIndex( int slot ) const { return ENTINDEX(m_pEdict); } // only 1 stored
private:
edict_t *m_pEdict;
bool m_bReliable;
};
anyone found anything?