Author Topic: Problems making bots aim while wallwalking.  (Read 6268 times)

ACKMAN

  • Posts: 342
  • Turrets: +9/-20
Problems making bots aim while wallwalking.
« 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.

Aelita

  • Posts: 742
  • Turrets: +147/-34
Re: Problems making bots aim while wallwalking.
« Reply #1 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

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Re: Problems making bots aim while wallwalking.
« Reply #2 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  ;)
{NoS}StalKer
Quote
<Timbo> posting on the trem forums rarely results in anything good

Crava_Loft

  • Guest
Re: Problems making bots aim while wallwalking.
« Reply #3 on: July 27, 2010, 10:39:15 pm »
[deleted]
« Last Edit: August 11, 2010, 12:44:59 pm by Crava_Loft »

ACKMAN

  • Posts: 342
  • Turrets: +9/-20
Re: Problems making bots aim while wallwalking.
« Reply #4 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

ACKMAN

  • Posts: 342
  • Turrets: +9/-20
Re: Problems making bots aim while wallwalking.
« Reply #5 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

mooseberry

  • Community Moderators
  • *
  • Posts: 4005
  • Turrets: +666/-325
Re: Problems making bots aim while wallwalking.
« Reply #6 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.
Bucket: [You hear the distant howl of a coyote losing at Counterstrike.]

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

~Mooseberry.

ACKMAN

  • Posts: 342
  • Turrets: +9/-20
Re: Problems making bots aim while wallwalking.
« Reply #7 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 :(