Thread: draw beam
View Single Post
Re: draw beam
Old
  (#21)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: draw beam - 05-01-2005

you think? i am writing the waypoint system from scratch, but i am talking about 20 wpts to be needed to be drawn. It somehow does not get drawn! here is my beam code:

Code:
void WaypointDraw(edict_t *pEdict)
{
	// When gWaypointSprite failed, try again here
	if (engine->IsModelPrecached(PHYSGUN_BEAM_SPRITE) || gWaypointSprite < 0)
	{
		// Precache sprite
		gWaypointSprite = engine->PrecacheModel(PHYSGUN_BEAM_SPRITE);
	}
	int iIndex=0;
	for (iIndex; iIndex < MAX_WAYPOINTS; iIndex++)
	{
		// every waypoint that has Vector != 0,0,0
		if (gWaypoints[iIndex].Origin != Vector(0,0,0))
		{
			// Draw beam
			//engine->
			effects->Beam(gWaypoints[iIndex].Origin + Vector(0,0,-128),
						  gWaypoints[iIndex].Origin, 
						  gWaypointSprite, 
						  0, 
						  0, 0, 10, 1, 1, 1, 0, 
						  255,255,255,255,5);
/*
				virtual void Beam( const Vector &Start, const Vector &End, int nModelIndex, 
  int nHaloIndex, unsigned char frameStart, unsigned char frameRate,
  float flLife, unsigned char width, unsigned char endWidth, unsigned char fadeLength, 
  unsigned char noise, unsigned char red, unsigned char green,
  unsigned char blue, unsigned char brightness, unsigned char speed) = 0;*/
		}
	}
}


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote