.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Make BOT more client-like (Adding rotational angles velocity) (http://forums.bots-united.com/showthread.php?t=8505)

Immortal_BLG 13-02-2011 07:00

Make BOT more client-like (Adding rotational angles velocity)
 
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!

KWo 13-02-2011 11:11

Re: Make BOT more client-like (Adding rotational angles velocity)
 
What does it do? What should it be used for?

Immortal_BLG 13-02-2011 14:47

Re: Make BOT more client-like (Adding rotational angles velocity)
 
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


All times are GMT +2. The time now is 20:26.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.