.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
Re: v_angle.y is always 0 ???
Old
  (#11)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: v_angle.y is always 0 ??? - 25-02-2005

Quote:
Just substract -180 from the y and z angle and wrap them with something like this:
Code:
float WrapYZAngle(float angle)
{
     while (angle >= 360.0f) angle -= 360.0f;
     while (angle < 0.0f) angle += 360.0f;
     return angle;
}
bad solution, if angle is big number, subtracting 360 won't help and you have deadlock.

http://wiki.bots-united.com/index.ph...Angle_facility

And for austin, all about angles


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)
  
Reply With Quote
Re: v_angle.y is always 0 ???
Old
  (#12)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: v_angle.y is always 0 ??? - 25-02-2005

good, KoraX
Feed our wiki, guys, feed our wiki



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: v_angle.y is always 0 ???
Old
  (#13)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: v_angle.y is always 0 ??? - 25-02-2005

Quote:
Originally Posted by koraX
bad solution, if angle is big number, subtracting 360 won't help and you have deadlock.

http://wiki.bots-united.com/index.ph...Angle_facility

And for austin, all about angles
Heh I just copied that code from Cube :-\ Something is wrong if you have very big numbers anyway...
But I like your macros, going to use that
  
Reply With Quote
Re: v_angle.y is always 0 ???
Old
  (#14)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: v_angle.y is always 0 ??? - 25-02-2005

Quote:
Originally Posted by Austin
Da! -DAAAAAhh!!!
Ok can I say it was REALLY late last night!
Noooo. please wipe delete this msg from the server!...
Ashamed, yes, totally shamed... Balaaagg...

But even so you wouldn't think the implicit cast would work that way now do ya...


Either give me a compile warning, or do a "reasonable" cast ok?

tx. everyone.
perhaps you could turn up your warning level of y our compiler? I used to set the MSVC compiler on pretty high (level 4?) so it would complain about every 'conversion' i did with %d (and use floats, etc)...


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: v_angle.y is always 0 ???
Old
  (#15)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: v_angle.y is always 0 ??? - 26-02-2005

Quote:
perhaps you could turn up your warning level of y our compiler? I used to set the MSVC compiler on pretty high (level 4?) so it would complain about every 'conversion' i did with %d (and use floats, etc)...
then you will get a lot (really lot!) of warnings from Valve's code, Metamod code and STL files And that's actually why I 'stripped' all the external codes like Valve SDK and Metamod, only necessary part is left.
  
Reply With Quote
Re: v_angle.y is always 0 ???
Old
  (#16)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: v_angle.y is always 0 ??? - 26-02-2005

Quote:
Originally Posted by Whistler
then you will get a lot (really lot!) of warnings from Valve's code, Metamod code and STL files And that's actually why I 'stripped' all the external codes like Valve SDK and Metamod, only necessary part is left.
I heavily stripped metamod (into one file) because it collided with my code.
I also stripped SDK a lot.
I've got warning level 4, I'm using STL everywhere and get no warning. So it is possible


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)
  
Reply With Quote
Re: v_angle.y is always 0 ???
Old
  (#17)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: v_angle.y is always 0 ??? - 26-02-2005

1) The reason I don't chagne my warning level is as you say, it generates too many warnings to be useful. You could use pragma warning but that is a hassle and probably not worth the effort except in certain cases.

2) By modify source from 3rd parties you get into a difficult situation.
What do you do when updates come out? You have to re-clean the 3rd party source. Time consuming and not fun. Perhaps it is ok with the hl1 sdk that doesn't change much if at all, but what about the new source sdk that is and will be changing "every time you logon to steam?..."
  
Reply With Quote
Re: v_angle.y is always 0 ???
Old
  (#18)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: v_angle.y is always 0 ??? - 27-02-2005

You could probably optimize that so if the loop goes five times, you would use modulus intead. It probably won't go five times anyway, but try it.


sfx1999.postcount++
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com