.:: 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)

Cheeseh 11-01-2005 19:09

Re: How to do correct movement
 
thanks! I though I missed out something...!

SteveC 11-01-2005 19:16

Re: How to do correct movement
 
no problem.

Geesu 19-01-2005 15:12

Re: How to do correct movement
 
ok I added GAME_DLL to my preprocessor and then I just tried adding:

#include "cbase.h"
#include "baseentity.h"

to my header file for my plugin, I still get about 300 errors, any suggestions on as to why? Or should I add another header or something? (yes your bot does compile fine for me.. good work btw)

Thanks,
Josh

Cheeseh 19-01-2005 18:41

Re: How to do correct movement
 
You need to build under the debug profile unfortunately for the "hack" to work at the moment.

SteveC 19-01-2005 18:42

Re: How to do correct movement
 
You need to look if they are linker errors, or if they are compiler errors. If they are linker errors it means you haven't got the .cpp file for the function included, but you can't include many of these from the SDK as they all need each other. You just end up with loads more errors. However if they are compiler errors then you can just add the .h header file which the function/class is defined in.
The only .cpp file I have included is mathlib.cpp, and I only have a few header files but they depend on what you try to use. e.g. if you're trying to use the vector maths then you need vector.h etc..

BotUser 31-01-2005 19:50

Re: How to do correct movement
 
Yep, man.

The beginning of my default empty server plugin template code
now looks like

(...)
#define GAME_DLL 1

#include "cbase.h"

( ...)

This compiles fine, but gives linker error "unresolved external symbol
bool g_bUseNetworkVars bla bla"

How about that ? How to fix it ?

Thanks

BotUser

Cheeseh 31-01-2005 20:37

Re: How to do correct movement
 
you shouldn't use this anymore as HL sdk was updated so you can get eye angles and origin etc from IPlayerInfo/CBotController, see the bot sample code with the latest sdk (check the latest threads on this stuff)

BotUser 31-01-2005 20:45

Re: How to do correct movement
 
Quote:

Originally Posted by Cheeseh
you shouldn't use this anymore as HL sdk was updated so you can get eye angles and origin etc from IPlayerInfo/CBotController, see the bot sample code with the latest sdk (check the latest threads on this stuff)

Maybe, Cheeseh, but I want to have write access to some CBasePlayer attributes, like m_takedamage.

Thanks

BotUser

Pierre-Marie Baty 31-01-2005 20:45

Re: How to do correct movement
 
perhaps by searching the SDK for g_bUseNetworkVars and including the file where it's defined ? :)

BotUser 31-01-2005 23:52

Re: How to do correct movement
 
PMB, as usual you're right. It was more meant as a rethorical question, concering all the hacking that's going on, bypassing all the nice interfaces Valve was making up for us ;)

In that case, it works by just including/adding networkvar.h/.cpp to the project.

However, it could have been that new dependencies arise, and the whole game would have continued until you finally would have to include the whole SDK to satisfy all dependencies.


All times are GMT +2. The time now is 09:12.

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