Tremulous Forum

Mods => Modding Center => Topic started by: ACKMAN on July 27, 2010, 10:20:47 pm

Title: Problems making bots aim while wallwalking.
Post by: ACKMAN on July 27, 2010, 10:20:47 pm
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:

Code: [Select]
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.
Title: Re: Problems making bots aim while wallwalking.
Post by: Aelita on July 27, 2010, 10:30:47 pm
If anyone could help me with this I'd fuck him in the ass.

Scaring off your potential customers.. Also +sig. ;3
Title: Re: Problems making bots aim while wallwalking.
Post by: CreatureofHell on July 27, 2010, 10:33:10 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  ;)
Title: Re: Problems making bots aim while wallwalking.
Post by: Crava_Loft on July 27, 2010, 10:39:15 pm
[deleted]
Title: Re: Problems making bots aim while wallwalking.
Post by: ACKMAN on July 27, 2010, 10:47:02 pm
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
Title: Re: Problems making bots aim while wallwalking.
Post by: 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
Title: Re: Problems making bots aim while wallwalking.
Post by: mooseberry on August 04, 2010, 05:09:10 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.
Title: Re: Problems making bots aim while wallwalking.
Post by: ACKMAN on August 10, 2010, 03:04:09 am
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 :(