News:

Come Chat with us live! Learn how HERE!

Main Menu

Problems making bots aim while wallwalking.

Started by ACKMAN, July 27, 2010, 10:20:47 PM

ACKMAN

Hi there, some days ago I was really bored so I decided to add bots to my QVM code and improve them. So I took PBot and started editing code. I've been working on them for several days now and I'm enjoying the results. Tho I'm not good at C I'm doing my best.

But now I want to make my bots follow paths when they're wallwalking (so dretchs can stop blocking the path and other stuff) but they don't aim at the path. I suppose it's something related to wallclimbing changing view angles or shit but I don't know how that code works so I can't fix it.

So, this is that path aiming function from PBot:


qboolean botAimAtPath( gentity_t *self )
{
  vec3_t dirToTarget, angleToTarget;
  vec3_t top = { 0, 0, 0 };
  int vh = 0;

  BG_FindViewheightForClass( self->client->ps.stats[ STAT_PCLASS ], &vh, NULL );
  top[2] = vh;
  VectorAdd( self->s.pos.trBase, top, top );
  VectorSubtract( level.paths[self->targetPath].coord, top, dirToTarget );
  VectorNormalize( dirToTarget );
  vectoangles( dirToTarget, angleToTarget );
  self->client->ps.delta_angles[ 0 ] = ANGLE2SHORT( angleToTarget[ 0 ] );
  self->client->ps.delta_angles[ 1 ] = ANGLE2SHORT( angleToTarget[ 1 ] );
  self->client->ps.delta_angles[ 2 ] = ANGLE2SHORT( angleToTarget[ 2 ] );
 
  return qtrue;
}


If anyone could help me with this I'd fuck him in the ass. Also, if I get bots to work as I want them to I'll maybe release a patch.

Aelita

Quote from: ACKMAN on July 27, 2010, 10:20:47 PM
If anyone could help me with this I'd fuck him in the ass.

Scaring off your potential customers.. Also +sig. ;3

CreatureofHell

Quote from: Aelita on July 27, 2010, 10:30:47 PM
Quote from: ACKMAN on July 27, 2010, 10:20:47 PM
If anyone could help me with this I'd fuck him in the ass.

Scaring off your potential customers.. Also +sig. ;3

Busy sigging right now?

@ACKMAN: Pics so we know if this offer is worth it  ;)
{NoS}StalKer
Quote<Timbo> posting on the trem forums rarely results in anything good

Crava_Loft

#3
[deleted]

ACKMAN

If that is the real TBot source I will fuck you in the ass with my dual flamer.

Jokes appart, if anyone could help me with this code... lols

Tho, I'll have a look @ TBot source code. It's been a long time since I wanted to get it.

PS: ZOMFG I IS IN SIG

ACKMAN

Double posting ftw

Ok I fixed it by looking @ TBot code.


Now I don't know if I'll release my bot since this is waaaaaay better :(

ZOMFG YOU COULD HAVE UPLOADED THIS SHIT A WEEK AGO SO I WOULDN'T HAVE WASTED MY TIME CODING A USELESS BOT

mooseberry

Quote from: ACKMAN on July 28, 2010, 12:37:03 AM
Double posting ftw

Ok I fixed it by looking @ TBot code.


Now I don't know if I'll release my bot since this is waaaaaay better :(

ZOMFG YOU COULD HAVE UPLOADED THIS SHIT A WEEK AGO SO I WOULDN'T HAVE WASTED MY TIME CODING A USELESS BOT

So take TBot and mess around to try to make it better. Open source is for a reason.
Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

मैं हिन्दी का समर्थन

~Mooseberry.

ACKMAN

Tbot is so perfect :<

I still need to know how it works to improve it. But it's waaaayy much better than original bot and waaaaayy too much for my C knowledge :(