.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Make BOT more client-like (Adding rotational angles velocity)
Old
  (#1)
Immortal_BLG
Member
 
Status: Offline
Posts: 171
Join Date: Nov 2007
Location: Russian Federation
Default Make BOT more client-like (Adding rotational angles velocity) - 13-02-2011

Code:
void AddRotationalAnglesVelocity (edict_t *const botEdict)
{
	if (botEdict->v.fixangle != 2)
	{
		botEdict->v.fixangle = 1;

		return;
	}

	botEdict->v.angles.y += botEdict->v.avelocity.y;

	botEdict->v.angles.ClampYaw ();

	botEdict->v.v_angle.y = botEdict->v.angles.y;

	// Revert all back to defaults....
	botEdict->v.avelocity.y = 0.0f;
	botEdict->v.fixangle = 1;
}
Put this function in bot Think function.

P.S. SORRY FOR BAD ENGLISH!
  
Reply With Quote
Re: Make BOT more client-like (Adding rotational angles velocity)
Old
  (#2)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Make BOT more client-like (Adding rotational angles velocity) - 13-02-2011

What does it do? What should it be used for?
  
Reply With Quote
Re: Make BOT more client-like (Adding rotational angles velocity)
Old
  (#3)
Immortal_BLG
Member
 
Status: Offline
Posts: 171
Join Date: Nov 2007
Location: Russian Federation
Default Re: Make BOT more client-like (Adding rotational angles velocity) - 13-02-2011

Bot, standing on "func_rotating" will look in same direction, but client view angle (yaw) will rotate on this entity (together with "func_rotating").

P.S. Sorry for bad explanation

P.S. test map here

Last edited by Immortal_BLG; 13-02-2011 at 15:17..
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com