![]() |
podbot grenade throwing bug
I've found this bug is still not fixed...
in the VecCheckToss() function: Code:
if (vecMidPoint.z < vecSpot2.z) // VERY BIG FAT BUG ! |
Re: podbot grenade throwing bug
Good one Whistler :)
You'll tell me I should have checked the YaPB source... and you'd be right :D |
Re: podbot grenade throwing bug
it's not CF not checking that one, but valve, right ?
the negative root produces an NaN I think, so the following calculations will be invalid. PS: just looked it up and it's already fixed there. so maybe I did it, or a later SDK version from valve had fixed the bug. |
Re: podbot grenade throwing bug
hmm sthill noticing in RC 2.1 bots are throwing nades stangely (not mch, and usually wih suicidal effect)
|
Re: podbot grenade throwing bug
Quote:
I saw two guys walking in a same line and stuck at a point. when they see an enemy, they pull out nades at the same time, turned around and threw towards the wall. and then nades came back to them... |
Re: podbot grenade throwing bug
yea we need better grenade throwing algorithms :D
|
Re: podbot grenade throwing bug
here's my 2cents on g throwing based on playing the cs wc3 mod as orc:
1) if enemy is near u (easy to implement) if the enemy is near u ie in visible range up clos or a bit off here's what u do a) up close ....when up close ..face to face u gotta watch them .. if enemy seems to move left take it's current distance and add distnce wise what u think will be the time when the gren explodes it should land at enemy's feet...when it blows same for the right.... if enemy is coming towards u throw it at ur feet and start moving away from it...any direction that where u was standing is best :) if enemy is going away from u ....u'll have to calculate the distance backwards but the nade has to be thrown at an angle to achieve this since it'll move in an arc. b) far..bascially just aim at them or thier predicted position have to use similar startegy as when enemy is going away from u... 2) don't know where the enemy is.....i was thinking if it was possible that we could probably use the danger pos...to help..basically the most dangerous areas with alot of player n enemy collsions can be used as target positions for nades .....and camp spots also using walls for rebounds ----edit--- and u can talk to two mask (bot n metamod coding forum he has some posts) on grenade detection for the victim about what he's done....if he'll want to tell ;) |
Re: podbot grenade throwing bug
yes thats basicly how everyone throws nades..
the problem is with calculating how high to aim to make it reach the guy and it seem that when that is calculated it is way off.. so off that they end up throwing a nade in the wrong direction... |
Re: podbot grenade throwing bug
Quote:
|
Re: podbot grenade throwing bug
Quote:
it's an aiming issue.. more like a calculating aiming height issue or something like that.. |
Re: podbot grenade throwing bug
i experienced usually this:
bot wants to throw grenade he stops and gets the nade to hand then he spins on the place he is and finally trows grenade on the floor (or any stupid direction) and usually nade lands exackly under his legs and boom :D they should trow nades faster, and i was thinking if it is possible to write simple algorithm so that bot would predict at least one or 2 nade bumps from the wall or ceiling |
Re: podbot grenade throwing bug
Quote:
|
Re: podbot grenade throwing bug
Quote:
|
Re: podbot grenade throwing bug
I'm just in 10th grade :(
haven't taken physics yet... but I'm in Math Analysis/Trignometry... and I think I remotely remember being taught how objects fall and the formulas and all that... but it's all gone outta my head right now :D |
Re: podbot grenade throwing bug
Quote:
for someone who's in 10th grade ur doing great :) ps: whats 10th grade as age wise...we don't use grades in nz :o |
Re: podbot grenade throwing bug
I'm 16 years old
[edit] anyone actually know the formulas or anything? some help coding or providing math help would be appreciated =) [/edit] |
Re: podbot grenade throwing bug
Quote:
http://www.physics.purdue.edu/~jhglbrg/beginner.html ....a review of some sites http://library.thinkquest.org/2779/Even_more.html http://id.mind.net/~zona/mstm/physics/mechanics/curvedMotion/projectileMotion/generalSolution/generalSolution.html ..i'll look up my physics book for some stuff.....it's been a 2 yrs since i've touched physics... |
Re: podbot grenade throwing bug
strange...
pb2.6mm currently uses the same throwing code as the pb2.6 that CF released... did this throwing bug exist since 2.5? or did CF play around with this code before he released it? |
Re: podbot grenade throwing bug
Quote:
Quote:
|
Re: podbot grenade throwing bug
yea... smarter... right... :D
|
Re: podbot grenade throwing bug
hi!
in my opinion studying ballistics to solve the grenade throwing bug is a somewhat "academic" approach.. As this isn't about reinventing the wheel I' d rather propose a more practical attempt: Check out how the others are doing... Joebot does throw grenades quite frequent and well aimed and at some point in the code there's a hint like "substrakt 15 to avoid the grenade hitting the ceiling" or so. So why not get "inspiration" by someone who solved the problem? (And probably follows this thread leaning back in his comfortable chair with this biiig grin 8) in his face?) |
Re: podbot grenade throwing bug
Aspirin, stop grinning immediately, or I'll break in your house by night and convert all JoeBot XP to ANSI C and delete the original! :D
|
Re: podbot grenade throwing bug
so is the joebot author wanting to give us a hand???
|
Re: podbot grenade throwing bug
dunno if there's much to say about it, just look at the code. checvectoss and checkvecthrow are just from the SDK I think.
In CSBotCS look at CheckGrenadeThrowing(), ( lol, another function where I should add some comments when I have time ) in CBotBase, take a look at the CBotBase :: HandleGOrder() function ( I know Pierre, i'm cheating :) but still grinning anyway :P ) |
Re: podbot grenade throwing bug
thanks!
I'll look at it right now :D |
Re: podbot grenade throwing bug
i guess more advanced will be where grenade will land after boucing off the wall etc
|
Re: podbot grenade throwing bug
yes, that would be cool, but the more bounces you calculate, the more possibilities you have to calculate. you won't be able to calc all those possibilities in realtime any more from a certain point on. Of course one could think about optimizations, but checkvectoss works fine most of the time, so this complicated stuff wouldnt be notices by any bot user I guess
|
Re: podbot grenade throwing bug
from bot_combat.cpp VecCheckToss() function:
Code:
// get a rough idea of how high it can be thrown Perhaps you need to change this part of code back to the original HLSDK one (looks like CF has modified the two VecCheckxxxx() functions) |
Re: podbot grenade throwing bug
yea, this code looks somewhat mistaken to me.
I would think of Code:
// get a rough idea of how high it can be thrown TRACE_HULL because a TraceLine would pass through the sky meshes whereas the grenade would bounce on it And checking for flFraction is a bug since IF the grenade can actually reach 500 ft high (which is not that high in fact), then vecMidPoint would be left lined up with vecSpot1 and vecSpot2, which is NOT something we want, definitely. |
Re: podbot grenade throwing bug
I think I've found a good way for nade throwing :D
NOTE: PHP tags because code tags are currently broken.. Code:
// get a rough idea of how high it can be thrown |
Re: podbot grenade throwing bug
yea, bots now throws nades quite well,
they get also adjusted aim when enemy suddenly changes the position now just add option so that bots would trow nades faster (they think too long and thus they usually die by headshot :D because of standing in the place) |
Re: podbot grenade throwing bug
just working on grenade code, therefore just another comment here why joebot throws grenades so nicely ... it's basically because of those lines here, if you havnt found out for yourself already :
in CBotBase:HandleGOrder Code:
while(pent = UTIL_FindEntityByClassname(pent,"grenade")){ |
All times are GMT +2. The time now is 18:25. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.