![]() |
Re: code to get the illumination at any point on the map
oh, missed it....
Quote:
I use it to determine which structure to use: 1) swds.DLL - used only for dedicated server - has no render interface (structures withOUT "GL_" prefix) 2) sw.DLL - used in software rendering mode (Options->Video->Renderer->Software) (structures withOUT "GL_" prefix) 3) hw.DLL - used in hardware rendering mode (OpenGL: Options->Video->Renderer->Software, Direct 3D: Options->Video->Renderer->D3D) (structures with "GL_" prefix) Quote:
Quote:
Code:
inline const bool IsSoftwareDrawingMode (void) |
Re: code to get the illumination at any point on the map
Adding "inline" helped for cygwin (so the binary has been finally created and I'll be able to test Your function on a linux server - to see if it works - GETENTITYILLUM wasn't working on linux, so my bots wouldn use i.e. flashlights). But that one seems to be still unsolved:
Quote:
About linux - from that what I know - there is no client and no listenserver available for CS for linux. VALVE has released only a dedicated server version of CS. So IS_DEDICATED_SERVER () SHOULD return always true (expect the situation VALVE has there a bug in the code). About that GL thing - what if the user selects D3D instead OpenGL (in Video preferences) on a listenserver? Does that mean Your code wouldn't work then? |
Re: code to get the illumination at any point on the map
Quote:
So, my council: use instead of function "GETENTITYILLUM" directly variable "bot->v.light_level" - for bots and players it is the same. And about the compilation error, I do not know what help you :( Quote:
|
Re: code to get the illumination at any point on the map
Quote:
1. a group of people who are elected to govern an area such as a town, city, etc. 2. a group of people chosen to give advice, manage affairs, etc. for a particular organization or activity In our Slovian languages we have one the same word for "council" and for "advice" (in Polish it's "Rada" - in Russian it may sound similar). :) That's exacty what I have done. I have to look at Your another advice about other bots (not podbot mm) to run Your function at them, too. Your function doesn't return 0 on bots on a Windows server, but now it's time for me to test it on a linux server, too. I'm going to test it today evening. Quote:
Thanks for all Your help so far. :) |
Re: code to get the illumination at any point on the map
Thanks for the lesson :)
I mean advice, F*CKING translator.... Good Luck! |
Re: code to get the illumination at any point on the map
'hack' way - add something like this to util.cpp (so that the symbols for the 2 types actually exist in the compiled .o file):
Code:
void myhack() |
Re: code to get the illumination at any point on the map
The templated function is already placed in .h (bot_globals.h):
Code:
namespace Light [EDIT] The cygwin file - even if it's compiled - it is not loading on my mandriva 2011 linux test server. :big_crying: The problem reported by MinGW has to be definitely somehow resolved. |
Re: code to get the illumination at any point on the map
Whistler has in mind that you must put the body of a function "RecursiveLightPoint" in the header file bot_globals.h instead of util.cpp
|
Re: code to get the illumination at any point on the map
From that what I've seen in the code, all extern variables they are placed in bot_gloabals.h, they have to be placed also in bot_globals.cpp. Isn't here the same situation - if extern const bool RecursiveLightPoint exists in bot_globals.h, maybe it shoud be also defined in bot_globals.cpp? The only difference is - in this case it is a const (not a variable). I don't have such case in the rest of code, so I cannot compare it with anything. :(
Another thing - I don't have other clasess in podbot mm code, so I'm completly lost with Your function. :) I have completly no idea how classes variables should be declared to be seen from other *.cpp files and their functions. If i.e. there is a function FVisible in util.cpp, it's just enough to add this decalration below in bot.h: bool FVisible (const Vector &vecOrigin, edict_t *pEdict); But how it should be made for functions they are some members of a class? |
Re: code to get the illumination at any point on the map
Quote:
And into the account of classes and namespaces - you are free to make with a code all that you want, so you can simply remove this namespace.... |
All times are GMT +2. The time now is 04:36. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.