.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 2 SDK (http://forums.bots-united.com/forumdisplay.php?f=62)
-   -   How to do correct movement (http://forums.bots-united.com/showthread.php?t=3369)

stefanhendriks 09-01-2005 16:02

Re: How to do correct movement
 
the SDK had an update, perhaps you need to re-build the source from a new SDK as SteveC did ;)

Cheeseh 09-01-2005 17:32

Re: How to do correct movement
 
I'm compiling the SCBot source with the same SDK code as my bot, SCBot compiles fine with the CBasePlayer stuff, mine doesn't even with the GAME_DLL thing and stuff, it;s confusin me ???:(

SteveC 09-01-2005 17:42

Re: How to do correct movement
 
Some of the functions within CBasePlayer don't work, they create linking errors. I think it's related to what the function calls, e.g. if it calls stuff from within the base entity class.

stefanhendriks 09-01-2005 20:23

Re: How to do correct movement
 
I saw in your post you figured how to do walking to A , aiming at B

got any hints/source on that? :D

SteveC 09-01-2005 21:15

Re: How to do correct movement
 
I think the latest souce zip in this thread contains the code for moving one way and looking in the other. But I don't think it will be very tidy, so not too readable.

It's quite easy now the math utilities are working because you can do tricky stuff in one line. =)

stefanhendriks 09-01-2005 22:04

Re: How to do correct movement
 
i got this principle working already as well; thx for the code snippets. I don't think i need more ;)

http://johannes.lampel.net/pics/shit/de_cbble0005.jpg

thx for mr joe / asp for his screeny and testing,

man i have to reinstall MSVC! :(

Geesu 11-01-2005 14:57

Re: How to do correct movement
 
I could compile the second zip file he posted fine, but I was unable to find where you defined GAME_DLL, which file did you put that in if you mind me asking?

@$3.1415rin 11-01-2005 15:17

Re: How to do correct movement
 
you can define stuff in the properties of your project, so you don't need to write that defines directly to some file ( which you might forget to load here and there, and then you'd be fucked up )

Cheeseh 11-01-2005 18:57

Re: How to do correct movement
 
I'm having trouble getting bots to face something, they never turn to look at anything when I set the cmd.viewangles to the angles I want. Is there something I'm missing? I'm using SteveC's CBasePlayer way of issuing a command:

PHP Code:

void CBot :: runPlayerMove()
{
    static 
CUserCmd cmd;

    
//////////////////////////////////
    
memset(&cmd0sizeof(cmd));
    
//////////////////////////////////
    
cmd.forwardmove m_fForwardSpeed;
    
cmd.sidemove m_fSideSpeed;
    
cmd.upmove m_fUpSpeed;
    
cmd.buttons m_iButtons;
    
cmd.impulse m_iImpulse;
    
cmd.viewangles m_vViewAngles;
    
    
CBasePlayer *pPlayer = (CBasePlayer*)CBaseEntity::Instance(m_pEdict);
    
// SteveC : CBasePlayer user command
    
pPlayer->ProcessUsercmds(&cmd,1,1,0,false); // SteveC



the bots move okay though, they just won't turn at all ?

SteveC 11-01-2005 19:02

Re: How to do correct movement
 
Did you include the line of code to set the fixangle type to none?

It's in post 3 of this thread.


All times are GMT +2. The time now is 19:39.

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