![]() |
Don't jump ?
One qeustion , is setting this below bit can make the bot don't jump ?
pEdict->v.button &= ~(IN_JUMP); I don't think it does , because although I place it into my code , the bot also jump ,is the code wrong , or what , any ideas ??? |
Re: Don't jump ?
The code you posted will clear the IN_JUMP bit of v.button. That is, if this bit is set to 1, it will set it back to 0.
Yes, this code can force the bot not to jump, but you have to ensure that nothing sets the IN_JUMP bit again later on in the code, AFTER this bit. The pEdict->v.button fields are only used when pfnRunPlayerMove() is called, not before - so ensure nothing breaks what you've done in between. |
Re: Don't jump ?
Try moving that line as close as possible to pfnRunPlayerMove() so you won`t override IN_JUMP by mistake.
*someone beat me to it :D |
Re: Don't jump ?
See this one
Code:
if((BotUsesSniper(pBot) && pBot->iStates & STATE_SEEINGENEMY)) *note I tested this code , it worked , it is a improved sniper code done by me , it is a older version , I have a newer version of the code , so I just need to make sure the bot don't jump * |
Re: Don't jump ?
Well if it works I suppose it's okay...
But I wouldn't do things like that if it was my own bot. In fact what you are doing is that you are correcting a wrong behaviour by adding the opposite behaviour on top of it. I call this "patching". You should better try to figure out WHY your bot jumps when using a sniper rifle and make it NOT press the IN_JUMP key then. Ah I know, it's more difficult. :) |
Re: Don't jump ?
Yeah , you're right , I'm studying the code now !
|
Re: Don't jump ?
Why are you pressing both attack buttons at once (both IN_ATTACK and IN_ATTACK2)?
botman |
Re: Don't jump ?
BLEH useless post :S
|
Re: Don't jump ?
And setting move_speed and side_speed twice to zero :D
I think if you just set IN_ATTACK2 once when he starts to snipe is enough 8) |
Re: Don't jump ?
Ha , it is just for testing !
|
All times are GMT +2. The time now is 22:10. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.